Closed Bug 1760954 Opened 3 years ago Closed 3 years ago

nested SVG <use> with transform renders differently in Gecko vs Blink/WebKit

Categories

(Core :: SVG, defect)

defect

Tracking

()

RESOLVED INVALID
Webcompat Priority ?
Tracking Status
firefox100 --- affected

People

(Reporter: karlcow, Unassigned)

References

()

Details

Attachments

(3 files)

I tried to find an equivalent bug but could not find.
This seems unrelated Bug 1343544 maybe.

Blink: top left
Gecko: top right
WebKit: bottom

There is probably a simpler test case to create. This is trying to reproduce what is on the site with less details.

I think this is because we've implemented SVG 2 use elements and webkit hasn't quite yet.

We do this https://www.w3.org/TR/SVG2/struct.html#UseStyleInheritance

However, if a CSS rule uses a complex selector to match an element based on its ancestors or siblings, and those ancestors or siblings are not cloned as part of the shadow tree, then that rule would no longer match the element instance.

The testcase does seem to have some selectors that do that and that we would therefore ignore.

Attachment #9270508 - Attachment description: reduced testcase → testcase 2 (reduced)

Robert's comment 3 seems like the right diagnosis. See my just-attached further-reduce testcase, where Blink and WebKit applies the same "orange" rule to the source element as well as its clone in the use subtree, even though that rule is targeted based on an ancestor-selector for an ancestor that's outside of the use-cloned subtree.

Our behavior here (rendering the reduced testcase's second rect as lime) is correct, per the spec text that Robert quoted.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: