Closed
Bug 1450250
Opened 7 years ago
Closed 6 years ago
<svg:use> should use an actual shadow tree, instead of NAC.
Categories
(Core :: SVG, enhancement, P3)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Regressed 1 open bug)
Details
Attachments
(4 files)
This is for soundness in general, since you can stash any kind of element in there and can cause non-desired stuff to run from layout, like in bug 1450181.
Also, it's needed to allow you to do <svg:use style="display: contents">, which works in other engines but not in Gecko.
Finally, it allows to simplify a lot of hacks that were added for that, like :-moz-use-shadow-tree-root, blocks_ancestor_combinators, etc...
Using NAC here is really a hack.
Updated•6 years ago
|
Priority: -- → P3
Assignee | ||
Comment 1•6 years ago
|
||
This will make a lot of stuff much nicer, I think we should do this.
Flags: needinfo?(emilio)
Assignee | ||
Comment 2•6 years ago
|
||
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.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → emilio
Flags: needinfo?(emilio)
Comment 3•6 years ago
|
||
Very happy to see this. Thanks Emilio!
Assignee | ||
Comment 4•6 years ago
|
||
Depends on D2154. This is a prerequisite to make some SMIL-in-use tests pass.
Assignee | ||
Comment 5•6 years ago
|
||
This matches chrome:
https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/svg/animation/svg_smil_element.cc?l=260&rcl=325eafc631f396944801f17675a7092b216d60ca
And we rely on that to animate <use> with SMIL, like:
<use href="#foo">
<animate ...>
</use>
There, the flattened tree parent of the <animate> element is null, because <use>
is a shadow root without slots.
Similarly we need to skip the GetCtx check which seems unneeded, and also is not
correct since <animate> can animate when it's out of the flattened tree.
Depends on D2192.
Assignee | ||
Comment 6•6 years ago
|
||
It's used by SVGAnimationElement, and otherwise it can't find the root element.
It also feels like the right thing to do, and didn't break any XBL+svg tests
(though we may as well get rid of those at this point).
Depends on D2192.
Comment 7•6 years ago
|
||
Comment on attachment 8992341 [details]
Bug 1450250: Make svg:use use an actual shadow tree. r=heycam
Cameron McCormack (:heycam) has approved the revision.
https://phabricator.services.mozilla.com/D2154
Attachment #8992341 -
Flags: review+
Comment 8•6 years ago
|
||
Comment on attachment 8992695 [details]
SMIL document-related fixes.
Cameron McCormack (:heycam) has approved the revision.
https://phabricator.services.mozilla.com/D2192
Attachment #8992695 -
Flags: review+
Comment 9•6 years ago
|
||
Comment on attachment 8992707 [details]
Make <animate> target the light DOM parent, not the flattened tree parent.
Cameron McCormack (:heycam) has approved the revision.
https://phabricator.services.mozilla.com/D2194
Attachment #8992707 -
Flags: review+
Comment 10•6 years ago
|
||
Comment on attachment 8992708 [details]
Preserve the behavior of GetOuterSVGElement so that it works for <animate>.
Cameron McCormack (:heycam) has approved the revision.
https://phabricator.services.mozilla.com/D2195
Attachment #8992708 -
Flags: review+
Comment 11•6 years ago
|
||
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d4d2a2444ad1
SMIL document-related fixes. r=heycam
https://hg.mozilla.org/integration/mozilla-inbound/rev/91b097951606
Make <animate> target the light DOM parent, not the flattened tree parent. r=heycam
https://hg.mozilla.org/integration/mozilla-inbound/rev/d335f602d578
Preserve the behavior of GetOuterSVGElement so that it works for <animate>. r=heycam
https://hg.mozilla.org/integration/mozilla-inbound/rev/453d0a08f00c
Make svg:use use an actual shadow tree. r=heycam
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/12092 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Comment 14•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d4d2a2444ad1
https://hg.mozilla.org/mozilla-central/rev/91b097951606
https://hg.mozilla.org/mozilla-central/rev/d335f602d578
https://hg.mozilla.org/mozilla-central/rev/453d0a08f00c
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Upstream PR merged
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•