Commit Graph

3374 Commits

Author SHA1 Message Date
Kartikaya Gupta
78dba184db Bug 1461313 - Handle invalid clip-path URIs with WebRender. r=mstange
In the case of an invalid clip-path, the browser is supposed to discard the
mask entirely. In the non-webrender codepath this would happen
implicitly because the computed MaskUsage would have no flags set, and
so no actions would be taken on the gfxContext which contained the
display items rasterized so far. In the WebRender codepath, though, we
invoke the code on a A8 drawtarget that's zero-filled, so if PaintMask
fails to rasterize anything into it, it gets treated as a "mask everything
out" mask. Instead, this patch makes it so that we detect the scenario
where the computed MaskUsage is a no-op, and ensure that we don't apply
the mask in that case.

An alternative approach considered was to initialize the A8 drawtarget to
white instead of black but in cases where there is an actual mask, the
rest of the code assumes it is zero-filled and so that doesn't work.

MozReview-Commit-ID: Hw7nCiUXVJl

--HG--
extra : rebase_source : 241d550fa0ed1b3bd088c73d9565b166acbcece8
2018-07-05 08:05:34 -04:00
Dorel Luca
88782acd58 Backed out changeset 01837d6c41b6 (bug 1372458) for Reftest failures on layout/reftests/svg/filters-and-group-opacity-01.svg 2018-07-05 03:01:56 +03:00
Matt Woodrow
406499dd53 Bug 1372458 - Fold opacity into filter drawing rather than using a temporary surface. r=mstange
MozReview-Commit-ID: 6ByhxshY3uO

--HG--
extra : rebase_source : 7c0add57b0de49ede96ddb46f5dfd0b9f2cadb3c
2018-06-22 11:35:49 +12:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Chris Peterson
f743d8e9dd Bug 1469769 - Part 4: svg: Replace failing NS_NOTREACHED with NS_ERROR. r=heycam
I'm replacing non-failing calls to NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE, but this NS_NOTREACHED fails when running the dom/svg/crashtests/412104-1.svg test. This assertion failure is bug 903785.

This patch DOES NOT fix the cause of the assertion failure (a missing TextNodeCorrespondenceProperty). It just replaces this failing NS_NOTREACHED with NS_ERROR because I can't replace with a fatal MOZ_ASSERT_UNREACHABLE.

MozReview-Commit-ID: 8ffEdO5W1zU

--HG--
extra : rebase_source : 618008591b516e3b4b51871debcd0cf177a3f5b1
extra : intermediate-source : 099e1bbbc5b43b67ad9324464e4eec2e33d7eaa3
extra : source : f95d808c6f81b656c680d1dd005236571dedee20
2018-05-26 17:11:02 -07:00
Noemi Erli
aaac9a77dd Merge inbound to mozilla-central. a=merge 2018-06-25 22:02:08 +03:00
Emilio Cobos Álvarez
88831b3bc5 Bug 1470163: Move test_disabled to an iframe. r=heycam
MozReview-Commit-ID: Ks4bEVNxs82
2018-06-25 10:55:57 +02:00
Emilio Cobos Álvarez
bd7c1e4e8c Bug 1468133: Remove the optimization to lazily load non-SVG styles since it's not relevant anymore. r=heycam
This was a memory-saving optimization introduced as part of dependencies for bug
686875, but a more general system landed in bug 77999 for Gecko and
https://github.com/servo/servo/pull/18509 for Servo.

So now it's probably even a bit of a pessimization (though probably not huge),
and given this causes bugs like bug 1462742, bug 1157592, and bug 1468145, and
fishiness like the one pointed out in this bug, we may as well remove it.

The performance impact of having to lookup through more rules should be minimal
given the bloom filter and the rule hash optimizations.

This makes me wonder whether we could remove the whole concept of on-demand UA
sheets, since they've caused pain, for example, when the frontend people try
loading <svg>s from NAC (since that triggers sheet loading from frame
construction, which is not good). I'm not concerned about loading mathml.css and
svg.css everywhere, though xul.css may not be as doable since it adds a bunch of
attribute-dependent selectors. Though on the other hand I asserted in the
xul.css code and we don't load it in content with <video> / <input
type="date/time/etc"> and such, afaict, so maybe now that legacy addons are gone
we can remove that sheet from content processes altogether.

MozReview-Commit-ID: 9JCWNZj6BkT
2018-06-22 03:42:46 +02:00
Botond Ballo
f5745eb2a5 Bug 1459696 - Improve const-correctness of nsIFrame methods and functions that accept an nsIFrame* argument. r=mstange
MozReview-Commit-ID: 9IcL8kfMdIH

--HG--
extra : rebase_source : f8f19f528fe42aa119659ed9cb3340a257bb3716
2018-05-28 19:58:25 -04:00
Hiroyuki Ikezoe
afa2fcd95a Bug 1469220 - Backed out changeset 7fc66c715a0f and 39cb4d5f6602. r=mattwoodrow
Those changesets which are related to animations introduced in bug 1462497
seems to cause new crashes.  I think the first two changesets for the bug fixed
the original crash cases but the last two (i.e. these changesets) introduced
other crashes unfortunately.

MozReview-Commit-ID: 9LD2hIIXA2y

--HG--
extra : rebase_source : 102c5532128039dcf8274c214e17d58d9a1aa483
2018-06-18 06:16:07 +09:00
Andi-Bogdan Postelnicu
09ec36a025 Bug 1453795 - SVG - Initialize member fields in classes/ structures. r=jwatt
--HG--
extra : rebase_source : 244f0513af145c53fbc0177d2652cf68e20b64af
2018-06-16 13:54:44 +03:00
Emilio Cobos Álvarez
0c6c2df7a2 Bug 1468582: Remove using namespace statements from layout headers. r=mats
MozReview-Commit-ID: WF23cUiHFH
2018-06-14 09:08:20 -07:00
Lee Salzman
d273b4ddcc Bug 1467552 - make VectorImage::Show force OP_OVER. r=bas 2018-06-08 12:38:13 -04:00
Dan Glastonbury
68881da7dd Bug 1457353 - P1: Change nscolor to StyleComplexColor. r=xidorn
Change mStopColor, mFloodColor, and mLightingColor in nsStyleSVGReset.

MozReview-Commit-ID: KMRMtHk1jNK

--HG--
extra : rebase_source : c0c12fa811d17ab6fe0a5ceb31ff32ec585314e0
2018-04-27 12:07:20 +10:00
Botond Ballo
b505ad3dec Bug 1443092 - Crashtest. r=jwatt
--HG--
extra : rebase_source : a5e5a41ba9a8d763497499a73d6737b4999667f7
2018-03-09 17:32:50 -05:00
Dorel Luca
dc6d856805 Merge mozilla-inbound to mozilla-central. a=merge 2018-05-23 12:51:22 +03:00
Markus Stange
84a6ade868 Bug 1458968 - Create the nsDisplaySVGWrapper item in nsSVGOuterSVGAnonChildFrame, not in nsSVGOuterSVGFrame. r=mattwoodrow
This ensures that the nsDisplaySVGWrapper's mFrame and its reference frame are the same frame: the nsSVGOuterSVGAnonChildFrame.
It'll also cause the nsDisplaySVGWrapper to be *inside* the nsDisplayTransform for the <svg> element's viewbox transform.

