Commit Graph

3270 Commits

Author SHA1 Message Date
Jonathan Watt
90314b1dd6 Bug 1492573. Make SVGTextFrame ignorant of the implementation details of SVG rendering observers. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D6320

--HG--
extra : rebase_source : fb88b6e2a87dc2e766974cff1ffed1f11a86f5e5
2018-08-15 21:32:04 +01:00
Jonathan Watt
f8e64cb389 Bug 1492432. Remove PaintingPropertyDescriptor parameter from SVGObserverUtils::GetPaintServer. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D6250

--HG--
extra : rebase_source : 3f9c4a0252ba62db90c908f4021072a22097ec55
2018-08-15 11:54:27 +01:00
Jeff Muizelaar
b7ef76c888 Bug 1480160. Add crash test for masked 3d transforms r=mstange
In the grouper code we don't currently support active masks so
this makes sure that we handle 3d transforms that are inactive.

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

--HG--
extra : moz-landing-system : lando
2018-09-21 03:41:43 +00:00
Cameron McCormack
0f4ffbd8c2 Bug 1492694 - Treat invalid in="" attributes as if they weren't specified r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D6355

--HG--
extra : moz-landing-system : lando
2018-09-20 07:07:47 +00:00
Doug Thayer
f0ed0dee36 Bug 1417699 - Remove PrimitiveType enum r=mstange
Ran into a couple of test failures because I was leaving
mAttributes empty for empty things like MergeAttributes, and
only setting mType. Since mType is now redundant though, and
since it's the only use of PrimitiveType, I figured I'd just
remove it entirely.

Depends on D4900

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

--HG--
extra : moz-landing-system : lando
2018-09-19 17:18:44 +00:00
Doug Thayer
e79792a58a Bug 1417699 - Replace hash map with tagged union r=mstange
This replaces the hash map of attributes with a tagged union. In
this case, all filter attributes will be stored in line, with the
exception of some more complex attributes which have an internal
nsTArray of floats. This should help avoid all the hashing and
extra heap allocations.

Depends on D4899

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

--HG--
extra : moz-landing-system : lando
2018-09-19 17:18:16 +00:00
Doug Thayer
39b28dbb28 Bug 1417699 - Avoid copies of filter attributes when possible r=mstange
This is a more conservative optimization for bug 1417699. There's no
reason we need to be copying these everywhere, so let's just go ahead
and implement moves.

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

--HG--
extra : moz-landing-system : lando
2018-09-19 17:17:43 +00:00
Robert Longson
dad3e866c1 Bug 1396642 - support smaller viewBox coordinates at the expense of larger ones r=dholbert 2018-09-18 19:43:53 +01:00
Thomas Nguyen
7f029744d5 Bug 1330487 - Part 7: Send correct Referrer header when referencing SVG from CSS r=heycam
MozReview-Commit-ID: DAkZ1wjuEe0

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

--HG--
extra : moz-landing-system : lando
2018-09-17 05:37:46 +00:00
Thomas Nguyen
fca5bf4852 Bug 1330487 - Part 6: Passing referrer information to svg style system r=heycam
We create new object URLExtraRefferINfo and pass it to svg system instead of
nsIURI. The object brings referrer and referrer policy so we can send correct
Referer headers.

MozReview-Commit-ID: 2gLnQPEE9t5

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

--HG--
extra : moz-landing-system : lando
2018-09-17 05:37:01 +00:00
Zhang Junzhi
7a64d2f663 Bug 1490611 - physical to logical name refactor: DISPLAY_*_WIDTH to DISPLAY_*_INLINE_SIZE(as well as the relevant struct in the macro contents) r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D5657

--HG--
extra : rebase_source : af0fc623d0b5d5e575bb03b08576709512bac4f3
2018-09-12 12:35:47 +00:00
Gurzau Raul
ee20d3cd7c Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-09-12 14:43:11 +03:00
Jeff Muizelaar
d43f067572 Bug 1486198. Be more accepting of empty blob images r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D5614

