Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1cc5b31eb1ca1648cd07af6ab48e31db1862ba5e
      
https://github.com/WebKit/WebKit/commit/1cc5b31eb1ca1648cd07af6ab48e31db1862ba5e
  Author: Said Abou-Hallawa <[email protected]>
  Date:   2025-09-22 (Mon, 22 Sep 2025)

  Changed paths:
    A LayoutTests/svg/as-image/resources/circle-pattern-embeded-image.svg
    A LayoutTests/svg/as-image/svg-as-image-pattern-scale-expected.html
    A LayoutTests/svg/as-image/svg-as-image-pattern-scale.html
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourcePattern.cpp

  Log Message:
  -----------
  SVG patterns might get blurred and pixellated when zooming in
https://bugs.webkit.org/show_bug.cgi?id=298753
rdar://159202567

Reviewed by Simon Fraser.

When drawing an SVG pattern, a tileImage is created from the referenced element.
This tileImage is currently scaled by the patternTransform only. So although the
referenced element might be an SVG image or a large bitmap image, the resulted
tileImage will not be scaled well when the coordinate system is scaled like zoom
in or printing for example.

Although the tileImage of the pattern should be scaled by patternTransform, it 
has
to be scaled by at least GraphicsContext.scaleFactor. This ensures the tileImage
scales properly with the scaled coordinate system.

Test: svg/as-image/svg-as-image-pattern-scale.html
* LayoutTests/svg/as-image/resources/circle-pattern-embeded-image.svg: Added.
* LayoutTests/svg/as-image/svg-as-image-pattern-scale-expected.html: Added.
* LayoutTests/svg/as-image/svg-as-image-pattern-scale.html: Added.
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourcePattern.cpp:
(WebCore::LegacyRenderSVGResourcePattern::createTileImage const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to