Commit Graph

3209 Commits

Author SHA1 Message Date
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
Bobby Holley
d3e80c057b Bug 1393791 - Hoist nsSVGUseFrame into a header. r=emilio
MozReview-Commit-ID: FcD2Nh7zcRO
2017-08-27 15:28:03 -07:00
Bobby Holley
a61ee7166e Bug 1394156 - Make static_casts of mContent use GetContent(). r=emilio
This was done with: perl -pi -e 's/\(mContent\)/\(GetContent\(\)\)/g' *.cpp

MozReview-Commit-ID: 7ugPKf5ypGw
2017-08-27 10:45:59 -07:00
cku
842790520f Bug 1390088 - Part 3. Declare some locale nsSVGLength2 references as const in nsSVGOuterSVGFrame.cpp. r=jwatt
This patch has no direct relation with this bug. When tracing the code, I noticed
those local nsSVGLength2 variables can be declared as const reference.

MozReview-Commit-ID: 6gkdlpv8W7H

--HG--
extra : rebase_source : 0b875b0a375e9254eec3d1c569274fae8edfdcfe
2017-08-21 16:25:24 +08:00
cku
c0dea4d930 Bug 1390088 - Part 1. Change the type of the parameter of nsSVGLength2::GetAnimValue from "SVGSVGElement*" to "SVGViewportElement*" r=jwatt
There are two overloads of nsSVGLength2::GetAnimValue:

1. float nsSVGLength2::GetAnimValue(nsSVGElement*) const;
2. float nsSVGLength2::GetAnimValue(SVGSVGElement*) const;

In Bug 265894, I created SVGViewportElement as a base class of SVGSVGElement.
SVGSVGElement::GetViewBoxTransform was moved to SVGViewportElement in that
refactoring. The local variable 'ctx' in that function was changed from
SVGSVGElement to SVGViewportElement, which when passed to
nsSVGLength2::GetAnimValue caused us to switch from calling the overload that
takes a SVGSVGElement to the overload that takes a nsSVGElement, which is not
what we want.

This patch changes the argument type of the nsSVGLength2::GetAnimValue overload
that takes an SVGSVGElement to take an SVGViewportElement instead, which causes
the GetAnimValue(ctx) calls in SVGViewportElement::GetViewBoxTransform to call
the correct GetAnimValue overload again.

MozReview-Commit-ID: 2cmgIoltYfY

--HG--
extra : rebase_source : b45282cc492cf067ecc3935b03cde243a69ef2b5
2017-08-21 16:19:31 +08:00
Louis Chang
1a9594b12b Bug 1385745 Part 1 - Add BBoxFlags::eIncludeOnlyCurrentFrameForNonSVGElement to determine whether include all continuations while computing bbox of a html frame. r=cjku,heycam
MozReview-Commit-ID: Fx11LjhBcrM

--HG--
extra : rebase_source : 6a46553d77f940186d4e7ff2c744b1ccd19e3dad
2017-08-17 09:52:17 +08:00
cku
4949667cbb Bug 1318266 - Enable paint clip-path on mask layer. r=me.
MozReview-Commit-ID: 9nLdsiI4WU4

--HG--
extra : rebase_source : e81145aa439bf30f2e5f3cce369a44c3958404f1
2017-08-18 15:14:17 +08:00
Wes Kocher
5a4357c768 Merge inbound to central, a=merge
MozReview-Commit-ID: GArkKmOFIVH
2017-08-11 13:15:33 -07:00
cku
5423caf93e Bug 1389068 - Add comment for GetPreEffectsVisualOverflow. r=louis
MozReview-Commit-ID: JYFox2ADAM6

--HG--
extra : rebase_source : 7f92f0cbcbc18b326fdee5025f17b85dac3142ff
2017-08-10 21:08:11 +08:00
Jonathan Kingston
90991b9e6e Bug 1388907 - Add @mozilla.com and @testpilot- extension identifiers for SVG context-fill icons. r=jwatt
MozReview-Commit-ID: 7yHdgNfsrTc

--HG--
extra : rebase_source : 40601e03b5f214dc691aedc16c66e575d44456ae
2017-08-10 01:19:14 +01:00
cku
5be215b9d0 Bug 1385861 - Part 4. Reduce usage of SetMatrix in SVGTextFrame::PaintSVG. r=mattwoodrow
In while-loop [1],
1. The first SetMatrix call that I remvoed in this patch is totally useless,
we can just pass initialMatrix to contextPaint, instead of set initialMatrix
to aContenxt and read back from aContext and then pass it to contextPaint.

2. This function, SVGTextFrame::PaintSVG, is the only caller of
SetupStrokeGeometry, and it does not need SetupStrokeGeometry to setup matrix at
all, since it will be overwritten the transform matrix of aContext at several
lines below[2].

[1]
https://hg.mozilla.org/mozilla-central/file/5115e2dea29a/layout/svg/SVGTextFrame.cpp#l3658
[2]
https://hg.mozilla.org/mozilla-central/file/5115e2dea29a/layout/svg/SVGTextFrame.cpp#l3685

MozReview-Commit-ID: AlKQh4abbpa

--HG--
extra : rebase_source : e0dfd66ff25be0d7cffadecf9e3333bba10cff9b
2017-07-31 20:47:39 +08:00
cku
bd1d92639d Bug 1385861 - Part 3. Rename nsSVGUtils::SetupCairoStrokeGeometry as nsSVGUtils::SetupStrokeGeometry. r=mattwoodrow
(This patch is not relative to performance)

Rename this function since it has not relation with cario at all.

MozReview-Commit-ID: DHvrsVZAJ7B

--HG--
extra : rebase_source : 4994c9058bd93c7d6671e57ce7f204185e679a1a
2017-07-31 20:20:28 +08:00
cku
dbcc86a392 Bug 1385861 - Part 2. Save the state of input context in SVGTextFrame::PaintSVG only when need. r=mattwoodrow
Unless we need to draw stroke of glyphs, which will change the state of the
target context, we only need to save & restore transform matrix of the target
context.

MozReview-Commit-ID: LLKnxrKrDaT

--HG--
extra : rebase_source : 1226c48d283a04cb0ea6959f12fd6938fece49d2
2017-07-31 20:17:06 +08:00
cku
fbf32edd9e Bug 1385861 - Part 1. Remove redundant gfxContext::Save/Restore in nsDisplaySVGText::Paint. r=mattwoodrow
nsDisplaySVGText::Paint calls SVGTextFrame::PaintSVG, and we already save/restore
context state in SVGTextFrame::PaintSVG.

I also filed Bug 1385929 to find a solution to prevent duplicated
gfxContext::Save/Restore.

MozReview-Commit-ID: 4WxdFZzvmvF

--HG--
extra : rebase_source : 752d5d027776538edc1ab043ad2e90e1de22a079
2017-07-31 17:36:06 +08:00
Matt Woodrow
40f5b92e3b Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Sebastian Hengst
8257b2d113 Backed out changeset 8f2dd8f13b53 (bug 1388161) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:21 +02:00
Matt Woodrow
a3a130b6ff Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Kevin Hsieh
0397c306ab Bug 1322537 - Increase tolerance when splitting Bezier curves to prevent hang. r=bas
MozReview-Commit-ID: 3qhj9He65Bh

--HG--
extra : rebase_source : 63f37c20bec61aa21dbf6ff539a9b967a0703810
2017-07-28 23:57:04 -07:00
Kyle Machulis
d812ac4e87 Bug 1279218 - Additional applet tag logic removal; r=bz
I've been having problems with interdiffs on mozreview lately, so for
ease of review, this patch is being submitted as a seperate patch for
review. Once it is r+'d, it will be folded into the first patch in
this set before landing.

MozReview-Commit-ID: CS9MngaXlBd

--HG--
extra : rebase_source : 6a86fd4f7a66e73497a756976a2562d183002a2a
2017-07-28 16:44:39 -07:00
Manish Goregaokar
e632c1393e Bug 1383492: stylo: Change nscoord_MAX to 1<<30 - 1 ; r=emilio,dbaron
nscoord_MAX is (1<<30) so that we can check for overflow *after* adding
two nscoords. However, (nscoord_MAX + nscoord_MAX) will still overflow.
Subtracting one makes this no longer possible.

MozReview-Commit-ID: BtbQRMp5kWm
2017-07-27 18:57:32 -07:00
Wes Kocher
18f09001d3 Backed out 4 changesets (bug 1341102, bug 1383492) for windows build bustage and crashtest assertions a=backout CLOSED TREE
Backed out changeset 1c4310082e35 (bug 1341102)
Backed out changeset 849c109d96b4 (bug 1341102)
Backed out changeset 11cadad891a4 (bug 1383492)
Backed out changeset b4dfcf4f795e (bug 1383492)

MozReview-Commit-ID: 4bDAPgiaepG
2017-07-26 18:09:45 -07:00
Manish Goregaokar
210c009a85 Bug 1341102: Fix bustage on a CLOSED TREE; r=bustage
MozReview-Commit-ID: Ho2PNnBhR3M
2017-07-26 17:06:56 -07:00
Manish Goregaokar
196d78a2ab Bug 1383492: stylo: Change nscoord_MAX to 1<<30 - 1 ; r=emilio,dbaron
nscoord_MAX is (1<<30) so that we can check for overflow *after* adding
two nscoords. However, (nscoord_MAX + nscoord_MAX) will still overflow.
Subtracting one makes this no longer possible.

MozReview-Commit-ID: BtbQRMp5kWm
2017-07-26 15:59:52 -07:00
cku
14c2482fbe Bug 1301245 - Part 3. Resolve a style image if nsSVGPaintingProperty can not handle it. r=heycam
MozReview-Commit-ID: 9m7yJ4CgCvr

--HG--
extra : rebase_source : 3f0fa1a7ead8ca5ac595e1a5d3cf15bf555291e7
2017-07-26 12:02:44 +08:00
cku
321461fb26 Bug 1301245 - Part 2. Do not resolve a style image if the given url has a fragment. r=heycam
MozReview-Commit-ID: 18LFjlWZBLl

--HG--
extra : rebase_source : afbba14c09f937340bd506859cbcc829100f9e8d
2017-07-26 11:21:30 +08:00
cku
5acc1499f0 Bug 1383791 - Download an SVG resource only if the mask URL consists of a fragment. r=heycam
MozReview-Commit-ID: OT6ipv3qSj

--HG--
extra : rebase_source : 295f3de7ece6aaa2473d7efc376de078419f3e10
extra : source : cb4b39a80923ff50dc6b4c3dc0b9ff9c508e5b48
2017-07-19 19:45:34 +08:00
Louis Chang
29abcbcdde Bug 1319407 - Apply clip-path to each frame when box-decoration-break is clone. r=cjku,heycam
MozReview-Commit-ID: E7IR49MzkWm

--HG--
extra : rebase_source : 79f482236ad377948f94a69e2648d07a24a49e2b
2017-07-24 11:14:47 +08:00
Andrew Osmond
8a1d7d4bf1 Bug 1359833 - Part 7. nsImageLoadingContent native observers should use the new API. r=tnikkel 2017-07-19 14:15:12 -04:00
Jared Wein
728dbbc41f Bug 1379464 - Enable context-paint for mozilla-created webextensions. r=heycam,kmag
MozReview-Commit-ID: BAuDi4hj1G1

--HG--
extra : rebase_source : 0a325208cb53b80f21964135b2446ab2f2c44bf3
2017-07-10 13:34:41 -04:00
Sylvestre Ledru
4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Kartikaya Gupta
4826f32d87 Bug 1377169 - Turn gfxRect into a typedef. r=jrmuizel
One thing to note here is that the Scale function on gfxRect has a
different implementation than that in gfx::Rect which is replacing it.
The former just scales the width/height directly whereas the latter
scales the XMost/YMost and recomputes the width/height.

MozReview-Commit-ID: 5FImdIaNfC3

--HG--
extra : rebase_source : 98662d2a52ff9652ec60b066641a07c6d5ee8e08
2017-07-05 11:22:00 -04:00
Kartikaya Gupta
cad9534e69 Bug 1377090 - Turn gfxMatrix into a typedef for MatrixDouble. r=jrmuizel
Most of this patch is updating a few places that use gfxMatrix to use
the equivalent-but-differently-named functions on MatrixDouble:
- Translate/Rotate/Scale get turned into PreTranslate/PreRotate/PreScale
- Transform(Point) gets turned into TransformPoint(Point)
- gfxMatrix::TransformBounds(gfxRect) gets turned into
  gfxRect::TransformBoundsBy(gfxMatrix).
- gfxMatrix::Transform(gfxRect) gets turned into
  gfxRect::TransformBy(gfxMatrix).
The last two functions are added in this patch as convenience wrappers
to gfxRect instead of Matrix.h because we don't want Matrix.h to "know"
about gfxRect (to avoid adding gecko dependencies on Moz2D). Once we
turn gfxRect into a typedef for RectDouble these will be eliminated
anyway.

MozReview-Commit-ID: BnOjHzmOSKn

--HG--
extra : rebase_source : cf1692d1f0d44a4b05d684a66678739181a426d5
2017-07-05 11:18:49 -04:00
Kartikaya Gupta
1c54bb2347 Bug 1377090 - Make the Matrix class templated so we can instantiate it with a double type. r=bas
This extracts a BaseMatrix template of which Matrix is now a particular
specialization. The BaseMatrix allows us to reuse the same code for
floats and doubles, much like the other "base" classes (BasePoint,
BaseRect, etc.).

MozReview-Commit-ID: HO7bA83S9E0

--HG--
extra : rebase_source : dcd84d9a978cdea00bb54eb11eefcca9c6635901
2017-07-05 11:18:48 -04:00
Ehsan Akhgari
42cecdc81e Bug 1378044 - Switch the SVGImageContext::Hash() hashing code to use PLDHashNumber; r=dholbert 2017-07-04 11:08:28 -04:00
Kartikaya Gupta
7332c6da98 Bug 1376782 - Replace gfxSize with a typedef to SizeDouble. r=jrmuizel
Most of the changes in this patch are just using the explicit
constructor from gfx::IntSize to gfx::Size, since gfxSize did
that implicitly but gfx::Size doesn't.

MozReview-Commit-ID: CzikGjHEXje

--HG--
extra : rebase_source : 9d19977f2a774d9a2a653db923553a6c2e06f82a
2017-06-28 11:41:21 -04:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Florian Quèze
66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Carsten "Tomcat" Book
8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Jonathan Watt
4dbb614775 Bug 1365189, part 1 - Prevent SVG elements that are neither displayable nor paint servers from painting. r=dholbert
MozReview-Commit-ID: 97Q9PN4eUBw
2017-06-06 17:04:37 +01:00
Bill McCloskey
6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Wes Kocher
c0e1236f1a Merge autoland to m-c a=merge
MozReview-Commit-ID: LFtpTAueYrF
2017-06-20 18:24:29 -07:00
Jonathan Watt
b3ab3e52a0 Bug 1374614 - Support SVG image context paint in XUL tree views (treecol etc.). r=dholbert
MozReview-Commit-ID: LltEP7gTCgq
2017-05-26 14:24:57 +01:00
Carsten "Tomcat" Book
ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey
4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Cameron McCormack
139e81fb2f Bug 1364361 - Part 1: Refactor frame anon box restyling machinery so it can return a list of anon boxes. r=bholley,bz
MozReview-Commit-ID: 3InVAUw8djN
* * *
Bug 1364361 - Followup to address review comment. r=me

MozReview-Commit-ID: IpdoSon9MAj

--HG--
extra : rebase_source : 086c49319d3847099614d65c8bb9d924f4e9be38
2017-06-16 17:22:33 +08:00
Sebastian Hengst
9365133d05 Backed out changeset e7ec499159f7 (bug 1364361) for bustage at nsIFrame.h:3348: bad implicit conversion constructor for 'OwnedAnonBox'. r=backout 2017-06-16 11:19:03 +02:00
Cameron McCormack
b76836a0c6 Bug 1364361 - Part 1: Refactor frame anon box restyling machinery so it can return a list of anon boxes. r=bholley,bz
MozReview-Commit-ID: 3InVAUw8djN
* * *
Bug 1364361 - Followup to address review comment. r=me

MozReview-Commit-ID: IpdoSon9MAj

--HG--
extra : rebase_source : 8a6a9b88d678c52be8fa6f64b2664a08634a4a98
2017-06-16 15:32:40 +08:00
Sebastian Hengst
fe67a32efc Backed out changeset 12db2d364b64 (bug 1364361) for heap write hazard. r=backout 2017-06-16 09:27:42 +02:00
Cameron McCormack
eaf366ae43 Bug 1364361 - Part 1: Refactor frame anon box restyling machinery so it can return a list of anon boxes. r=bholley,bz
MozReview-Commit-ID: 3InVAUw8djN

--HG--
extra : rebase_source : 83d5e20a9ec92a35c015386828b0c53c6c4eaeb5
2017-05-22 13:14:32 +08:00
cku
fcb007d125 Bug 265894 - Part 8. Implement -moz-use-shadow-tree-root pseudo class. r=heycam
The spec said:
The generated instance of a ‘symbol’ that is the direct referenced element of a
‘use’ element must always have a computed value of inline for the display
property. In other words, it must be rendered whenever the host ‘use’ element is
rendered.

We use -moz-use-shadow-tree-root pseudo class to achieve this requirement.

MozReview-Commit-ID: 1ReJjmjxq6G

--HG--
extra : rebase_source : b4d267792dd6d69f7d5336c5ed33a0fc60e97b9e
2017-06-14 22:51:56 +08:00
cku
5719863244 Bug 265894 - Part 7. Do not convert symbol element into svg element. r=heycam
Since we already have nsSVGSymbolFrame, there is no need to leverage svg element
for rendering symbol element in use-element shadow tree, remove conversion code.

MozReview-Commit-ID: GmGLZ7Az6Gb

--HG--
extra : rebase_source : 897a1fb7b34bb3aa3babe99b7199e7f002d59e6b
2017-06-14 21:57:09 +08:00
cku
48694e2258 Bug 265894 - Part 5. Implement nsSVGSymbolFrame to layout symbol element. r=heycam
MozReview-Commit-ID: 6TTVvFgsRsQ

--HG--
extra : rebase_source : eae070036a70781b2cd80566eb572676e96ee9c2
2017-06-14 21:40:59 +08:00
cku
e6c91df011 Bug 265894 - Part 3. Implement nsSVGViewportFrame, and let nsSVGInnerFrame inherit from it. r=heycam
MozReview-Commit-ID: 9lME1xiNhhY

--HG--
extra : rebase_source : 11fdaa7b21f4647a7ce6b8834b43504977bc58a8
2017-06-14 21:05:37 +08:00
cku
f9701e84eb Bug 265894 - Part 2. Implement SVGViewportElementBase, and let SVGSVGElement inherit from it. r=heycam
MozReview-Commit-ID: I6BIgEMhN6Q

--HG--
extra : rebase_source : 8e0e18914fc061532e853d2d3347e924d244b212
2017-06-14 20:38:10 +08:00
Alexis Beingessner
adb013669b Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Sebastian Hengst
f3bf820bfd Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner
c75211cb95 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04:00
Robert Longson
63dda1e1dc Bug 1371973 - Remove SVGTextFrame::TransformFrameRectToTextChild and nsSVGUtils::GetNearestSVGViewport as they have no callers. r=heycam 2017-06-11 12:26:09 +01:00
Jeff Muizelaar
cf6d4425f4 Bug 1359527. Fixup DrawTarget::IntoLuminance mismerge. r=mchang
This adds back the NEON code and fixes up a couple of other pieces
2017-06-09 10:57:44 -04:00
Robert Longson
d0467bd4b4 Bug 1361593 - Simplify nsSVGMarkerFrame by storing the transform matrix rather than all the parameters necessary to calculate it. r=jwatt 2017-06-08 06:17:07 +01:00
Mason Chang
1520cb158b Bug 1359527. Part 1 - Add DrawTarget::IntoLuminance r=jrmuizel 2017-06-02 11:13:36 -07:00
Robert Longson
f6ca0ae2b1 Bug 1370449 - Simplify SVGTextDrawPathCallbacks by passing in data that more closely matches what it uses. r=heycam 2017-06-07 20:38:59 +01:00
Mats Palmgren
9496a58997 Bug 1370116 - Use the correct ancestor frame (i.e. |this|) of aFrame for checking NS_STATE_SVG_CLIPPATH_CHILD. r=longsonr
MozReview-Commit-ID: 7YK7a7RLNq5
2017-06-07 15:22:41 +02:00
L. David Baron
53383e2d5c Bug 1369260 - Remove use of MOZ_ASSERT_IF in layout. r=heycam
As I've said before, as module owner I prefer that MOZ_ASSERT_IF not be
used in the module because I consider it to be unreadable.  However, a
few uses have crept in, and this patch removes them.

I consider it to be unreadable because the name looks like a name that
uses smalltalk-ish naming conventions, i.e., with a part of the name
corresponding to each parameter, in order.  However, the parameters are
in the order opposite the name.

This was written primarily with the vim commands:
:%s/MOZ_ASSERT_IF(\([^,]*\),/MOZ_ASSERT(!\1 ||/
:wn
followed by manual cleanup for indentation and removal of !!.

MozReview-Commit-ID: G6rLbOn7k8d
2017-06-06 22:27:17 -07:00
Jonathan Watt
2642ec495c Bug 1365926, part 1 - Support 'context-fill-opacity'/'context-stroke-opacity' as SVG-as-an-image context properties. r=heycam
MozReview-Commit-ID: 2YHjwCB02jV
2017-05-18 12:47:20 +01:00
Jeremy Chen
66780bc3e6 Bug 1340561 - fix comment for the re-enabled svg crashtest. comment-only, no review, DONTBUILD
This test has been re-enabled for stylo in bug 1342596, but the comment
is somehow left.

MozReview-Commit-ID: BDbJGSCz8io
2017-05-29 21:58:12 +08:00
Phil Ringnalda
16b90e808a Backed out changeset e12fa325e112 (bug 1359527) for Win8 masking reftest failures
MozReview-Commit-ID: 5ecOfTu606d
2017-05-28 15:45:42 -07:00
Mason Chang
981bccddf0 Bug 1359527. Add DrawTarget::IntoLuminance. r=jrmuizel,Bas
This lets us use the luminance effect with Direct2D to avoid
having to read back. It will also let us avoid reading back
with DrawTargetRecording.
2017-05-28 15:35:14 -04:00
Jonathan Kew
a8f81efd8e Bug 1365982 - Attach frame properties to each frame instead of looking them up in a hashtable on the prescontext. r=mats
--HG--
rename : layout/base/FramePropertyTable.cpp => layout/base/FrameProperties.cpp
rename : layout/base/FramePropertyTable.h => layout/base/FrameProperties.h
2017-05-27 12:36:00 +01:00
cku
b533c4c2ae Bug 1362000 - (followup) remove unused headers. r=me
MozReview-Commit-ID: 4SO8tdhbIHt

--HG--
extra : rebase_source : 7abc0bddf356bc705b130ea15294f8c5036f6ccf
2017-05-27 16:57:44 +08:00
Sebastian Hengst
d8e719c8a3 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: CEadD9RweN4
2017-05-27 10:00:59 +02:00
Jeff Muizelaar
783be16285 Bug 1367147. Draw alpha masks to A8 surfaces and use them directly. r=jwatt
This can keep things on the GPU and makes it better for recording surfaces.
2017-05-26 22:32:24 -04:00
Ryan VanderMeulen
75fa1fd85f Merge inbound to m-c. a=merge 2017-05-26 15:43:59 -04:00
cku
082f6c2f30 Bug 1362000 - When the position of masked frame changed, always regenerate mask layer if any of maskUnits/maskContentUnits/clipPathUnits is userSpaceOnUse. r=cjku
For SVG mask/clipPath, comparison at [1] is not enough to detect whether cached
mask layer is reusable duriang animation. Since aMaskItem->IsInvalid() may keep
return fasle during OMTA. Bring in new condition check in
CSSMaskLayerUserData::IsMaskReusable..

I do not create a reftest for this bug, the reason is almost the same with bug
1350663.

So I manually verified paiting result by visit this three pages:
 https://codepen.io/tadeuszwojcik/pen/ZKJwRE
 https://codepen.io/tadeuszwojcik/pen/oWexWW
 http://codepen.io/iiroullin/pen/oWEOOM

[1] https://hg.mozilla.org/mozilla-central/file/2bc714f86791/layout/painting/FrameLayerBuilder.cpp#l3887

MozReview-Commit-ID: 7lUKTMYPFXo

--HG--
extra : rebase_source : c3e4d7b9df0c335222f09d7ce7d6918c7dbad00e
extra : source : 4717af028474a700a2b7e81eecae142f2ab82ff1
2017-05-12 20:17:14 +08:00
Mats Palmgren
154f4890bf Bug 1362886 part 2 - Devirtualize the IsLeaf() method by doing an array lookup instead. r=jfkthame
MozReview-Commit-ID: 1zm9rFhRVZ3
2017-05-26 12:11:12 +02:00
Mats Palmgren
a254b64145 Bug 1364805 part 4 - Remove the now unused LayoutFrameType values from the ctors. r=jfkthame
MozReview-Commit-ID: 1RSDoc3pQXf
2017-05-26 12:11:11 +02:00
Mats Palmgren
1242172259 Bug 1364805 part 2 - Add a nsIFrame::mClass field and propagate the concrete class' value up the ctor chain. r=jfkthame
nsIFrame::mClass is of type enum class nsQueryFrame::ClassID which is
a strict subset of the nsQueryFrame::FrameIID values.  For a concrete
frame class, its FrameIID is the same numeric value as its ClassID.

MozReview-Commit-ID: 1N0AkCGo1ol
2017-05-26 12:11:11 +02:00
Mats Palmgren
ec6b1ef065 Bug 1364805 part 1 - Make every concrete frame class be a NS_DECL_QUERYFRAME_TARGET. r=jfkthame
MozReview-Commit-ID: Gy9gcEYupeY
2017-05-26 12:11:11 +02:00
Ryan VanderMeulen
25cb66b774 Merge m-c to autoland on a CLOSED TREE. a=merge 2017-05-26 15:45:41 -04:00
cku
0fa11bffa0 Bug 1362000 - (follow-up) Simplify match logic in CSSMaskLayerUserData::operator==. r=mstange
Remove HasUserSpaceOnUseUnitsMaskOrClipPath since it's not necessary.
MozReview-Commit-ID: 2sen23m5GjE

--HG--
extra : rebase_source : fe15fc807daf79f6f2175224928a1d83736cf85b
2017-05-27 01:38:54 +08:00
Timothy Nikkel
c8ba76db41 Bug 1366875. Apply the same sync decoding heuristic to SVG <image> as we do to HTML <img>. r=mats
--HG--
rename : layout/svg/nsSVGImageFrame.cpp => layout/svg/nsSVGImageFrame.h
2017-05-23 14:11:13 -05:00
Ryan VanderMeulen
22d214ae4b Merge autoland to m-c. a=merge 2017-05-23 10:32:42 -04:00
Mats Palmgren
297b9d70e1 Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz
MozReview-Commit-ID: IbwWM0FL6HF

--HG--
extra : source : bbb688fe1ba3f5201a190c6e25b693ef7272ea2d
2017-05-21 17:15:00 +08:00
Carsten "Tomcat" Book
00d4ea331d Backed out changeset bbb688fe1ba3 (bug 1365614) 2017-05-22 15:45:31 +02:00
Mats Palmgren
e706869580 Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz 2017-05-21 17:15:00 +08:00
Robert Longson
00985268d8 Bug 1240275 - Support SVG 2 radialGradient fr attribute. r=cam r=peterv (see comment 16) 2017-05-23 07:15:02 +01:00
Wes Kocher
76ed70ac15 Backed out changeset 6eabcbe4f0a1 (bug 1240275) for win64 reftest failures in radialGradient-fr-02.svg a=backout
MozReview-Commit-ID: 1rJZeqPUykw
2017-05-22 15:26:29 -07:00
Robert Longson
941e4c568e Bug 1240275 - Support SVG 2 radialGradient fr attribute. r=cam r=peterv (see comment 16) 2017-05-22 19:31:37 +01:00
Wes Kocher
90573b0612 Merge m-c to autoland, a=merge
MozReview-Commit-ID: FYdNNRDmEla
2017-05-18 17:21:30 -07:00
cku
4790d4da73 Bug 1351440 - Part 4. Pass imgDrawingParams to nsSVGPaintServerFrame::GetPaintServerPattern. r=jwatt
The reason of this change is the same as for Part 2, except that this commit fixes
nsSVGPaintServerFrame::GetPaintServerPattern rather than PaintSVG.

Commit-ID: 691YrKZ0Lm9
MozReview-Commit-ID: KSnFhCndFUk
2017-05-18 22:03:50 +02:00
cku
51288e6cfe Bug 1351440 - Part 3. Pass imgDrawingParams to nsSVGMaskFrame::GetMaskForMaskedFrame. r=jwatt
The reason of this change is the same as for Part 2, except this commit fixes
nsSVGMaskFrame::GetMaskForMaskedFrame rather than PaintSVG.

MozReview-Commit-ID: DS0eG6eKDgs
2017-05-18 22:03:45 +02:00
cku
d85d3ab378 Bug 1351440 - Part 2. Encapsulate DrawResult and imgIContainer::FLAG_* into imgDrawingParams, and pass it to PaintSVG. r=jwatt
The DrawResult return was not in fact anything to do with the success or
failure of that method, but was actually passing out a very specific piece of information
about the success or failure of any imagelib drawing that may not have occurred
under the various PaintSVG calls.

The signature of PaintSVG is changed from
  DrawResult PaintSVG(...., uint32 flags);
to
  void PaintSVG(...., imgDrawingParams& aPackage);

imgDrawingParams wraps DrawResult and imgIContainer::FLAG_* as a pack, pass through
PaintSVG to imagelib draw calls under beneath.

MozReview-Commit-ID: IOq2evUAOQF
2017-05-18 22:03:41 +02:00
Sebastian Hengst
41f1727bf4 Backed out changeset f3460d42d23c (bug 1351440) 2017-05-18 21:15:35 +02:00
Sebastian Hengst
635d32e534 Backed out changeset 3240cd94bf4b (bug 1351440) 2017-05-18 21:15:30 +02:00
Sebastian Hengst
00458fa236 Backed out changeset 2ea1279576d2 (bug 1351440) 2017-05-18 21:15:26 +02:00
L. David Baron
51adf3206b Bug 1365831 - Replace assertion that non-display SVG containers are only reflowed with NS_FRAME_IS_DIRTY with a real test of the condition. r=heycam
The primary patch in bug 1308876 causes frames to be reflowed less often
with NS_FRAME_IS_DIRTY, particularly when multiple passes of reflow are
required for the frame or one of its ancestors (which is generally the
case for a document that ends up not having scrollbars).  This change
causes this assert to fire on various SVG tests such as
layout/reftests/svg/svg-integration/conditions-outer-svg-01.xhtml .
This happens because the outer SVG with conditional processing (in this
test, systemLanguage="x") is reflowed due to its parent resizing,
without NS_FRAME_IS_DIRTY set.  This is a relatively normal thing to
happen during reflow; we just didn't have any tests that exercise it.

This patch adds a crashtest that triggers the assertion through the same
mechanism, but with a dynamic change, rather than depending on the
non-dirty reflow triggered by bug 1308876.  (I confirmed locally that
this test does trigger the assertion without this patch, when run in the
crashtest harness.)

I think fundamentally the assertion isn't valid, and we should instead
be testing the condition that it asserts.

MozReview-Commit-ID: D8hjAbjKyuL

--HG--
extra : transplant_source : %98C%3A%B1%93jb%E7%3D%81%19%97%A6%04%0F%88%8B%D2%A35
2017-05-18 09:24:33 -07:00
cku
c412dd10b9 Bug 1351440 - Part 4. Pass imgDrawingParams to nsSVGPaintServerFrame::GetPaintServerPattern. r=jwatt
The reason of this change is the same as for Part 2, except that this commit fixes
nsSVGPaintServerFrame::GetPaintServerPattern rather than PaintSVG.

Commit-ID: 691YrKZ0Lm9
MozReview-Commit-ID: KSnFhCndFUk

--HG--
extra : rebase_source : 3397613129fff6023833cdc3bd639f0d2b151652
extra : source : fa29f1920a88d88bcf0f5239462d32ee8955895c
2017-05-09 02:14:08 +08:00
cku
0fcc7571b7 Bug 1351440 - Part 3. Pass imgDrawingParams to nsSVGMaskFrame::GetMaskForMaskedFrame. r=jwatt
The reason of this change is the same as for Part 2, except this commit fixes
nsSVGMaskFrame::GetMaskForMaskedFrame rather than PaintSVG.

MozReview-Commit-ID: DS0eG6eKDgs

--HG--
extra : rebase_source : 696bf495edc98a390f49ff0638165724521460b1
extra : source : 95f38c2c8b57134504e7fbe03d1637866e3e65ba
2017-05-08 21:27:20 +08:00
cku
eaa4406688 Bug 1351440 - Part 2. Encapsulate DrawResult and imgIContainer::FLAG_* into imgDrawingParams, and pass it to PaintSVG. r=jwatt
The DrawResult return was not in fact anything to do with the success or
failure of that method, but was actually passing out a very specific piece of information
about the success or failure of any imagelib drawing that may not have occurred
under the various PaintSVG calls.

The signature of PaintSVG is changed from
  DrawResult PaintSVG(...., uint32 flags);
to
  void PaintSVG(...., imgDrawingParams& aPackage);

imgDrawingParams wraps DrawResult and imgIContainer::FLAG_* as a pack, pass through
PaintSVG to imagelib draw calls under beneath.

MozReview-Commit-ID: IOq2evUAOQF

--HG--
extra : rebase_source : 66c9a9e391c2f9e142575f42fd47b37334ec5752
extra : source : 97a08873177c0f18edffdb1b5589c77843a50553
2017-05-05 17:19:43 +08:00
Cameron McCormack
203bdaed3b Bug 1361235 - Part 2: Re-enable some tests. r=emilio
MozReview-Commit-ID: 76FaOwHjIMB

--HG--
extra : rebase_source : e2e36bd8a6b86761fe616d7c30d8df7b661a4e09
2017-05-11 19:19:52 +08:00
cku
fa91539f4a Bug 1343139 - (followup) Check PreTransformOverflowAreasProperty in painting process only. r=heycam
GetPreEffectsVisualOverflowRect is a function that be used in both reflowing
and painting. PreEffectsBBoxProperty of continuations is not set correctly yet
in reflow process, so we should skip this assertion check during reflow.

PS:
I will change MOZ_ASSERT, in GetPreEffectsVisualOverflowRect, back to NS_ASSERTION
if we still encounter this assertion in the future.

MozReview-Commit-ID: 6Gvg3XOd2mD

--HG--
extra : rebase_source : 88f605dc3aa2fd63fbe60925c0a21cc370ff3b6b
extra : amend_source : 0fb6a36486d7a96546e3362393d8501744ebdc34
2017-05-11 11:41:57 +08:00
Robert Longson
8b734a3546 Bug 1361509 - initialise nsSVGGradientFrame::mSource r=mats 2017-05-11 04:20:58 +01:00
Jonathan Watt
cfea97eb87 Bug 1359762 - Only allow SVG images to use context paint if they're from chrome:// or resource://. r=dholbert
MozReview-Commit-ID: 5vaPp4Y8zMd
2017-04-25 12:47:19 +01:00
Robert Longson
ffd7cf91d4 Bug 1362400 part 2 - optimise SMIL image updates r=jwatt 2017-05-06 20:51:59 +01:00
Robert Longson
5bf763e903 Bug 1362400 part 1 - Make it possible for SMIL to change the link state of an SVG anchor element r=jwatt r=smaug (DOM) 2017-05-06 20:32:14 +01:00
Jonathan Watt
44c2ccb8ad Bug 1360662, part 1 - Only expose properties that are listed in '-moz-context-properties' as image context properties. r=dholbert
MozReview-Commit-ID: B17M2vQZ92e

--HG--
extra : rebase_source : 3d8a2317ea9f092f2c41e00263135dfc57827e7d
2017-04-19 14:52:25 +01:00
Robert Longson
9a974578a0 Bug 1352258 - default fallback for context-fill to black to match default fill colour r=jwatt 2017-05-03 22:00:40 +01:00
Emilio Cobos Álvarez
8850cff8d0 Bug 1361596: Initialize nsSVGPatternFrame::mSource. r=mats
MozReview-Commit-ID: JHtIRjtNN1k
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-05-03 22:06:22 +02:00
Wes Kocher
5b73758a65 Merge m-c to inbound, a=merge
MozReview-Commit-ID: ILz91Vj4gT5
2017-05-02 17:39:58 -07:00
Robert Longson
0c1b6c1fcc Bug 1347409 part 2 - serialise fill and stroke fallback properly r=cam 2017-05-02 22:12:59 +01:00
Ting-Yu Lin
918033ba12 Bug 1321754 Part 2 - Update reftest and crashtest expectations for stylo. r=heycam
MozReview-Commit-ID: AunZ2DE209M

--HG--
extra : rebase_source : 4a091cd55581039c8d81f4db9bfbe2af8c0d0863
2017-04-28 14:53:16 +08:00
Emilio Cobos Álvarez
23bce99ae1 Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType.

MozReview-Commit-ID: 7aEMbHRaTFk

--HG--
extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
2017-05-01 19:32:52 +02:00
Emilio Cobos Álvarez
e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Sebastian Hengst
42fd33ff9c merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: ELENTh08Be7
2017-04-29 11:10:31 +02:00
Sebastian Hengst
b10380c0c8 Backed out changeset de8bbf1eb200 (bug 1359762) for failing reftest context-fill-01.html. r=backout 2017-04-28 22:54:00 +02:00
Jonathan Watt
a585601edc Bug 1359762 - Only allow SVG images to use context paint if they're from chrome:// or resource://. r=dholbert
MozReview-Commit-ID: 5vaPp4Y8zMd
2017-04-13 19:47:51 +01:00
Jonathan Watt
1689905b0b Bug 1350010, part 4 - Require '-moz-context-properties' on elements linking to SVG images using context paint. r=heycam
MozReview-Commit-ID: 4SgXupGx29P
2017-04-12 12:47:32 +01:00
cku
2d993f6812 Bug 1360343 - ensure maskSurface is not null before dereference, since it can be null because of OOM or gfx device reset. r=dvander
MozReview-Commit-ID: HX2qsWLZpMg

--HG--
extra : rebase_source : 046befc11151461a682842c31e2ce39247a5e1d8
2017-04-28 11:48:21 +08:00
Jonathan Watt
40205887ee Bug 1359486 - Fix SVGImageContext::MaybeStoreContextPaint to work with DevTools chrome. r=dholbert
MozReview-Commit-ID: 7TL9cfWsiED
2017-04-05 11:44:16 +01:00
Sebastian Hengst
e55101c5c8 Backed out changeset 85d3d629fa4a (bug 1359486) for crashing in 480345-1.html. r=backout 2017-04-25 19:44:03 +02:00
Jonathan Watt
1ba9dbe74f Bug 1359486 - Fix SVGImageContext::MaybeStoreContextPaint to work with DevTools chrome. r=dholbert
MozReview-Commit-ID: 7TL9cfWsiED
2017-04-05 11:44:16 +01:00
Jonathan Watt
78700a27ae Bug 1358690, part 1 - Allow SVGImageContext::MaybeInitAndStoreContextPaint to be passed an existing SVGImageContext. r=dholbert 2017-03-28 11:43:15 +01:00
Jonathan Watt
c42adf48d9 Bug 1358828, part 1 - Add some missing includes. r=longsonr
MozReview-Commit-ID: 3nDDATmCkJV
2017-03-27 12:49:21 +01:00
Jonathan Watt
80319e98e0 Bug 1358794, part 1 - If necessary, synthesize a viewBox for SVG embedded via SVG <image>. r=longsonr
MozReview-Commit-ID: DuKOqfxCUW8
2017-03-25 15:57:29 +00:00
cku
71f1a61edb Bug 1357432 - Part 2. Implement nsSVGEffects::GetBaseURLForLocalRef to export local-ref-url-resolving logic. r=heycam
ResolveURLUsingLocalRef is designed to be internally used by
nsSVGEffects::Get-{SVGEffect}-URI functions. Since we also need it in
SVGUseElement::LookupHref, make it public in nsSVGEffects.

MozReview-Commit-ID: Hsvs8Uzahrz

--HG--
extra : rebase_source : 54698a477a2ebb3f635fb3a77f6bc39b1741b05b
2017-04-20 15:58:19 +08:00
cku
258222aaaf Bug 1346618 - Part 1. Remove SVGImageContext::mGlobalOpacity. r=mstange
MozReview-Commit-ID: ByiPa4sreEh

--HG--
extra : rebase_source : eda6104c00cbc7ebe7b9a5ddc9e2abc73fbc37df
extra : source : df69799726bdccc5a25d6190c0fe22645e264ab7
2017-04-15 02:01:22 +08:00
Sebastian Hengst
3ec03039d2 Backed out changeset 6bd69f962dd5 (bug 1346618) for permafailing reftest 315920-9.html on Android 4.3 API15+ debug. r=backout 2017-04-13 18:56:58 +02:00
cku
8be5ee7510 Bug 1349741 - Part 1. Correct the transform matrix of a context that pass to nsFilterInstance::PaintFilteredFrame. r=mstange
MozReview-Commit-ID: 9BISQehlSgG

--HG--
extra : rebase_source : b24635e2e9c790906fd823aad456da12a9fdff16
2017-04-13 11:10:58 +08:00
Iris Hsiao
a59e2ae25b Backed out changeset f6a3307c3a8d (bug 1349741)
--HG--
extra : rebase_source : f08659b2489fa6c9205570b62c8a74d768296519
2017-04-13 15:14:54 +08:00
cku
781ff666e3 Bug 1349741 - Part 1. Correct the transform matrix of a context that pass to nsFilterInstance::PaintFilteredFrame. r=mstange
MozReview-Commit-ID: 9BISQehlSgG

--HG--
extra : rebase_source : b24635e2e9c790906fd823aad456da12a9fdff16
2017-04-13 11:10:58 +08:00
cku
494c75d825 Bug 1346618 - Part 1. Remove SVGImageContext::mGlobalOpacity. r=mstange
MozReview-Commit-ID: ByiPa4sreEh

--HG--
extra : rebase_source : 0b86cd57c1c9e6d687a0a4f56c3ccbfe24886e84
2017-04-10 11:59:48 +08:00
Manish Goregaokar
8854b518a1 Bug 1342596 - Update expectations for absolute length serialization ; r=manishearth 2017-04-12 14:57:20 +08:00
cku
21a1b43445 Bug 1352096 - Part 2. Remove Layer::mSourceURI. r=heycam
Now, remove Layer::mSourceURI, there are several benefit of doing this:
1. Reduce the size of nsStyleImage::Layer.
2. By storing style image and url information in nsStyleImage, we can remove
many verbose comments. That is becasue there is no need to explain why we use
mSourceURI here, or why we use nsStyleImage there anymore.
3. Since all inforamtion is stored in on place, nsStyleImage, we can setup image
request or URLs by one single Gecko_SetUrlImageValue call.

MozReview-Commit-ID: 7aTQobddTB1

--HG--
extra : rebase_source : 247e3b66c727a9116c58d3d6ff3ae0f7a58f2338
2017-03-31 01:50:21 +08:00
Jonathan Watt
9176ddbc11 Bug 828240, part 2 - Create only one nsDisplayTransform for outer-<svg> children-only transforms. r=longsonr
Previously if an outer-<svg> had children-only transforms we would create
an nsDisplayTransform display list item for every child of the <svg> element.
For certain SVG files this could cause performance problems. This commit makes
us create a single nsDisplayTransform for the nsSVGOuterSVGFrame's anonymous
child frame rathen than one nsDisplayTransform for every real child.
2017-03-15 16:59:34 +00:00
Jonathan Watt
2e3616de57 Bug 1353697, part 2 - Fix the 'transform' attribute on outer-<svg> to also transform the border, padding and clip rect. r=longsonr 2017-03-13 14:05:38 +00:00
Jonathan Watt
c1539cd5b0 Bug 1351990 - Initialize SVGContextPaint's members. r=baku
MozReview-Commit-ID: EZJ5QFuLyna
2017-03-09 12:49:21 +00:00
Ryan VanderMeulen
f4a0d77ffc Merge inbound to m-c. a=merge 2017-03-29 09:41:54 -04:00
Ryan Hunt
56219a24fd Bug 1341101 part 4 - Specify a nsRenderingContext for nsCSSRendering::PaintStyleImageLayer r=mattwoodrow
MozReview-Commit-ID: 5TX6IXLSC8r

--HG--
extra : rebase_source : fef1d37208dc29f8df67388fe5c335a9c013daef
2017-03-15 00:25:09 -04:00
Wes Kocher
914dd4b76c Merge inbound to m-c a=merge 2017-03-28 13:30:56 -07:00
cku
50ac4dd472 Bug 877661 - Part 2. Pass decode flag from outer-svg/ svg-container paint call to nsSVGUtils::PaintFrameWithEffects. r=tnikkel
MozReview-Commit-ID: 9VvzixdmRIt

--HG--
extra : rebase_source : 00a18c38016f86a244a14e36d427a2f2eacfdee4
2017-03-27 11:28:54 +08:00
cku
8abb48b629 Bug 877661 - Part 1. Pass decode flag down to GetMaskForMaskedFrame. r=tnikkel
MozReview-Commit-ID: 9KhIWp1rHzb

--HG--
extra : rebase_source : 8c3d3c95ba7ada05673ba637cd542f41e9ce9f90
2017-03-27 11:10:48 +08:00
cku
a55d02afd1 Bug 1345853 - Part 4. Pass sync decode flag down to nsSVGPatternFrame::PaintPattern. r=tnikkel
MozReview-Commit-ID: 1bHMINhs121

--HG--
extra : rebase_source : 8da9c0d77dd9a32be392f43d3be266d365894b3a
2017-03-25 03:19:18 +08:00
cku
ff10c4ce7b Bug 1345853 - Part 3. Pass sync docode flag down to nsSVGDisplayableFrame::PaintSVG. r=tnikkel
Add one paramater to nsSVGDisplayableFrame::PaintSVG, so that we can pass
sync-decode flag from nsXXXXDisplayItem::Paint function to SVG paint call.

MozReview-Commit-ID: 6VZbxnFaoUj

--HG--
extra : rebase_source : c55e457e0d7a81b4a574d970924e0af6f7a7db48
2017-03-24 16:49:37 +08:00
cku
251e635682 Bug 1345853 - Part 2. If the transform matrix is singular, return DrawResult::SUCCESS, instead of DrawResult::BAD_ARGS r=tnikkel
According to bug 1345853 comment 5, tn said:
You probably want to return whatever was drawn there regardless of the
DrawResult. SVGMaskFrame has the same problem. Keep in mind that DrawResult is
only reporting on how drawing of any images went, not the drawing of anything
else. Also looking over the patches from bug 1258510 I see a couple places where
BAD_ARGS is returned if the transform matrix is singular. We would want to
return SUCCESS in that case I think, because we drew what we were instructed to
draw.

MozReview-Commit-ID: 5XcDuKQwXTJ

--HG--
extra : rebase_source : 5c558d469148e0cb3cfe9365aed1a4a65c572532
2017-03-16 12:06:36 +08:00
cku
148bb081ca Bug 1345853 - Part 1. Pass DrawResult from nsSVGPatternFrame::PaintPattern back to nsDisplaySVGGeometry::Paint. r=mstange,tnikkel
I did many change in many files in this patch. But the goal is pretty simple: To
pass the return value of nsSVGPatternFrame::PaintPattern back to the caller
(nsDisplaySVGGeometry). My suggestion is to review this patch right from
nsSVGPatternFrame.cpp.

I made two mistakes in bug 1258510
1. We should not return directly at [1]. RemoveStateBits at l418 will be skip.
2. nsSVGPatternFrame::PaintPattern should return both SourceSurface and draw
result, so that we can update UpdateDrawResult in display item.

All the other changes are to
1. make sure the return value of nsSVGPatternFrame::PaintPattern goes back to
nsDisplaySVGGeometry::Paint correctly.
2. Since the return value of nsSVGPatternFrame::PaintPattern change, we need
modify all existed callers.

I also filed bug 1346124 for handle the returning value of PaintMarkers.

[1] https://hg.mozilla.org/mozilla-central/file/c0700bedb4f7/layout/svg/nsSVGPatternFrame.cpp#l415

MozReview-Commit-ID: Iq9RPQ6Omz0

--HG--
extra : rebase_source : ca7a35bb9f5e27880d5dc62e03feb91b6ac3435d
2017-03-21 10:12:23 +08:00
Jonathan Watt
da33662df5 Bug 1058040, part 18 - Minimize the cost of context paint when it is not available. r=dholbert
MozReview-Commit-ID: 5MVW37Vd1aK
2017-03-06 13:49:21 +00:00
Jonathan Watt
8c4b35d802 Bug 1058040, part 10b - Account for the SVGContextPaint member in SVGImageContext::operator==. r=dholbert
MozReview-Commit-ID: KqP0al5v5mB
2017-03-01 10:41:14 +00:00
cku
d8cdbc3585 Bug 1346124 - Pass sync decode flag down to nsSVGMarkerFrame::PaintMark. r=tnikkel
MozReview-Commit-ID: 45yNaXpLSM4

--HG--
extra : rebase_source : 01dcd1673e9ea8384eb327e56aec6e413732cdec
2017-03-27 12:33:53 +08:00
Jonathan Watt
3a0faf6e5a Bug 1350725 - Get rid of the GetUserToCanvasTM call in nsSVGUtils::PaintFrameWithEffects. r=longsonr 2017-02-27 12:46:18 +00:00
Jonathan Watt
49d27ff112 Bug 1350706 - Get rid of nsSVGDisplayableFrame::GetCoveredRegion and its overrides. r=longsonr 2017-02-27 11:43:16 +00:00
Jonathan Watt
630b2a5e78 Bug 1350015 - Fix the 'fill-opacity' property to work with fill="context-fill". r=dholbert
This change makes SVGEmbeddingContextPaint's GetFillPattern and
GetStrokePattern methods honor their opacity arguments as they should.  Since
these arguments must affect the gfxPattern that is returned, the code now
creates those on demand rather than creating them up front and caching them.

MozReview-Commit-ID: 4oemU2nRMeQ
2017-02-24 14:55:28 +00:00
Robert Longson
9831a5ac0e Bug 1349865 - use RAII to set/unset NS_FRAME_DRAWING_AS_PAINTSERVER state bit r=jwatt 2017-03-24 18:07:26 +00:00
cku
a9228a48bc Bug 1343139 - Part 1. Implement nsStyleSVGReset::HasMask. r=heycam
Implement this unil function to improve readability
MozReview-Commit-ID: FLKOGyq180W

--HG--
extra : rebase_source : db8dbc67dbc63c19df806e79ea36016d3d5fc8b6
extra : source : 47fa0a1f03acd6007e2d40e4ec5bc0ddba221361
2017-03-07 13:43:21 +08:00
cku
064e7ac757 Bug 1345946 - Part 1. Make SVG masks, gradients and patterns use the frame bounds when applied to outer-<svg>. r=jwatt
MozReview-Commit-ID: H6AravwRd2i

--HG--
extra : rebase_source : 6a11dbf529e37e343b06d0d7496789f3f7b17525
2017-03-14 13:26:05 +08:00
Mats Palmgren
2feec4025d Bug 1333482 part 5 - [css-ui] Enable '-moz-appearance' support for some tests. r=dholbert
* * *
[mq]: sssssssss

MozReview-Commit-ID: 4wgnjld1rDt
2017-03-23 22:11:23 -07:00
Carsten "Tomcat" Book
492970c342 merge mozilla-inbound to mozilla-central a=merge 2017-03-23 13:44:09 +01:00
cku
38afa468c3 Bug 1349462 - Part 2. one line for static function. r=jwatt
MozReview-Commit-ID: 9jVkHtLouVN

--HG--
extra : rebase_source : 8a512a93e562129475c68feba1e50f6b28edd37e
2017-03-23 16:53:47 +08:00
cku
a52259bf72 Bug 1349462 - Part 1. Rename IsSVGText as IsInSVGTextSubtree. r=heycam
MozReview-Commit-ID: LTo6c8tTtaf

--HG--
extra : rebase_source : bc6913c42cca141d7a3098fdd4dcc72fbf146b5a
2017-03-23 15:29:11 +08:00
Jonathan Watt
2773e5508d Bug 1349477, part 4 - Use AutoReferenceChainGuard in nsSVGMaskFrame. r=longsonr
MozReview-Commit-ID: 5tVLBcTOLQZ
2017-02-21 10:47:22 +00:00
Jonathan Watt
1fdd3184b8 Bug 1349477, part 3 - Use AutoReferenceChainGuard in nsSVGPatternFrame. r=longsonr
MozReview-Commit-ID: EUgSIK92Jtq
2017-02-21 10:34:52 +00:00
Jonathan Watt
ae571cea0c Bug 1349477, part 2 - Use AutoReferenceChainGuard in nsSVGGradientFrame. r=longsonr
MozReview-Commit-ID: 5xw5i696ipe
2017-02-21 10:10:43 +00:00
Jonathan Watt
fc37ee1940 Bug 1349477, part 1 - Use AutoReferenceChainGuard in nsSVGFilterFrame. r=longsonr
MozReview-Commit-ID: HTcySIH3qNt
2017-02-21 09:37:09 +00:00
Jonathan Watt
e42cb4dd27 Bug 1349388, part 5 - Assert in AutoReferenceChainGuard's ctor that we didn't fail to break a loop. r=longsonr 2017-02-17 14:20:32 +00:00
Jonathan Watt
b70b72f418 Bug 1349388, part 4 - Allow a single instance of AutoReferenceLimiter to guard against both reference loops and long reference chains. r=longsonr
--HG--
rename : layout/svg/AutoReferenceLimiter.h => layout/svg/AutoReferenceChainGuard.h
2017-02-17 13:15:18 +00:00
Jonathan Watt
618c7360e8 Bug 1349388, part 3 - Provide AutoReferenceLimiter with a default maximum reference chain length. r=longsonr 2017-02-16 11:18:33 +00:00
Jonathan Watt
6f850d0f40 Bug 1349388, part 2 - Add guard to AutoReferenceLimiter to prevent it being used as a temporary. r=longsonr 2017-02-16 10:31:03 +00:00