RESOLVED FIXED 244706
CSS - overflow: clip is not working on SVG elements
https://bugs.webkit.org/show_bug.cgi?id=244706
Summary CSS - overflow: clip is not working on SVG elements
Karl Dubost
Reported 2022-09-02 01:52:27 PDT
https://wpt.fyi/results/svg/render/reftests/overflow-clip.html?label=experimental&label=master&aligned This test fails http://wpt.live/svg/render/reftests/overflow-clip.html data:text/html,<svg%20style="overflow:%20clip;%20width:%20100px;%20height:%20100px">%20%20%20<rect%20width="200"%20height="200"%20fill="green">%20</svg> while it is working for simple divs. data:text/html,<div%20style="overflow:clip;width:100px;height:100px"><div%20style="width:200px;height:200px;background-color:gold"></div></div> Work in Firefox and Chrome.
Attachments
Patch (8.56 KB, patch)
2022-09-07 03:04 PDT, Rob Buis
no flags
Patch (9.23 KB, patch)
2022-09-08 01:17 PDT, Rob Buis
no flags
Patch (9.22 KB, patch)
2022-09-09 01:03 PDT, Rob Buis
no flags
Radar WebKit Bug Importer
Comment 1 2022-09-02 01:52:37 PDT
Rob Buis
Comment 2 2022-09-07 03:04:05 PDT
Simon Fraser (smfr)
Comment 3 2022-09-07 10:39:19 PDT
Comment on attachment 462177 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=462177&action=review > Source/WebCore/rendering/svg/LegacyRenderSVGRoot.cpp:216 > + return effectiveOverflowX() == Overflow::Hidden || style().overflowX() == Overflow::Auto Would be nice to have a isNonVisibleOverflow(Overflow) helper we can use everywhere.
Rob Buis
Comment 4 2022-09-08 01:17:25 PDT
Simon Fraser (smfr)
Comment 5 2022-09-08 13:06:51 PDT
Comment on attachment 462199 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=462199&action=review > Source/WebCore/rendering/style/RenderStyle.h:2553 > +inline bool isNonVisibleOverflow(const Overflow& overflow) Overflow is a uint8_t enum, so it's more efficient to pass by value.
Rob Buis
Comment 6 2022-09-09 01:03:39 PDT
EWS
Comment 7 2022-09-09 02:54:59 PDT
Committed 254295@main (88bf94fa06f3): <https://commits.webkit.org/254295@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 462221 [details].
Note You need to log in before you can comment on or make changes to this bug.