Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 528584f4a0458bc718df6c2fefbd2c4adb51a8b7
https://github.com/WebKit/WebKit/commit/528584f4a0458bc718df6c2fefbd2c4adb51a8b7
Author: Ahmad Saleem <[email protected]>
Date: 2026-03-29 (Sun, 29 Mar 2026)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/svg/SVGSVGElement.cpp
Log Message:
-----------
Fix currentScale having no effect on standalone SVG documents
https://bugs.webkit.org/show_bug.cgi?id=311019
rdar://173624862
Reviewed by Nikolas Zimmermann.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
frameForCurrentScale() checked parentNode() to prevent currentScale
from applying to SVGs embedded in HTML. However, even the document
element has a non-null parentNode (the Document node), so this
condition prevented currentScale from ever working on any connected
element, including standalone SVG documents.
Replace the parentNode() check with document().documentElement() != this,
which correctly distinguishes standalone SVG (where the <svg> is the
document element) from embedded SVG (where it is not).
* LayoutTests/TestExpectations: Unskip Test (now progressed)
* Source/WebCore/svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::frameForCurrentScale const):
Canonical link: https://commits.webkit.org/310183@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications