Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2b69c8b0d1bf5df630b1e099a0e9af04fef6353f
      
https://github.com/WebKit/WebKit/commit/2b69c8b0d1bf5df630b1e099a0e9af04fef6353f
  Author: Rob Buis <[email protected]>
  Date:   2024-01-15 (Mon, 15 Jan 2024)

  Changed paths:
    A 
LayoutTests/platform/ios/svg/repaint/clip-path-object-bounding-box-transformed-expected.txt
    A 
LayoutTests/platform/ios/svg/repaint/mask-object-bounding-box-transformed-expected.txt
    M LayoutTests/platform/mac-sonoma-wk2-lbse-text/TestExpectations
    M 
LayoutTests/platform/mac-sonoma-wk2-pixel/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png
    M 
LayoutTests/platform/mac-sonoma-wk2-pixel/svg/W3C-SVG-1.1/masking-path-01-b-expected.png
    M 
LayoutTests/svg/repaint/clip-path-object-bounding-box-transformed-expected.txt
    M 
LayoutTests/svg/repaint/clip-path-user-space-on-use-transformed-expected.txt
    M LayoutTests/svg/repaint/mask-object-bounding-box-transformed-expected.txt
    M LayoutTests/svg/repaint/mask-user-space-on-use-transformed-expected.txt
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/svg/RenderSVGModelObject.cpp
    M Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
    M Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp
    M Source/WebCore/svg/SVGClipPathElement.cpp
    M Source/WebCore/svg/SVGMaskElement.cpp

  Log Message:
  -----------
  [LBSE] Take transforms into account on mask/clip content
https://bugs.webkit.org/show_bug.cgi?id=267075

Reviewed by Nikolas Zimmermann.

Take transforms into account on mask/clip content by adding logic to 
calculateClipContentRepaintRect
and calculateMaskContentRepaintRect, which is used by LBSE only.

Fix another clip problem related to transforms since for <use> computeClipPath 
did not take
the transform on the referenced element into account.

Also, clipper uses masks once it is determined masks are needed, and does not 
switch to clips for referenced clipPaths.

Finally, when resource bounding box for masks is fully outside of the object 
bounding box )no intersection), use
object bounding box rect as fallback.

* 
LayoutTests/platform/ios/svg/repaint/clip-path-object-bounding-box-transformed-expected.txt:
 Added.
* 
LayoutTests/platform/ios/svg/repaint/mask-object-bounding-box-transformed-expected.txt:
 Added.
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/TestExpectations:
* 
LayoutTests/platform/mac-sonoma-wk2-pixel/svg/W3C-SVG-1.1/masking-mask-01-b-expected.png:
* 
LayoutTests/platform/mac-sonoma-wk2-pixel/svg/W3C-SVG-1.1/masking-path-01-b-expected.png:
* 
LayoutTests/svg/repaint/clip-path-object-bounding-box-transformed-expected.txt:
* LayoutTests/svg/repaint/clip-path-user-space-on-use-transformed-expected.txt:
* LayoutTests/svg/repaint/mask-object-bounding-box-transformed-expected.txt:
* LayoutTests/svg/repaint/mask-user-space-on-use-transformed-expected.txt:
* Source/WebCore/rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::computeClipPath const):
* Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::resourceBoundingBox):
* Source/WebCore/svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::calculateClipContentRepaintRect):
* Source/WebCore/svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::calculateMaskContentRepaintRect):

Canonical link: https://commits.webkit.org/273046@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to