This patch reverts nsSVGOuterSVGFrame::BuildDisplayList to its pre-bug 1407938 form.
(That's the bug that introduced nsDisplaySVGWrapper.)

MozReview-Commit-ID: 3jCyP6Sj8x9
2018-05-22 21:41:32 -04:00
Markus Stange
1c9281028a Bug 1458968 - Make the nsSVGOuterSVGAnonChildFrame a reference frame by always returning true from IsSVGTransformed. r=mattwoodrow
This causes transforms of the <svg> contents to be unaffected by scrolling / offset changes of the <svg> element.

MozReview-Commit-ID: JtDmwppqBis
2018-05-22 21:41:30 -04:00
Matt Woodrow
6eda39ebfb Bug 1462497 - Part 4: Only use the MayHaveAnimation variants when computing useOpacity in case the more accurate version changes results between paints. r=hiro
I don't think this part is necessary, but putting the patch up in case we decide we want to take it.

MozReview-Commit-ID: G0JTNddvZma

--HG--
extra : rebase_source : 442a6a563044c2c510f332f881d9fab55c4455be
2018-05-23 11:03:54 +12:00
Botond Ballo
d3215239ec Bug 1459890 - Do not clip mask for clip path to bbox of clipped content. r=mstange
MozReview-Commit-ID: 9yZ1ziiDAKa

--HG--
extra : rebase_source : 945b2048b31843c27cd21c19374cb7f61ea62be5
2018-05-11 18:55:30 -04:00
Ciure Andrei
3b611bc04f Backed out changeset 51cd668c0e87 (bug 1459890) dev request a=backout CLOSED TREE 2018-05-17 01:29:54 +03:00
Botond Ballo
c44bf295e5 Bug 1459890 - Do not clip mask for clip path to bbox of clipped content. r=mstange
MozReview-Commit-ID: 9yZ1ziiDAKa

--HG--
extra : rebase_source : 59ef1bc77e869a1b157f2ddb79a3c3bf674bb9a9
2018-05-11 18:55:30 -04:00
Matt Woodrow
0d65266918 Bug 1460491 - Part 1: Split nsDisplayItem::mVisibleRect into two members, one for each stated purpose. Gets rid of the save/restore since we no longer modify the building rect. r=jnicol
MozReview-Commit-ID: 5wcsSoZRN44

--HG--
extra : rebase_source : 1bf7d655b048a972e392514542aee171e20afe82
2018-05-16 15:56:32 +12:00
Robert Longson
1baf4cf80c Bug 1422226 - Don't build display lists for NONDISPLAY content. r=jwatt 2018-05-13 19:16:26 +01:00
Boris Zbarsky
f7d68d6078 Bug 1387143 part 21. Remove nsISelection getters for anchor and focus points. r=mats
Instead of copying spec-duplicating comments from nsISelection.idl to
Selection.webidl, this just points the latter to the right spec.
2018-05-08 13:52:38 -04:00
Chris Peterson
71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Boris Zbarsky
93af0eea13 Bug 1455674 part 14. Remove use of nsIDOMElement in layout. r=qdot 2018-04-26 23:37:33 -04:00
Emilio Cobos Álvarez
0faef276ec Bug 1455885: Make the SVG context paint not use a node property, but a member in SVGDocument. r=jwatt
MozReview-Commit-ID: H6SRTsDL5Rh
2018-04-26 17:07:39 +02:00
Robert Longson
b0d2ba05a0 Bug 1455763 - Remove SVGViewElement.viewTarget r=heycam r=mystor 2018-04-25 22:44:31 +01:00
Emilio Cobos Álvarez
543a797d15 Bug 1421807: Wallpaper SVG text code which makes too many assumptions about the DOM. r=heycam
Second test-case is because I initially made this code work with
display: contents. But then realised that display: contents meant allowing
Shadow DOM in there, which I don't really want to deal with right now.

MozReview-Commit-ID: HSjFbWEbPAb

--HG--
extra : rebase_source : 51b950d5e74e17b0200112a7d447b3e3b9414602
2018-04-23 21:23:50 +02:00
Dan Glastonbury
334258d77f Bug 1467621 - P1: nsCSSShadowItem - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: moE2CI7fT8

--HG--
extra : rebase_source : 7b64beccbd4c499d93567d62b913257dfa53c9fe
2018-06-19 14:18:33 +10:00
Kris Maglione
219ed0cc06 Bug 1454813: Part 2b - Rename SpawnTask.js to AddTask.js. r=florian
The old name no longer makes sense, since it no longer exports an spawn_task
symbol, and add_task is what we really care about.

MozReview-Commit-ID: IE7B8Czv8DH

--HG--
rename : testing/mochitest/tests/SimpleTest/SpawnTask.js => testing/mochitest/tests/SimpleTest/AddTask.js
extra : rebase_source : 03bca5aa69a7625a49b4455a6c96ce4c59de3a5a
2018-04-18 11:43:45 -07:00
Jeff Muizelaar
5153b29720 Bug 1454507. Avoid asserting that we don't end up with an empty result. r=mstange
This adds a crash test that would previously trigger the assert.

--HG--
extra : rebase_source : f167a85bf219cf3eac1192be05c297fc5e383072
2018-04-16 18:00:35 -04:00
Andrew McCreight
3f7472aec1 Bug 1449670, part 1 - Convert IsNodeOfType(nsINode::eTEXT) to IsText(). r=bz
This method is not a virtual call, and also looks nicer.

This patch was mostly generated by a Python script, but I manually
cleaned up the code in a few places where statements didn't need to be
split across multiple lines any more.

MozReview-Commit-ID: 8JExxqSRc59

--HG--
extra : rebase_source : df6330a89e8d65dfe7a6fda0c8cb9f9732302efc
2018-04-12 15:41:00 -07:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Emilio Cobos Álvarez
f39eaa5d48 Bug 1452080: Remove ComputedStyle::PresContext usage from layout and canvas code. r=xidorn
Couldn't find an easy way of splitting these up :(

MozReview-Commit-ID: 2kTZ5McREUT
2018-04-09 11:19:49 +02:00
Noemi Erli
5d9588e156 Backed out 3 changesets (bug 1452080) for bustage in /builds/worker/workspace/build/src/layout/base/nsCSSFrameConstructor.cpp on a CLOSED TREE
Backed out changeset 7f5104c7a242 (bug 1452080)
Backed out changeset 806a9c95a243 (bug 1452080)
Backed out changeset bffebe8aa254 (bug 1452080)
2018-04-09 11:18:12 +03:00
Emilio Cobos Álvarez
2a427429ff Bug 1452080: Remove ComputedStyle::PresContext usage from layout and canvas code. r=xidorn
Couldn't find an easy way of splitting these up :(

MozReview-Commit-ID: 2kTZ5McREUT
2018-04-09 09:57:55 +02:00
Emilio Cobos Álvarez
e128bf7b1a Bug 1447827: Remove ServoRestyleManager. r=xidorn
MozReview-Commit-ID: CFafQsb4rQn
2018-04-07 15:50:06 +02:00
Bas Schouten
994ab9fbd6 Bug 1440753: Replace pixman regions with our own region code. r=mattwoodrow
MozReview-Commit-ID: KPsTAw3Uwa2
2018-03-09 05:27:15 +01:00
Noemi Erli
f4d2c09aba Backed out changeset c9db3f332a19 (bug 1440753) for content sometimes not being rendered (bug 1451597). a=backout 2018-04-05 13:15:35 +03:00
Jeff Muizelaar
dbb95d3a78 Bug 1450162. Add a crash test that invalidates our previous assumptions. r=mstange 2018-04-04 23:05:00 -04:00
Bas Schouten
6cee50b1b0 Bug 1440753: Replace pixman regions with our own region code. r=mattwoodrow
MozReview-Commit-ID: KPsTAw3Uwa2
2018-03-09 05:27:15 +01:00
Ting-Yu Lin ext:(%2C%20Brad%20Werth%20%3Cbwerth%40mozilla.com%3E)
cf9bd1c885 Bug 1404222 Part 3: Block onload when shape-outside images are requested for a frame, and keep it blocked until the frame is removed, the image fails to load, or reflow is complete. r=dbaron,dholbert
When we finish decoding an image frame, we need to trigger reflow for the
frame containing a float with shape-outside: <image>, and delay the firing
of the document's onload event until that reflow is complete.
2018-01-25 14:56:43 +08:00
Ryan VanderMeulen
d9d59209a6 Backed out changeset d85b5825a721 (bug 1440753) for frequent OSX iframe-scrolling-attr-2.html failures on a CLOSED TREE. 2018-04-02 17:59:30 -04:00
Ryan VanderMeulen
e5ec40f40c Backed out 11 changesets (bug 1404222) for static analysis failures on a CLOSED TREE.
Backed out changeset a6a99136300c (bug 1404222)
Backed out changeset 7183b8104399 (bug 1404222)
Backed out changeset a1e4294c1c59 (bug 1404222)
Backed out changeset b79d6e8318db (bug 1404222)
Backed out changeset 0450620fdabd (bug 1404222)
Backed out changeset 026c74a92d04 (bug 1404222)
Backed out changeset 50ac4167f702 (bug 1404222)
Backed out changeset 59038f2db68a (bug 1404222)
Backed out changeset f6b9096da915 (bug 1404222)
Backed out changeset 4e0baffdd79b (bug 1404222)
Backed out changeset 57eeb849ab88 (bug 1404222)
2018-04-02 17:57:27 -04:00
Ting-Yu Lin ext:(%2C%20Brad%20Werth%20%3Cbwerth%40mozilla.com%3E)
fe87490f1a Bug 1404222 Part 3: Block onload when shape-outside images are requested for a frame, and keep it blocked until the frame is removed or reflow is complete. r=dbaron,dholbert
When we finish decoding an image frame, we need to trigger reflow for the
frame containing a float with shape-outside: <image>, and delay the firing
of the document's onload event until that reflow is complete.
2018-01-25 14:56:43 +08:00
Bas Schouten
d40acb4412 Bug 1440753: Replace pixman regions with our own region code. r=mattwoodrow
MozReview-Commit-ID: KPsTAw3Uwa2
2018-03-09 05:27:15 +01:00
Robert Longson
f725679a94 Bug 1446617 - support the SVG 2 path attribute for textPath elements r=dholbert 2018-03-31 18:50:10 +01:00
Dorel Luca
4e6205407f Backed out changeset cd40ea4d0a95 (bug 1446617) for Reftest failure on build/tests/reftest/tests/layout/reftests/svg/textPath-path-attribute-01.svg 2018-03-31 16:02:10 +03:00
Robert Longson
76c8556c39 Bug 1446617 - support the SVG 2 path attribute for textPath elements r=dholbert 2018-03-31 11:55:18 +01:00
Robert Longson
432b48c35a Bug 1448774 - part 2 r=dholbert 2018-03-29 04:09:34 +01:00
Robert Longson
f627214d56 Bug 1448774 - part 1 r=dholbert 2018-03-29 03:12:05 +01:00
Margareta Eliza Balazs
ecdbb83fa1 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-28 01:00:31 +03:00
Margareta Eliza Balazs
adebb06ac1 Merge inbound to mozilla-central. a=merge 2018-03-28 00:48:11 +03:00
Jeff Muizelaar
d07c300116 Bug 1388842. Add blob invalidation. r=mstange
MozReview-Commit-ID: 5xwqlULUbZe
2018-03-27 17:31:04 -04:00
Botond Ballo
c390635e19 Bug 1443092 - Avoid calling SVGAnimatedEnumeration::AnimVal() from nsSVGUtils::GetBBox(). r=jwatt
AnimVal() is a DOM getter, and it flushes animations, which we don't want
in GetBBox() which is called from display list building cide and
FrameLayerBuilder.
2018-03-09 17:26:24 -05:00
Tim Nguyen
ce07ff6857 Bug 1381453 - Support SVG context paint on ::-moz-tree-twisty list-style-image. r=dholbert
MozReview-Commit-ID: E9966Bwog5W

--HG--
extra : rebase_source : 03c52902209811ccde4b9c6359042cc34af0438f
2018-03-27 00:08:16 +00:00
Robert Longson
8873201d39 Bug 1446617 - part 1 - remove unnecessary namespace usage r=dholbert 2018-03-23 18:17:09 +00:00
Cosmin Sabou
56274d0a01 Backed out changeset c652b6d362f6 (bug 1440753) for permafailing on layout/reftests/scrolling/iframe-scrolling-attr-2.html a=backout 2018-03-23 16:54:23 +02:00
Noemi Erli
1270a21724 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-23 01:00:18 +02:00
Emilio Cobos Álvarez
e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez
5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez
ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Bas Schouten
8f930c02f7 Bug 1440753: Replace pixman regions with our own region code. r=mattwoodrow
MozReview-Commit-ID: KPsTAw3Uwa2
2018-03-09 05:27:15 +01:00
Emilio Cobos Álvarez
f7522ae728 Bug 1447358: Unifdef the old style system code. r=jwatt
Summary:
This has been automatically generated using:

  http://dotat.at/prog/unifdef/

And:

find $OBJDIR -type f -name '*.h' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

find $OBJDIR -type f -name '*.cpp' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

MozReview-Commit-ID: I4NdKqbMXzJ

Reviewers: jwatt

Bug #: 1447358

Differential Revision: https://phabricator.services.mozilla.com/D779
2018-03-21 10:20:34 +01:00
Robert Longson
fd2cceeb03 Bug 1446614 - textPath should not render if the path it uses is invalid r=dholbert 2018-03-19 23:34:50 +00:00
Robert Longson
c0bb15d317 Bug 1362417 - Pass imgDrawingParams into SVGTextDrawPathCallbacks r=jwatt 2018-03-18 20:35:13 +00:00
Robert Longson
cfec2a2890 Bug 1446802 - use codespell -w -q4 to fix some spelling mistakes r=jwatt 2018-03-18 18:09:51 +00:00
Robert Longson
32c95b809e Bug 1443314 - remove the svg.path-caching.enabled pref r=jwatt 2018-03-18 14:05:28 +00:00
Sylvestre Ledru
8c732b1e60 Bug 1443080 - Now that we use static call, some var instances are not needed anymore r=Ehsan
MozReview-Commit-ID: AiuJIY8Gssl

--HG--
extra : rebase_source : 9bb9b7df30d502f8b3f5ffda719aea80109b07e9
2018-03-05 09:33:02 +01:00
Sylvestre Ledru
fa45a3c670 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 5f5e37517aa80c2e7b5933962178d761074886e7
2018-03-16 14:29:15 +01:00
Robert Longson
898ce47974 Bug 1446650 - support the SVG 2 side attribute for textPaths r=dholbert 2018-03-22 18:43:50 +00:00
Robert Longson
797f6cb1a6 Bug 1325320 part 3 - move GetPathLengthScale to SVGGeometryElement and convert callers of SVGPathElement methods to work on the base SVGGeometryElement class and work for all shapes, not just paths r=dholbert 2018-03-13 19:52:03 +00:00
Robert Longson
7709e9b3e1 Bug 1444666 - get rid of nsSVGUtils version of GetStrokeDashData and replace by SVGContentUtils::GetStrokeOptions r=jwatt 2018-03-11 16:11:24 +00:00
Dorel Luca
950dc4ffdd Backed out 2 changesets (bug 1440753) for talos bustages
Backed out changeset 75ccc12de326 (bug 1440753)
Backed out changeset d9297cea0239 (bug 1440753)
2018-03-09 11:44:17 +02:00
Robert Longson
81b5779eda Bug 1325320 - change SVGGeometryElement::GetOrBuildPath to take DrawTarget as a pointer since all its callers have drawTarget as a pointer themselves.
This is consistent with most other methods that take a drawTarget parameter r=dholbert

--HG--
extra : amend_source : 77aa7f7d9cb19f9aa08014fff3b209dc151b75f3
2018-03-09 07:36:13 +00:00
Bas Schouten
cf1a0d14c2 Bug 1440753: Replace pixman regions with our own region code. r=mattwoodrow
MozReview-Commit-ID: KPsTAw3Uwa2
2018-03-09 05:27:15 +01:00
Chris Peterson
73675ec9f2 Bug 1443402 - Fix some -Wmissing-prototypes warnings in layout. r=dholbert
-Wmissing-prototypes is a new optional warning available in clang ToT. It warns about global functions that have no previous function declaration (e.g. from an #included header file). These functions can probably be made static (allowing the compiler to better optimize them) or they may be unused.

Confusingly, clang's -Wmissing-prototypes is equivalent to gcc's -Wmissing-declarations, not gcc's -Wmissing-prototypes. A function prototype is a function declaration that specifies the function's argument types. C++ requires that all function declarations specify their argument types, but C does not. As such, gcc's -Wmissing-prototypes is a C-only warning about C functions that have no previous function *prototypes* (with argument types), even if a previous function *declaration* (without argument types) was seen.

MozReview-Commit-ID: FGKVLzeQ2oK

--HG--
extra : rebase_source : 81e62163bf41a5d5dd87abf5397e6e8c62ed4096
extra : source : 653a9fc279e2f6a6d066474a94a70d65ac703d6b
2018-02-22 21:03:45 -08:00
Emilio Cobos Álvarez
2988d4e66d Bug 1442207: Remove unneeded arguments to nsIMutationObserver. r=smaug
aDocument is always content->OwnerDoc().
aContainer is always content->GetParent().

Differential Revision: https://phabricator.services.mozilla.com/D664

MozReview-Commit-ID: 4xwPCOnhyIL
2018-03-01 22:45:17 +01:00
Emilio Cobos Álvarez
9f26540cc4 Bug 1441547: Make character data change notifications use a const reference for the info parameter. r=smaug
It's not intended to be mutated.

MozReview-Commit-ID: 5nkD1YkidlV

--HG--
extra : rebase_source : 810d429208fa3eaf30e220e77a7d27107cb77346
2018-02-27 15:30:27 +01:00
Matt Woodrow
4183152e2d Bug 1436904 - Part 1: Add a static constructor function for display items. r=Bas 2018-02-13 13:43:28 +13:00
Emilio Cobos Álvarez
52623f52d9 Bug 1439285: Make the old image request arrive to FinishStyle if we come from ResolveSameStructsAs. r=bholley
MozReview-Commit-ID: H1N9jNql9tl

--HG--
extra : rebase_source : f6f2ab9edb5b558f0fc0d91c0caa9c0d7e0e0973
2018-02-22 19:44:44 +01:00
Dorel Luca
bd05e3853c Backed out 3 changesets (bug 1436904) for many crashes see bugs: 1440281, 1440302, 1440303, 1440313. a=backout
Backed out changeset 27f0762d4472 (bug 1436904)
Backed out changeset 27640f52e188 (bug 1436904)
Backed out changeset 2b4d117c27dc (bug 1436904)
2018-02-22 17:28:59 +02:00
Matt Woodrow
e485bba27f Bug 1436904 - Part 1: Add a static constructor function for display items. r=Bas 2018-02-13 13:43:28 +13:00
Robert Longson
728a3f36fc Bug 1435477 - Make the SVG dom code use the WebIDL constants from the bindings r=jwatt 2018-02-18 15:53:13 +00:00
Miko Mynttinen
7a19c4858c Bug 1438165 - Ensure that all display items have a unique type r=mattwoodrow
MozReview-Commit-ID: HIlSQFcvG9A

--HG--
extra : rebase_source : aba9cdf8e578ed3fd98a77aef8a183dac08baea1
extra : amend_source : 329ff3b9124c05b35ff1e0807afe9ac455bbebce
2018-02-15 15:26:56 +01:00
Jeff Muizelaar
167ea61674 Bug 1438631. Use a similar drawtarget when painting masks. r=mstange
Avoiding an offscreen drawtarget will avoid using Direct2D with webrender,
let us record the masking operation, and also give us OMTP.
2018-02-16 15:52:45 -05:00
Boris Zbarsky
c61fc860fe Bug 1436508 part 14. Remove nsIDOMMutationEvent. r=masayuki
MozReview-Commit-ID: Gf59kFSIuaK
2018-02-09 11:17:10 -05:00
Boris Zbarsky
3660ff5632 Bug 1436508 part 13. Remove nsIDOMMutationEvent constants. r=masayuki
MozReview-Commit-ID: Anl5QJZknJL
2018-02-09 11:17:10 -05:00
Jonathan Watt
843da70a1a Bug 1436438 part 1 - Remove the tests that test SVG path data DOM interfaces. r=longsonr
MozReview-Commit-ID: 78yzAb6Khf1
2018-01-26 10:39:11 +00:00
Boris Zbarsky
13dda50f75 Bug 1435138 part 4. Remove nsIDOMSVGLength. r=qdot
MozReview-Commit-ID: HwKT9Bdby6F
2018-02-02 08:21:33 -05:00
Boris Zbarsky
3afbe4d699 Bug 1435138 part 3. Remove nsIDOMSVGLength's SVG_LENGTHTYPE_* constants. r=qdot
MozReview-Commit-ID: GvzWbe6cr5r
2018-02-02 08:21:33 -05:00
Cameron McCormack
d02e54b79b Bug 1430014 - Part 5: Stop building old style system classes when MOZ_OLD_STYLE is not defined. r=xidorn
MozReview-Commit-ID: CIHyPdF7Exl

--HG--
extra : source : 78a2fc781eead47af3923efcde58569c5d882ab1
2018-02-01 15:04:04 +11:00
Dão Gottwald
8df93b652f Bug 1395732 - Implement new defaultFavicon.svg with context-fill. r=jwatt,mak
MozReview-Commit-ID: IB5TWxbg0MX

--HG--
extra : rebase_source : d42f405ad71e2c05cf9bbc46bdb92bd36da1498a
2018-01-24 15:15:51 +01:00
Daniel Holbert
6fa9124425 Bug 1429915: Use RefPtr instead of NS_ADDREF to set refcounted outparams in SVGTextFrame. r=jwatt
MozReview-Commit-ID: 6eBacKkAitR

--HG--
extra : rebase_source : 52aceccd94b387e9499bd161b0163caa4da851c8
2018-01-30 16:47:22 -05:00
Kris Maglione
918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou
9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian
af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Emilio Cobos Álvarez
141792488a Bug 1430608: Make nsMediaFeatures work with a document, not a pres context. r=heycam
Returning a zero-sized viewport in the case there's no shell / pres context.

For now, no other change yet. After this we can start tweaking the ShadowRoot
Stylist setup, and even try to return computed styles without a document \o/.

MozReview-Commit-ID: 3cT2PKQISri
2018-01-17 21:51:47 +01:00
Emilio Cobos Álvarez
91be560d9c Bug 1427292: [css-display] Update display: contents on Unusual Elements to the spec. r=mats
This will pass[1] whenever the next WPT sync happens.

See: https://drafts.csswg.org/css-display/#unbox-html

[1]: https://github.com/w3c/web-platform-tests/blob/master/css/css-display/display-contents-unusual-html-elements-none.html

MozReview-Commit-ID: 19dqDSxVm7A
2018-01-06 21:52:51 +01:00
Emilio Cobos Álvarez
c8eb630ebe Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00
Emilio Cobos Álvarez
ffdf5d2cb5 Backout changeset e43f568b3e9a (bug 1423990) because some OSX-only code still doesn't build. r=me 2017-12-25 12:55:45 +01:00
Emilio Cobos Álvarez
c0959b2955 Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W

--HG--
extra : rebase_source : 09b82acb4f3d69e8a4345457ab217443bc28d6e2
2017-12-07 19:13:50 +01:00
Mats Palmgren
41423a85e6 Bug 1424528 part 3 - A few manual fixes related to removing the nsDidReflowStatus param in DidReflow. r=dholbert
MozReview-Commit-ID: 8elJQTfOaaL
2017-12-14 16:21:49 +01:00
Mats Palmgren
fb3dd87715 Bug 1424528 part 2 - Remove nsDidReflowStatus param in DidReflow declarations (automated change). r=dholbert
MozReview-Commit-ID: 44pchGXzYL7
2017-12-14 16:21:49 +01:00
Mats Palmgren
60e745ae58 Bug 1424528 part 1 - Remove nsDidReflowStatus::FINISHED 3rd arg in DidReflow calls (automated change). r=dholbert
MozReview-Commit-ID: CiK7pV0OsGr
2017-12-14 16:21:49 +01:00
Miko Mynttinen
2fc0722497 Bug 1425078 - Remove nsDisplayList::AppendNewToTop and nsDisplayList::AppendNewToBottom r=mattwoodrow
MozReview-Commit-ID: E3neKT2sV4Q

--HG--
extra : rebase_source : 98b65e4c82f8a965df211e828bc68d46e7a6716e
2017-12-13 11:23:04 -06:00
Samathy Barratt
d8ba79a56b Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel
Renamed to imgDrawResult

MozReview-Commit-ID: 5ESSgIhhU41

--HG--
rename : image/DrawResult.h => image/ImgDrawResult.h
extra : rebase_source : dbf645574aff7eefe65fa81809d6c07cb5800ec6
2017-12-11 15:37:59 +00:00
Ciure Andrei
b8d4330b53 Backed out changeset 8e33d0ce108c (bug 1351447) for failing /builds/worker/workspace/build/src/widget/cocoa/nsCocoaUtils on OS X r=backout a=backout on a CLOSED TREE
--HG--
rename : image/ImgDrawResult.h => image/DrawResult.h
2017-12-12 09:49:59 +02:00
Samathy Barratt
0749baf2d8 Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r=tnikkel
Renamed to imgDrawResult

MozReview-Commit-ID: 5ESSgIhhU41

--HG--
rename : image/DrawResult.h => image/ImgDrawResult.h
extra : rebase_source : 4fba109b84ef456126d50e0d5e525f29f944a46d
2017-12-11 15:37:59 +00:00
Ting-Yu Lin
264402226f Bug 1417376 Part 3 - Pass nsPoint parameters by const references instead of values. r=mats
It's good to save some copy constructor calls.

MozReview-Commit-ID: 6TveqwkOvc0

--HG--
extra : rebase_source : 02e678f985c074f6c972cf8478e233aa5e4607db
2017-11-15 17:55:36 +08:00
Noemi Erli
696ac83de9 Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-11-18 02:55:06 +02:00
Noemi Erli
d96f41a437 Merge inbound to mozilla-central r=merge a=merge 2017-11-18 00:01:46 +02:00
Andrew Osmond
19e321eb9e Bug 1366097 - Part 8. Improve image memory reports to include SVG context information. r=tnikkel 2017-11-17 14:08:52 -05:00
Botond Ballo
6adc2e4d1d Bug 1416754 - Account for a clip-path's transform in nsSVGUtils::GetBBox(). r=longsonr
MozReview-Commit-ID: 87RpVYk0nm0

--HG--
extra : rebase_source : 95bc906f923de229f6af63473f263e07d81e60ff
2017-11-15 17:33:41 -05:00
Matt Woodrow
aab0cbe92c Bug 1406727. r=froydnj 2017-11-16 16:09:28 +13:00
Narcis Beleuzu
af710e4746 Backed out changeset 0f783930e1b2 (bug 1406727) for GTest failures on ArenaAllocator. r=backout on a CLOSED TREE 2017-11-16 07:45:06 +02:00
Matt Woodrow
5e1a10f3be Bug 1406727. r=froydnj 2017-11-16 16:09:28 +13:00
Ciure Andrei
fdbe147ffb Merge mozilla-central to autoland. r=merge a=merge CLOSED TREE 2017-11-17 12:09:31 +02:00
Cameron McCormack
180dccaf7d Bug 1417841 - Don't reset <textPath> first character coordinate to 0 when an ancestor text content element specifies an explicit position coordinate. r=longsonr
MozReview-Commit-ID: KpJCuYwXxXC

--HG--
extra : rebase_source : ab8cde36825c580fd77337aac6e8a7d7bcd47e95
2017-11-16 13:19:11 +08:00
Kartikaya Gupta
00ef028ed3 Bug 1416267 - Update gfxContext matrix functions to avoid flip-flopping between float and double matrices. r=jrmuizel
The core of this change is in gfxContext.*:
- change gfxContext::CurrentMatrix() and gfxContext::SetMatrix() to
  return and take a Matrix respectively, instead of converting to
  and from a gfxMatrix (which uses doubles). These functions therefore
  will now match the native representation of the transform in gfxContext.
- add two new functions CurrentMatrixDouble() and SetMatrixDouble() that
  do what the old CurrentMatrix() and SetMatrix() used to do, i.e.
  convert between the float matrix and the double matrix.

The rest of the change is just updating the call sites to avoid round-
tripping between floats and doubles where possible. Call sites that are
hard to fix are migrated to the new XXXDouble functions which preserves
the existing behaviour.

MozReview-Commit-ID: 5sbBpLUus3U
2017-11-10 21:14:09 -05:00
Mats Palmgren
1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00
Mats Palmgren
25cd0c37f7 Bug 1400618 part 1 - Collect NAC / generated content and call DestroyAnonymousContent / UnbindFromTree on those after the frames are destroyed. r=bz
MozReview-Commit-ID: 2trDgeJPw25
2017-11-07 01:20:33 +01:00
Botond Ballo
9c407a7103 Bug 1382534 - Add nsCSSClipPathInstance::GetBoundingRectForBasicShapeClip(). r=mstange
MozReview-Commit-ID: 85mhNcj5V2J

--HG--
extra : rebase_source : b4e868a89408e31aef1f26c3f701e1fb2daa2477
2017-10-04 16:46:44 -04:00
Botond Ballo
0d16ea4ebf Bug 1382534 - Use clip-rule instead of fill-rule when calculating the bounding box contribution of an SVG geometry frame inside a clip-path. r=longsonr
MozReview-Commit-ID: 1rAKmp2ET6A

--HG--
extra : rebase_source : 68690f54ea5129863dc5cfb3f4095c22e41409ad
2017-09-25 16:57:39 -04:00
Botond Ballo
af440ad9a2 Bug 1382534 - Account for the local transform in nsSVGClipPathFrame::GetBBoxForClipPathFrame(). r=longsonr
MozReview-Commit-ID: HbZzPkAZy7q

--HG--
extra : rebase_source : 86099814a5fcd7b391c86a471f23337bc345fcdf
2017-09-20 12:39:59 -04:00
Ethan Lin
1da48a5cc4 Bug 1407938 - Part1. Add nsDisplaySVGWrapper for webrender as a fallback display item. r=jrmuizel
MozReview-Commit-ID: LBjrqvPziCJ

--HG--
extra : rebase_source : 4f48e0c57a7170bd1d6e97cc6b426aa0cf81be4b
2017-10-16 15:47:46 +08:00
Daniel Holbert
680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Jonathan Kew
793b63713b Bug 1408612 - patch 1 - Use single-precision floats more consistently for glyph position computations when drawing text. r=jrmuizel 2017-10-24 09:59:09 +01:00
Tyson Smith
88e7d92c38 Bug 1402486 - Add crashtest. r=me 2017-10-12 22:41:14 -04:00
Tyson Smith
7a901b437d Bug 1402124 - Add crashtest. r=me 2017-10-12 22:41:14 -04:00
Tyson Smith
67abfb985c Bug 1402109 - Add crashtest. r=me 2017-10-12 22:41:14 -04:00
Jeff Muizelaar
2bb7fc2c35 Bug 1407356. Use CreateSimiliarDrawTarget for Filters instead of CreateOffscreenTarget. r=mstange
This lets us record and playback filters on the webrender side.
2017-10-12 11:49:31 -04:00
Ryan VanderMeulen
81354b51c1 Bug 1322852 - Add crashtest. r=me
--HG--
extra : rebase_source : e9d276eea5c2652ae6af164a5ff6dd4cc05c15bb
2017-10-11 11:52:39 -04:00
Jonathan Watt
0ed5f27b33 Bug 1402109. Prevent crashes under SVGTextElement methods when the SVG is under non-displayed HTML. r=heycam
Summary:
The implementations of most SVGTextElement methods flush layout when they're
called.  Any SVG <text> that is displayed normally will be reflowed by
SVGTextFrame::ReflowSVG, and any <text> that is in displayed SVG but is not
displayed directly (such as <text> under a <defs>) will be reflowed by
SVGTextFrame::ReflowSVGNonDisplayText.  Prior to this fix the changed
code always assumed that one of these methods would reflow the text.  However,
in the case that the SVG is under an HTML element that isn't itself ever
reflowed (such as if it's under an HTML <caption>) then the SVG text will
not be reflowed either and the invariants of the code are broken.

This patch modifies the functions that implement the SVGTextElement
methods to return an error code if the text has not been reflowed.

Note: I did try to reuse SVGTextFrame::ReflowSVGNonDisplayText in this
case, but I ran into problems.  Given that this is an edge case and likely one
than normal authors will never run into I gave up trying to make that work for
now.

Reviewers: heycam

Bug #: 1402109

Differential Revision: https://phabricator.services.mozilla.com/D107
2017-10-11 10:09:13 +01:00
Robert Longson
0e21ecb9e3 Bug 1398806 - GetCtx and GetNearestViewport should return the nearest svg or symbol element which is now an SVGViewportElement rather than only returning the nearest svg element because a symbol establishes a viewport too. r=dholbert 2017-10-10 07:58:34 +01:00
Nicholas Nethercote
d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Sebastian Hengst
b834f0d177 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 7Ez95T2ivfR
2017-10-07 10:37:39 +02:00
Kyle Machulis
2090426dc0 Bug 1405792 - Remove nsIDOMHTMLIFrameElement r=bz
MozReview-Commit-ID: 1u9C66X8j59

--HG--
extra : rebase_source : 5d87fe933170e32fbb44e24ec843623e143164d2
2017-10-04 20:41:24 -07:00
Catalin Badea
f8162c4bfd Bug 651120 - Remove index argument from content removed/appended/inserted notifications. r=peterv 2017-10-03 11:09:08 +01:00
cku
8d819c132f Bug 1403057 - Early return if the scale vector is zero. r=mstange
MozReview-Commit-ID: 69X5mvG2UIj

--HG--
extra : rebase_source : 245aa5b9e39ce011c2d1c4e18e36a36539d2aad9
2017-10-02 14:38:09 +08:00
Ting-Yu Lin
d944131798 Bug 1404243 Part 3 - Remove refcount for StyleBasicShape, and use UniquePtr to hold it. r=heycam
After StyleBasicShape is set to StyleShapeSource, it's life cycle never go
beyond StyleShapeSource, so I make StyleBasicShape hold by a UniquePtr in
StyleShapeSource.

Also, replace all raw pointers to StyleBasicShape by UniquePtr in all APIs.

MozReview-Commit-ID: 1MfIFjP8TsQ

--HG--
extra : rebase_source : bdbbd47de57e0bc610e37913752ab8413f62588a
2017-09-25 18:50:24 +08:00
Jonathan Watt
6b07b2d402 Bug 1399853 - Identify the ID of the elements involved in SVG reference loops in the Web Console error messages. r=longsonr
MozReview-Commit-ID: 7SOk2pMEezK
2017-09-11 17:02:35 +01:00
Jonathan Watt
862c8e7e8d Bug 1403345, part 4 - Rename nsReferencedElement to dom::IDTracker. r=longsonr
MozReview-Commit-ID: 3cGMHDHEhx0
2017-09-08 10:02:05 +01:00
Jonathan Watt
0d623a1609 Bug 1403345, part 3 - Move nsReferencedElement.h/.cpp to IDTracker.h/.cpp. r=longsonr
MozReview-Commit-ID: Ki6oS79xuhJ

--HG--
rename : dom/base/nsReferencedElement.cpp => dom/base/IDTracker.cpp
rename : dom/base/nsReferencedElement.h => dom/base/IDTracker.h
2017-09-08 10:02:05 +01:00
Sebastian Hengst
cdcf3bf44b Backed out changeset 59252e3229f1 (bug 1403345)
--HG--
rename : dom/base/IDTracker.cpp => dom/base/nsReferencedElement.cpp
rename : dom/base/IDTracker.h => dom/base/nsReferencedElement.h
2017-09-27 10:43:54 +02:00
Sebastian Hengst
ec33e563cc Backed out changeset 1b5d3684ecfb (bug 1403345) 2017-09-27 10:43:49 +02:00
Jonathan Watt
3c6336aaca Bug 1403345, part 3 - Rename nsReferencedElement to dom::IDTracker. r=longsonr
MozReview-Commit-ID: AkNuXab6xQr
2017-09-05 11:17:50 +01:00
Jonathan Watt
462030153c Bug 1403345, part 2 - Move nsReferencedElement.h/.cpp to IDTracker.h/.cpp. r=longsonr
MozReview-Commit-ID: 7yiAaKnXhCq

--HG--
rename : dom/base/nsReferencedElement.cpp => dom/base/IDTracker.cpp
rename : dom/base/nsReferencedElement.h => dom/base/IDTracker.h
2017-09-05 10:45:18 +01:00
cku
4cc191b68d Bug 1402798 - Part 1. Check the type of an SVGPaint object from the correct frame. r=longsonr+218550
mTargetFrame is not a correct one, we should check the SVGStyle of 'frame'
object.

MozReview-Commit-ID: 3UNfbXkICkz

--HG--
extra : amend_source : 9fa5f095881fc3b92329a7d187f4d5926c43fed7
2017-09-26 14:43:14 +08:00
Ting-Yu Lin
90a32588be Bug 1281101 Part 1 - Remove MOZ_ENABLE_MASK_AS_SHORTHAND from layout code. r=cjku
MozReview-Commit-ID: HWq2IOLsflD

--HG--
extra : rebase_source : eb5c3db6e2d88164bcd6a86448c4ad04cd251c93
2017-09-21 17:36:57 +08:00
Jonathan Watt
73e99a04c1 Bug 1405785, part 3 - Document and rename nsSVGRenderingObserver::InvalidateViaReferencedElement to OnNonDOMMutationRenderingChange. r=longsonr
MozReview-Commit-ID: APN6iFoFDbm
2017-09-15 14:54:27 +01:00
Jonathan Watt
54bad67928 Bug 1405785, part 2 - Document and rename nsSVGRenderingObserver::DoUpdate to OnRenderingChange. r=longsonr
MozReview-Commit-ID: 76ImwCiBeX6
2017-09-15 10:01:34 +01:00
Jonathan Watt
bd85d1e036 Bug 1405785, part 1 - Rename nsSVGRenderingObserver::Start/StopListening. r=longsonr
MozReview-Commit-ID: GF9xP8mvuCC
2017-09-14 09:47:19 +01:00
Jonathan Watt
a9811eda2d Bug 1403500, part 1 - Document and do some renaming for SVGObserverUtils' SourceReference. r=longsonr
MozReview-Commit-ID: Hd7uzHltyMl
2017-09-12 09:36:08 +01:00
Hiroyuki Ikezoe
7979b4f2e8 Bug 1400035 - Drop InvalidateFrame() call in SVGGeometryFrame::DidSetStyleContext(). r=jwatt
Now we no longer post InvalidateRenderingObservers change hint during post
traversal.

MozReview-Commit-ID: H3jJ1LKgJyV

--HG--
extra : rebase_source : 96d6bf77e6fc2b4b79882e5c7e5f43e087b56089
2017-09-17 08:21:05 +09:00
Hiroyuki Ikezoe
515e0000d1 Bug 1400035 - Check the frame has opacity animations in nsSVGUtils::CanOptimizeOpacity(). r=jwatt
If the frame has opacity animation, we can't optimize it at all.

MozReview-Commit-ID: JQYiPvSaxEs

--HG--
extra : rebase_source : b344b56793ba93ac2f763a6cc7f16edcf06e8f7a
2017-09-17 07:28:12 +09:00
Sebastian Hengst
9fde47b255 Backed out changeset c863089c7166 (bug 1399853) for changing string texts without altering string ids. r=backout a=backout
MozReview-Commit-ID: 94W0KZjtlbd
2017-09-20 14:55:39 +02:00
Jonathan Watt
4130888dfd Bug 1342951, part 4 - Add a version of SVGTextFrame::GetSubStringLength that can be used independantly of reflow, to avoid sync reflows. r=heycam
MozReview-Commit-ID: CJqUwF3rXP4
2017-09-02 22:22:54 +01:00
Jonathan Watt
f28f0d2890 Bug 1342951, part 3 - Support recording of SVGTextFrame correspondence before reflow. r=heycam
MozReview-Commit-ID: IG2etgpZCHN
2017-09-01 18:07:40 +01:00
Jonathan Watt
341ea5e4f1 Bug 1401356, part 2 - Rename nsSVGEffects to SVGObserverUtils. r=longsonr 2017-08-30 15:58:31 +01:00
Jonathan Watt
0e4feb75d3 Bug 1401356, part 1 - Rename nsSVGEffects.h/.cpp to SVGObserverUtils.h/.cpp. r=longsonr
--HG--
rename : layout/svg/nsSVGEffects.cpp => layout/svg/SVGObserverUtils.cpp
rename : layout/svg/nsSVGEffects.h => layout/svg/SVGObserverUtils.h
2017-08-30 14:14:46 +01:00
Jonathan Watt
1a36a0ba84 Bug 1401154, part 3 - Avoid calling virtual method nsIFrame::IsFrameOfType in nsSVGFilterProperty::DoUpdate. r=longsonr 2017-08-29 14:35:07 +01:00
Jonathan Watt
3db42dd37b Bug 1401154, part 2 - Stop using nsChangeHint_InvalidateRenderingObservers in nsSVGMarkerProperty::DoUpdate and nsSVGPaintingProperty::DoUpdate. r=longsonr
Both nsSVGMarkerProperty::DoUpdate and nsSVGPaintingProperty::DoUpdate call
nsSVGRenderingObserverProperty::DoUpdate which takes care of posting the
nsChangeHint_InvalidateRenderingObservers change hint. There is no need for
these methods to do that again.
2017-08-29 14:18:51 +01:00
Jonathan Watt
73fabce7bf Bug 1401154, part 1 - Avoid calling virtual method nsIFrame::IsFrameOfType in nsSVGRenderingObserverProperty::DoUpdate. r=longsonr 2017-08-29 12:18:51 +01:00
Jonathan Watt
eecfb5b8d6 Bug 1399853 - Identify the ID of the elements involved in SVG reference loops in the Web Console error messages. r=longsonr
MozReview-Commit-ID: 7SOk2pMEezK
2017-08-25 19:11:43 +01:00
Jonathan Watt
107bd0b650 Bug 1399824, part 2 - Always use nsIFrame::AddStateBits instead of manual bit twiddling. r=xidorn
MozReview-Commit-ID: JoEiQQI2kZ5
2017-08-24 12:09:42 +01:00
Jonathan Watt
9d21fb29ff Bug 1399824, part 1 - Always use nsIFrame::RemoveStateBits instead of manual bit twiddling. r=xidorn
MozReview-Commit-ID: KynEge1U4aS
2017-08-24 10:55:28 +01:00
Ting-Yu Lin
2e869d8f3d Bug 1341009 - Add nsReflowStatus::IsEmpty() assertions to all nsIFrame::Reflow() methods and some reflow helpers, and remove unneeded Reset(). r=dholbert
nsReflowStatus::IsEmpty() assertions are added after DISPLAY_REFLOW in the
beginning of the Reflow().

A few Reflow() implementations have Reset() calls at the end which are left
in place by this patch (with an explanatory comment added to each). These
ending Reset()s are only needed for cases where a non-splittable frame
passes its own nsReflowStatus to a child's reflow method. Just in case the
child leaves a "not fully complete" value in the nsReflowStatus, the
non-splittable parent frame must clear out the nsReflowStatus before
returning, so that its own parent doesn't then try to split it.

MozReview-Commit-ID: 6Jj3jfMAqj4

--HG--
extra : rebase_source : e1fe6a775ad97e16a6d7cc224634ff962ccb0fbf
2017-09-13 18:00:25 +08:00
Miko Mynttinen
351756e478 Bug 1359584 - Part 3: Improve nsDisplayItem const correctness and fix surrounding whitespace r=mstange
MozReview-Commit-ID: 3GkWiu6C4Zo

--HG--
extra : rebase_source : 1423442cd723b8a052d183394dc5f5ef272a5272
2017-08-24 17:09:44 +02:00
Miko Mynttinen
ce08697502 Bug 1359584 - Part 1: Move mDisableSubpixelAA to nsDisplayItem r=mstange
MozReview-Commit-ID: 70169AFRmjq

--HG--
extra : rebase_source : 9c46e40700430e8286ab8e5b2f986e660c293101
2017-08-24 14:45:21 +02:00
Jonathan Watt
45e8436173 Bug 1392235, part 2 - Fix AutoReferenceChainGuard to never set/unset state when it breaks a reference chain. r=longsonr
MozReview-Commit-ID: I4y8eNGU0Er
2017-08-22 11:43:15 +01:00
Jonathan Watt
37ee4415b8 Bug 1392235, part 1 - Fix AutoReferenceChainGuard::Reference to flag the guarded frame as in-use. r=longsonr
MozReview-Commit-ID: 2HgAugFnKQ5
2017-08-22 11:43:15 +01:00
cku
7249e683c3 Bug 1385239 - Part 2. Remove aTransform parameter from PaintFilteredFrame. r=mstange
There are two callers of nsFilterInstance::PaintFilteredFrame:
1. nsSVGUtils::PaintFrameWithEffects at [1]
   This function is used while painting a filtered element on a path which
   display item painting is not supported yet, such as drawing elements inside a
   indirect painted SVG object, such as a mask, a clipPath or a gradient object.

   Let's say we have a masked element, which refers to an SVG mask, and there is
   a filtered element inside that SVG mask.
   Using nsFilterInstance::PaintFilteredFrame to paint that filtered frame in
   the mask, we have to pass a gfxContext and a transform matrix to it. The
   transform of the gfxContext 'target' that we pass in consists of a transform
   from the referenced frame, of the masked frame, to the masked frame. We also
   pass in a transform matrix 'aTransform', this matrix contains a transform
   from the the masked frame to the filtered frame in *device units*, which
   means it contains css-to-dev-px scaling factor.

2. nsSVGIntegrationUtils::PaintFilter at [2]
   This function is used by normal display item painting.

   The same, we pass a gfxContext 'context' and a transform matrix 'tm' into
   nsFilterInstance::PaintFilteredFrame. The transform matrix of 'context'
   consists of a transform from the referenced frame, of the filtered frame,
   to this filtered frame, but the scale factor was taken out . The transform
   matrix 'tm' we pass in contains scale transform from the referenced frame to
   the filtered frame in *device unit*.

Inside nsFilterInstance::PaintFilteredFrame, we treat the transform matrix of
'aCtx' and 'aTransform' as parameters we pass in in #2 caller. So it can be
failed in #1. For example, if the filtered frame inside a masked frame has a
translation transform applied, since that translation was put in 'aTransfrom',
but we only use the scale factor of 'aTransform' in
nsFilterInstance::PaintFilteredFrame, translation factor disappears.

In this patch, I unified the definition of parameters of
nsFilterInstance::PaintFilteredFrame:
1. nsFilterInstance::PaintFilteredFrame(aCtx): the transform matrix of aCtx
   should be a transform from the referenced frame to the filtered frame in
   *css units*. Originally, the aCtx we passed in #1 is in device units, which
   should be fixed; the aCtx we passed in #2 does not even include css scaling
   factor, need be fixed too.
2. nsFilterInstance::PaintFilteredFrame(aTransform): this transform matrix
   should contain only scaling factor in device units. And I removed it in the
   end since I found we can get this value easily right inside the callee.

[1]
https://hg.mozilla.org/mozilla-central/file/ef585ac7c476/layout/svg/nsSVGUtils.cpp#l857

[2]
https://hg.mozilla.org/mozilla-central/file/ef585ac7c476/layout/svg/nsSVGIntegrationUtils.cpp#l1114

MozReview-Commit-ID: gRV128NyQv

--HG--
extra : rebase_source : 15d130babd07734c3c36e24e9ea8b5c4e5f7dbbf
2017-08-25 17:51:58 +08:00
cku
eee177002f Bug 1385239 - Part 1. Pass gfxContext, instead of DrawTarget, into nsFilterInstance::PaintFilteredFrame. r=mstange
This change makes the next patch free of doing Matrix to gfxMatrix conversion.

MozReview-Commit-ID: 8K9RNgjZPTw

--HG--
extra : rebase_source : 190a80c2580622b7866ddb4d80a161311e97a2f5
2017-08-25 16:33:33 +08:00
Sebastian Hengst
71854680c0 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-09-08 00:07:48 +02:00
Sebastian Hengst
e64dd558f0 Backed out changeset f574c304f748 (bug 1392235) for asserting during wpt-reftest /css/css-masking-1/clip-path-svg-content/clip-path-recursion-002.svg on Linux. r=backout 2017-09-07 18:38:57 +02:00
Jonathan Watt
3061c75af4 Bug 1392235, part 1 - Fix AutoReferenceChainGuard to flag the guarded frame as in-use. r=longsonr 2017-08-22 11:43:15 +01:00
Jonathan Watt
0298da208b Bug 1342951, part 2 - Allow SVGTextFrame's CharIterator helper to be used before reflow. r=heycam
MozReview-Commit-ID: Hs4uno5RZMu
2017-08-17 16:11:43 +01:00
Jonathan Watt
2ea8ceecdf Bug 1342951, part 1 - Add a method to SVGTextFrame for resolving bi-di before reflow. r=jfkthame
MozReview-Commit-ID: E894iiK1o8T
2017-08-16 12:48:21 +01:00
Jonathan Watt
1c3c1e17ec Bug 1342951 - Revert landing of wrong patch. r=me 2017-08-14 16:01:48 +01:00
Jonathan Watt
3808c49bb5 Bug 1342951 - Limit SVGTextFrame::GetSubStringLength sync reflows to the SVGTextFrame. r=heycam 2017-08-14 16:00:33 +01:00
Manish Goregaokar
7960cd0a4d Bug 1397363 - stylo: Update crashtest expectations; r=orange
MozReview-Commit-ID: 6yYiGcZ7n3E
2017-09-06 23:24:53 -07:00
Chris Peterson
9705687227 Bug 1324677 - Remove unnecessary asserts-if(stylo) annotation from layout crashtests. r=heycam
These tests no longer assert so we can remove the stylo annotations.

MozReview-Commit-ID: 7sWWTkoFp1G

--HG--
extra : rebase_source : e42f418ef1756a08bc0f11b02b42b2a1737deb76
2017-09-05 19:13:18 -07:00
cku
c4131f69bd Bug 1396776 - Move mCanvasTM from the sub classes of nsSVGDisplayContainerFrame to nsSVGDisplayContainerFrame. r=longsonr+218550
All classes which have mCanvasTM declared as a member object are inherited from
nsSVGDisplayContainerFrame. We should just declare a protected member in the
base class and then remove mCanvasTM and duplicated implementaion of
GetCanvasTM & NotifySVGChanged in those derived classes.

MozReview-Commit-ID: 8f8EgFNEXHJ

--HG--
extra : rebase_source : 593e16d7b701061ca37b8ca8a6fe1de2292ea62d
2017-09-05 17:26:46 +08:00
cku
9dc19aee6f Bug 1396025 - Write a comment to explain the difference between eBBoxIncludeFill/eBBoxIncludeStroke and eBBoxIncludeFillGeometry/eBBoxIncludeStrokeGeometry. r=jwatt
MozReview-Commit-ID: LD7uMh3D8vs

--HG--
extra : rebase_source : 7bc67938076547e712c57257d70ba217c8e7920c
2017-09-02 01:31:57 +08:00
cku
f1fd114ae6 Bug 1396489 - Part 3. Use gfxContext::GetClipExtents(false) when clipped rect in device space is needed. r=mstange
MozReview-Commit-ID: YO4JACFK9O

--HG--
extra : rebase_source : 068eb69d634cfc5150d7cb864c366e719a025859
2017-09-04 14:04:17 +08:00
Phil Ringnalda
e761d397b7 Backed out 3 changesets (bug 1396489) for unexpected assertion failures
Backed out changeset 75ffa3ed13d5 (bug 1396489)
Backed out changeset fc779b639aeb (bug 1396489)
Backed out changeset dcfd73044bba (bug 1396489)

MozReview-Commit-ID: DvGlDLZF2nO
2017-09-04 21:09:04 -07:00
cku
afd9919b06 Bug 1396489 - Part 3. Use gfxContext::GetClipExtents(false) when clipped rect in device space is needed. r=mstange
MozReview-Commit-ID: YO4JACFK9O

--HG--
extra : rebase_source : afd9cb051e35856070e3451215e4bba79396af7e
2017-09-04 14:04:17 +08:00
cku
0baa0bf5c4 Bug 1395439 - Clean out useless flags to reuse cache FillGeometry in nsSVGUtils::GetBBox. r=longsonr+218550
In nsSVGUtils::GetBBox, we cache fill-gemorty's bbox in ObjectBoundingBoxProperty
of the given frame[1] so that we can just return the cache value without
recomputing bbox. Some new added flags, such as eUseFrameBoundsForOuterSVG,
prevent storing and reusing this cache value. This patch is trying to make this
cache mechanism work again.

[1]
https://hg.mozilla.org/mozilla-central/file/ef585ac7c476/layout/svg/nsSVGUtils.cpp#l1119

MozReview-Commit-ID: 8vWDzFi8qCw

--HG--
extra : rebase_source : 07725c856f77f95717f16e61a9838393b09f5789
2017-08-31 12:21:39 +08:00
cku
57060b7222 Bug 1361639 - Part 3. Remove unused EffectOffsets::offsetToBoundingBoxInDevPx. r=longsonr+218550
MozReview-Commit-ID: DRdA5FAeu4Q

--HG--
extra : rebase_source : 569eab61de332467ef8ec4d5d07c2e38ecda1737
2017-08-30 11:25:39 +08:00
cku
c13c8d4e5e Bug 1361639 - Part 1. Depend on input flag, return bbox of an <use> element in different coordinate system. r=longsonr+218550
When nsSVGUtils::getBBox is called on <use> element:
1. Call from SVGGraphicsElement::getBBox(WebAPI):
   According to the spec, getBBox should return the bbox as the union box of
   children in user space.
2. Call from mask/ clip-path or filter painting:
   Since we want to paint those elements in the coordinate space formed by
   <use>(bug 537623), getBBox should return the bbox as the union box of
   children in coordinate system of <use>.

Depend on the use case, we return the bbox of an <use> element on different
coordinate system. In this patch, I bring in a new
flag(eInUserSpaceOfUseElement) so that nsSVGUtils::getBBox can return bbox on
different coordinate system accordingly.

MozReview-Commit-ID: FfZalTI8J0y

--HG--
extra : rebase_source : c33e980c00c450792b30f60f6aa01b53e1c5595c
2017-08-29 20:41:45 +08:00
Ehsan Akhgari
ebaa749322 Bug 1394191 - Remove unneeded nsContentList.h includes from layout; r=dholbert 2017-08-29 07:29:11 -04:00
Bobby Holley
8fb4fb3d6c Bug 1393791 - Stop unbinding native-anonymous content off a script runner. r=emilio
The failure mode in the attached crashtest is an inconsistency in the flattened
tree. Specifically, we null out mVideoControls in an nsVideoFrame, but defer
the UnbindFromTree call on that NAC element, which measn that its mParent still
points to the nsVideoFrame's mContent. Because all this stuff runs off of script
runners, and the anonymous content destroyer is not guaranteed to run before
other potential script runners, we end up running arbitrary script while the
tree mismatch exists. This script calls back into ProcessPendingRestyles, which
causes trouble.

We could build a separate deferral mechanism, but it's not clear that we actually
need to defer the unbind anymore. The deferred unbind was added in bug 489008,
which predated a lot of simplifications in layout/dom interaction.

MozReview-Commit-ID: 1JYAhiXKVJC
2017-08-27 15:29:36 -07:00
Bobby Holley
9631dd3e22 Bug 1393791 - Move SVG Use anonymous content to the frame. r=emilio
This brings it into alignment with what everything else does.

MozReview-Commit-ID: 2A9p8umHnKi
2017-08-27 15:29:32 -07:00