Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bbc4a14664c35da9b061dd3a07df90be7b3030f9
      
https://github.com/WebKit/WebKit/commit/bbc4a14664c35da9b061dd3a07df90be7b3030f9
  Author: Taher Ali <[email protected]>
  Date:   2026-03-02 (Mon, 02 Mar 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-viewport/zoom/svg-foreignObject-font-size-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-viewport/zoom/svg-foreignObject-font-size-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-viewport/zoom/svg-foreignObject-font-size.html
    A LayoutTests/svg/zoom/page/zoom-foreignObject-text-zoom-expected.html
    A LayoutTests/svg/zoom/page/zoom-foreignObject-text-zoom.html
    M Source/WebCore/style/StyleAdjuster.cpp

  Log Message:
  -----------
  Fix zoom being applied twice to font-size in SVG foreignObject
https://bugs.webkit.org/show_bug.cgi?id=279041
rdar://135615620

Reviewed by Vitor Roriz.

When CSS zoom is set on :root, text inside foreignObject renders
at double the expected zoom — once from the inherited computedSize
and again from RenderSVGRoot's zoom transform.

StyleAdjuster resets usedZoom to 1.0 on foreignObject, but this
runs after the builder phase, so the font's computedSize still
carries the zoom from the HTML tree. Children inherit this stale
zoomed value.

The Fix recomputes computedSize resetting zoom on foreignObject.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-viewport/zoom/svg-foreignObject-font-size-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-viewport/zoom/svg-foreignObject-font-size-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-viewport/zoom/svg-foreignObject-font-size.html:
 Added.
* LayoutTests/svg/zoom/page/zoom-foreignObject-text-zoom-expected.html: Added.
* LayoutTests/svg/zoom/page/zoom-foreignObject-text-zoom.html: Added.

* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjustSVGElementStyle):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to