Граф коммитов

3041 Коммитов

Автор SHA1 Сообщение Дата
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
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