-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mask clipping determination insufficient for <use> elements #15026
Mask clipping determination insufficient for <use> elements #15026
Conversation
EWS run on current version of this PR (hash e6d920f) |
@@ -0,0 +1,2 @@ | |||
<!DOCTYPE html> | |||
<div style="width: 100px; height: 100px; background-color: green"></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we may have an existing html file featuring a green 100x100 rect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last time I checked there was no mechanism to re-use files named differently, other than symlinks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SVG WPT tests use "<link rel="match" ...", is it possible to use that?
@@ -0,0 +1,2 @@ | |||
<!DOCTYPE html> | |||
<div style="width: 100px; height: 100px; background-color: green"></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
https://bugs.webkit.org/show_bug.cgi?id=258168 Reviewed by Rob Buis. To determine if we need mask clipping or can use path clipping, the renderer is queried for certain information. This is not sufficient for <use> renderers -- the logic needs to extend to the referenced renderer as well. Previously when referencing e.g. a <text> element that is itself clipped, from an <use> element (that is a child of <clipPath>) we determined that path clipping is possible, leading to a fully clipped object (net result: nothing visible). Fix that issue, and handle <use> elements in the clip mask determination. Covered by two new tests, exercising the <use> clipping peculiarities. * LayoutTests/svg/clip-path/clip-path-use-referencing-clipped-text-expected.html: Added. * LayoutTests/svg/clip-path/clip-path-use-referencing-clipped-text.html: Added. * LayoutTests/svg/clip-path/clip-path-use-referencing-text-expected.html: Added. * LayoutTests/svg/clip-path/clip-path-use-referencing-text.html: Added. Imported from Blink. * Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::pathOnlyClipping): Refactor the mask clipping determination logic into a helper lambda. Re-use that lambda to check if the <use> referenced clip renderer is required to use mask clipping, or if path clipping is possible. Canonical link: https://commits.webkit.org/265238@main
e6d920f
to
df14838
Compare
Committed 265238@main (df14838): https://commits.webkit.org/265238@main Reviewed commits have been landed. Closing PR #15026 and removing active labels. |
Thanks a lot @rwlbuis! |
df14838
e6d920f