Closed Bug 1849130 Opened 2 years ago Closed 2 years ago

clip-path on SVG content should default to using the stroke-box

Categories

(Core :: SVG, defect)

defect

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: pdr, Assigned: longsonr)

References

Details

(Keywords: perf-alert)

Attachments

(2 files)

Attached file test.html

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36

Steps to reproduce:

In the attached testcase we have 3 stroked green boxes with clip-paths of "inset(0)", "inset(0) border-box", and "inset(0) stroke-box". These should all render the same due to the following lines in http://www.w3.org/TR/css-masking-1/#the-clip-path:

  1. If no reference box is specified, the border-box will be used as
    reference box.
  2. For SVG elements without an associated CSS layout box, the used
    value for ... border-box and margin-box is stroke-box.

I found this while working on bringing Chromium's clip-path implementation up to speed and found no engines agree on this. I plan to land two new WPT tests covering this behavior (css/css-masking/clip-path-svg-content/clip-path-inset-stroke-001.svg and css/css-masking/clip-path-svg-content/clip-path-inset-stroke-002.svg).

The Bugbug bot thinks this bug should belong to the 'Core::SVG' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → SVG
Product: Firefox → Core
Assignee: nobody → longsonr
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by longsonr@gmail.com: https://hg.mozilla.org/integration/autoland/rev/0689f8bf5ca7 clip-path on SVG content should default to using the stroke-box r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch

(In reply to Cristian Tuns from comment #6)

https://hg.mozilla.org/mozilla-central/rev/0689f8bf5ca7

== Change summary for alert #39387 (as of Sun, 27 Aug 2023 02:54:15 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
19% google-search-restaurants SpeedIndex android-hw-a51-11-0-aarch64-shippable-qr warm webrender 241.05 -> 194.84
17% booking SpeedIndex android-hw-a51-11-0-aarch64-shippable-qr warm webrender 853.99 -> 705.82
13% wikipedia SpeedIndex android-hw-a51-11-0-aarch64-shippable-qr warm webrender 239.28 -> 209.25
12% booking SpeedIndex android-hw-a51-11-0-aarch64-shippable-qr cold webrender 1,554.51 -> 1,370.02
12% google-maps SpeedIndex android-hw-a51-11-0-aarch64-shippable-qr warm webrender 300.78 -> 265.98
... ... ... ... ...
5% bing ContentfulSpeedIndex android-hw-a51-11-0-aarch64-shippable-qr warm webrender 289.23 -> 274.46

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=39387

seems a little improbable that this bug would have lead to these large perf improvements (does wikipedia test even have that many SVG's?).
Can you recheck please?

Flags: needinfo?(aionescu)

Sorry for the late reply, I was looking into it and I'm searching for the commit that caused the improvement, thanks!

Flags: needinfo?(aionescu)
See Also: → 1869456
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: