Commit Graph

3029 Commits

Author SHA1 Message Date
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