--HG--
extra : moz-landing-system : lando
2018-09-11 23:14:42 +00:00
Jonathan Watt
6fa9db3449 Bug 1488700 p12. Rename nsSVGMaskProperty to SVGMaskObserverList. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D5625

--HG--
extra : rebase_source : c2e1c5db2a817c0dbc6ffb9bc362b92924de0e5f
2018-08-13 16:27:59 +02:00
Jonathan Watt
d580509f71 Bug 1488700 p11. Rename nsSVGTextPathProperty to SVGTextPathObserver. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D5624

--HG--
extra : rebase_source : c991e7eb377f97e994ad990b1e8cdfb1300bc9f6
2018-08-13 14:47:19 +02:00
Jonathan Watt
8d531dea08 Bug 1488700 p10. Rename nsSVGMarkerProperty to SVGMarkerObserver. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D5623

--HG--
extra : rebase_source : 6409581ab4c559fda1fa7888b2ebf33030055dec
2018-08-13 14:03:35 +02:00
Jonathan Watt
9b010a0e34 Bug 1488700 p9. Rename nsSVGFilterProperty to SVGFilterObserverListForCSSProp. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D5622

--HG--
extra : rebase_source : 1018e7125d0d5477701a448a52507d29b924b068
2018-08-13 12:49:21 +02:00
Jonathan Watt
0d7aef1b78 Bug 1488700 p7. Rename nsSVGFilterChainObserver to SVGFilterObserverList. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D5619

--HG--
extra : rebase_source : 57f4bf14b801b4d723969843e7d54a86f97917ab
2018-08-13 11:38:11 +02:00
Jonathan Watt
e729179571 Bug 1488700 p6. Rename nsSVGFilterReference to SVGFilterObserver. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D5617

--HG--
extra : rebase_source : 32075c4e95fbedb102e94584330bcb0315d43fab
2018-08-13 10:39:12 +02:00
Jonathan Watt
ac6f67ef4f Bug 1488700 p5. Get rid of nsISVGFilterReference. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D5079

--HG--
extra : rebase_source : 3ad29efa0666b870cb3683b854919cc2d8514ad0
2018-08-09 20:15:48 +02:00
Jonathan Watt
886e2b8ae4 Bug 1488700 p4. Rename nsSVGIDRenderingObserver to SVGIDRenderingObserver. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D5026

--HG--
extra : rebase_source : b9a11dbf110f99820e0538368305ad3d3230b85a
2018-08-09 14:16:49 +02:00
Jonathan Watt
3023d05065 Bug 1488700 p3. Rename nsSVGRenderingObserversList to SVGRenderingObserversList. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D5024

--HG--
extra : rebase_source : 5cd20ef1df1fe40a331e284362672df988046fc3
2018-08-09 12:54:26 +02:00
Jonathan Watt
b5333d12ac Bug 1488700 p2. Rename nsSVGRenderingObservers to SVGRenderingObservers. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D5023

--HG--
extra : rebase_source : 97181ea49b14c2d478a20828ef3c5974e04e526c
2018-08-09 11:29:01 +02:00
Jonathan Watt
2d7cf8e7ba Bug 1488700 p1. Put the SVG rendering observer code in the mozilla namespace. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D5022

--HG--
extra : rebase_source : b6ba9ea7d984d07c7aa42a30828bf9072d10e02d
2018-08-09 11:04:36 +02:00
Jeff Muizelaar
07e9250f5d Bug 1449634. Handle foreignobject better with blob invalidation. r=mstange
Turn off grouping and switch to regular WebRender building when
we encounter a foreignobject.

MozReview-Commit-ID: 6fHc4Ioi22N
2018-09-06 16:10:51 -04:00
Gerald Squelart
b099eab802 Bug 1488684 - Made nsIFrame-derived classes and some others 'final' where possible - r=dbaron
All classes deriving from nsIFrame that did not have any subclasses themselves
(at the time of writing this patch) have been marked with `final`.
Some other Layout classes have also been made final, but this was opportunistic
while working on nsIFrame subclasses, and is definitely not exhaustive, further
patches welcome; refer to bug 1332680.

Advantages of marking a class final include:
- Allowing the compiler to devirtualize some method calls (i.e., calling
  virtual functions directly instead of going through the vtable),
- Indicating that the class is not currently subclassed,
- Preventing subclassing without being aware that this would remove the
  finalization benefits of the parent class.
`final` does not signify that these classes should *never* be subclassed, this
is left for developers to decide.

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

--HG--
extra : moz-landing-system : lando
2018-09-06 01:23:14 +00:00
Emilio Cobos Álvarez
f105c67c35 Bug 1471583. Add a new ImgDrawResult variant to distinguish INCOMPLETE and 'fully drew an image which wasn't really complete'. r=tnikkel 2018-08-29 00:53:08 -05:00
Boris Chiou
63d06d8017 Bug 1246764 - Part 4: Rename mask flag and function name of xxxBasicShape to xxxBasicShapeOrPath. r=jwatt
This flag and function name are used for both basic shapes and path function,
so rename it. For now, we treat path() and other basic-shapes as the
different object (i.e. StyleSVGPath and StyleBasicShape), so I rename
these functions and mask flag.

Differential Revision: https://phabricator.services.mozilla.com/D3636
2018-08-24 11:37:57 -07:00
Boris Chiou
7ba34b6df6 Bug 1246764 - Part 3: Layout part for |clip-path: path()|. r=jwatt
Create clip-path for the path function and reuse some APIs in
nsCSSClipPathInstance, so we don't have to update the code flow.

Differential Revision: https://phabricator.services.mozilla.com/D3635
2018-08-24 11:37:55 -07:00
Emilio Cobos Álvarez
c1a9351458 Bug 1480275: Handle nested use shadow trees properly when the ID target changes. r=heycam
We end up with three <svg:use> elements to update (lol), because the target (#c)
changes, since we create another element with that ID in the document via
outerHTML.

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

--HG--
extra : moz-landing-system : lando
2018-08-20 00:32:56 +00:00
dvarga
87db76ae1a Merge mozilla-central to mozilla-inbound on a CLOSED TREE
--HG--
extra : rebase_source : c9e6b9edae9ecf064d1318fa15d5d57ea42c102a
2018-08-16 01:22:36 +03:00
Daniel Holbert
0878eb4d7e Bug 1483394: Remove unneeded #includes of nsContentUtils.h in /layout. r=TYLin
For each file touched in this patch, the file had an #include for nsContentUtils.h, but no other mentions of the string "nsContentUtils", nor any mention of its "ScriptBlocker"-related types. So these files likely don't need their nsContentUtils.h include anymore, and we can remove it to get a marginal win on build time/complexity.

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

--HG--
extra : moz-landing-system : lando
2018-08-15 07:04:43 +00:00
Emilio Cobos Álvarez
d3a88bafc5 Bug 1480224: It's not needed to explicitly exclude <use> trees from XBL scopes anymore. r=smaug
Now that the content is not anonymous we don't need to exclude them explicitly.

This happens because anonymous content inside the shadow tree does report to be
inside the shadow tree, which is true but at the same time slightly footgunny.

In any case the other uses of the use shadow tree stuff are base-uri related,
and changing anon content's base uri in that case sounds like the right thing,
even though anon content shouldn't rely on those anyway.

Differential Revision: https://phabricator.services.mozilla.com/D3409
2018-08-15 15:26:23 +02:00
Margareta Eliza Balazs
9575863d77 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-14 12:35:25 +03:00
Xidorn Quan
33b8a6dacd Bug 1483090 - Rename StyleUserInterface to StyleUI. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3276

--HG--
extra : moz-landing-system : lando
2018-08-14 08:37:37 +00:00
Ting-Yu Lin
48d02834a5 Bug 1482665 Part 2 - Remove nsPresContext::AppUnitsPerCSSPixel() and replace it with mozilla::AppUnitsPerCSSPixel(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D3155
2018-08-13 14:29:28 -07:00
L. David Baron
aad8d26078 Bug 1479859 patch 3 - Add an nsIFrame::IsFrameOfType bit to say whether frames support contain:layout and contain:paint. r=dholbert
This is needed for patch 4.

This is based both on the wording in the spec and the discussion in
https://github.com/w3c/csswg-drafts/issues/2987, and also doesn't
support them for nsMathMLContainerFrame, which is similar to inlines and
ruby.

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

--HG--
extra : rebase_source : b7e23fb248fa34957ca2d539134e872f5a03f5a8
2018-08-07 15:02:07 -07:00
Emilio Cobos Álvarez
68f214df2a Bug 1450250: Make svg:use use an actual shadow tree. r=heycam
Summary:
This fixes a couple fuzz bugs and prevents special-casing <svg:use> even more in
bug 1431255.

Unfortunately not as many hacks went away as I'd have hoped, since we still need
to match document rules, see the linked SVGWG issues.

But blocks_ancestor_combinators goes away, which is nice since it's on a very
hot path.

Test Plan: WPT for style invalidation, covered by existing tests otherwise.

Reviewers: heycam

Tags: #secure-revision

Bug #: 1450250

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

MozReview-Commit-ID: C4mthjoSNFh
2018-07-20 14:44:51 +02:00
Bas Schouten
db16820b25 Bug 1473937 - Part 3: Use Moz2D Opacity filter inside Gecko filter code. r=mstange 2018-07-17 21:11:14 +02:00
Dan Glastonbury
c9c954a337 Bug 1467622 - P1: nsStyleSVGPaint - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: 1bbQzOoOuBe

--HG--
extra : rebase_source : 1631a71a78b0e6fbc4842ee14e11e946a5063afa
2018-06-27 17:07:37 +10:00
Matt Woodrow
9171c79a67 Bug 1372458 - Fold opacity into filter drawing rather than using a temporary surface. r=bas,mstange
MozReview-Commit-ID: GOBTUhN7fcC

--HG--
extra : rebase_source : 8355d2001dcc8fba5e43d4ace6483896a9d9cd31
2018-07-14 15:25:49 +12:00
Ting-Yu Lin
5f1b665033 Bug 1286882 - Make SVG basic shape elements unselectable. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D2038

--HG--
extra : moz-landing-system : lando
2018-07-13 18:01:48 +00:00
Bogdan Tara
ccc435c216 Backed out changeset 2de43bdd92a8 (bug 1286882) for failures on test_text_selection.html CLOSED TREE 2018-07-12 05:23:44 +03:00
Ting-Yu Lin
5cb4683f78 Bug 1286882 - Make SVG basic shape elements unselectable. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D2038

--HG--
extra : moz-landing-system : lando
2018-07-12 00:42:51 +00:00
Brindusan Cristian
232d35f4b9 Backed out 5 changesets (bug 1467622) for reftest failures on layout/reftests/svg/smil/style/anim-css-fill-1-from-by-curcol-hex.svg. CLOSED TREE
Backed out changeset 8694fe928b04 (bug 1467622)
Backed out changeset 74533cad9479 (bug 1467622)
Backed out changeset e1dbee410e98 (bug 1467622)
Backed out changeset 56142038cc7f (bug 1467622)
Backed out changeset 90cede21bad1 (bug 1467622)
2018-07-11 09:37:26 +03:00
Dan Glastonbury
0a83cfb70f Bug 1467622 - P1: nsStyleSVGPaint - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: 1bbQzOoOuBe

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

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

MozReview-Commit-ID: Hw7nCiUXVJl

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

--HG--
extra : rebase_source : 7c0add57b0de49ede96ddb46f5dfd0b9f2cadb3c
2018-06-22 11:35:49 +12:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00