Created attachment 404473 [details]
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.
Created attachment 404528 [details]
Comment on attachment 404528 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=404528&action=review
> + // Transfer referenceBox to CSS coordinates if needed.
Please omit this comment. It just says what the code says.
> + // Transfer path back to SVG coordinates.
Created attachment 404746 [details]
Committed r264622: <https://trac.webkit.org/changeset/264622>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 404746 [details].