Closed Bug 1483882 Opened Last year Closed Last year

Shadow DOM: SVG url(#id) broken (gradient, clip-path)

Categories

(Core :: SVG, defect)

63 Branch
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: sergio91pt, Assigned: emilio)

References

Details

Attachments

(2 files)

Attached file testcase.html
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Steps to reproduce:

Attempted to use an svg inside a shadow root. The svg defines a gradient and uses it by referencing it with fill=url(#gradient_id).

See atached test case.


Actual results:

A gradient defined in the same svg inside a shadow root cannot be used since url(#id) looks for the gradient outside the shadow root.


Expected results:

Since the svg is inside a shadow root, url(#id) should not be able to "break free" of the shadow dom and instead, should look for the node inside of the shadow root.
Component: Untriaged → DOM
Product: Firefox → Core
Component: DOM → SVG
So you expect Chrome's behavior, which is not what the spec says.
Looks like Safari does resolve fragids inside the shadow tree (except for <use>..). I can take this.
Assignee: nobody → emilio
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
Comment on attachment 9001702 [details]
Teach IDTracker about Shadow DOM.

Olli Pettay [:smaug] has approved the revision.
Attachment #9001702 - Flags: review+
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/d25d4da4aad2
Teach IDTracker about Shadow DOM. r=smaug
Gah, I always forget that CSS images don't block onload. Will fix the same way the other reftests deal with it: https://searchfox.org/mozilla-central/rev/246f2b4fab2c1a6cca99418bc2e4d73d1102cc38/layout/reftests/border-radius/corner-joins-2-ref.xhtml#33
Flags: needinfo?(emilio)
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/4105f56578d4
Teach IDTracker about Shadow DOM. r=smaug
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/4656d3bf8e9c
followup: Adjust a QR test expectation for now. r=me CLOSED TREE
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/9c08d6d5d6f2
Teach IDTracker about Shadow DOM. r=smaug
Sigh, typoed <use / <svg. Sorry!
Flags: needinfo?(emilio)
Will remove the text to work around bug 608812... Sigh.
Flags: needinfo?(emilio)
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/3b7671939ef8
Teach IDTracker about Shadow DOM. r=smaug
https://hg.mozilla.org/mozilla-central/rev/3b7671939ef8
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Depends on: 1484773
Blocks: 1487259
You need to log in before you can comment on or make changes to this bug.