CSS selector nth-of-type is broken in SVG use shadow trees.
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox66 | --- | wontfix |
firefox67 | --- | fixed |
firefox68 | --- | fixed |
People
(Reporter: grekovdmitry16, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
720 bytes,
image/svg+xml
|
Details | |
47 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0
Steps to reproduce:
I am using "nth-of-type" CSS selectors in SVG images for paths inside <defs> tag. It worked in older version (I don't know exact version) and works in other browsers., however, it doesn't work in several latest versions.
Actual results:
In attached file only "nth-of-type(2)" works, but not "nth-of-type(3)". Also "~" selector is not working in the same way. Note that if I move contents out of <defs> tag, everything works.
Expected results:
Both "nth-of-type(2)" and "nth-of-type(3)" should work.
Both "pathpath" and "pathpath~path" should work.
Reporter | ||
Comment 1•6 years ago
|
||
Strage, but, if I add class (doesn't matter what) to each <path> element, selectors begin to work.
Updated•6 years ago
|
Comment 2•6 years ago
|
||
mozregression tells me this was caused by bug 1502893.
Updated•6 years ago
|
Assignee | ||
Comment 3•6 years ago
|
||
I can see how this broke.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/625e9335159c Fix revalidation in <svg:use> subtree. r=heycam
Assignee | ||
Comment 7•6 years ago
|
||
Comment on attachment 9055425 [details]
Bug 1540385 - Fix revalidation in <svg:use> subtree. r=#style
Beta/Release Uplift Approval Request
- Feature/Bug causing the regression: Bug 1502893
- User impact if declined: Some selectors not working properly in SVG <use> elements.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): one-line change that jumps out the <svg:use> shadow root to look up style rules like we do everywhere else.
- String changes made/needed: none
Comment 8•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Comment 9•6 years ago
|
||
Comment on attachment 9055425 [details]
Bug 1540385 - Fix revalidation in <svg:use> subtree. r=#style
Low-risk oneliner patch with tests fixing a svg regression, uplift approved for 67 beta9, thanks.
Comment 10•6 years ago
|
||
bugherder uplift |
Updated•6 years ago
|
Updated•6 years ago
|
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/16516 for changes under testing/web-platform/tests
Upstream PR merged
Description
•