Created attachment 404473 [details] test case Open the attached test case. Results: A 100x100 green box is displayed Expected: A 250x250 green box is displayed The CSS size of the <svg> root element is 400x400 but its view-box size is 200x200. The <svg> root element also has a clip-path: inset(0 150px 150px 0). This means 150 pixels from the right and from the bottom should be clipped to the 400x400 bounding box. And a 250x250 green box should be displayed. The bug is the clipping is applied to the view-box rectangle. This leaves only 50x50 box. This box is displayed 100x100 because the local-to-parent transformation is 2:1.
<rdar://problem/65058191>
Created attachment 404528 [details] Patch
Comment on attachment 404528 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=404528&action=review > Source/WebCore/rendering/svg/SVGRenderSupport.cpp:401 > + // Transfer referenceBox to CSS coordinates if needed. Please omit this comment. It just says what the code says. > Source/WebCore/rendering/svg/SVGRenderSupport.cpp:405 > + // Transfer path back to SVG coordinates. Ditto.
Created attachment 404746 [details] Patch
Committed r264622: <https://trac.webkit.org/changeset/264622> All reviewed patches have been landed. Closing bug and clearing flags on attachment 404746 [details].