Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0c439897071503618fcd76a63e587c9ff4360403
https://github.com/WebKit/WebKit/commit/0c439897071503618fcd76a63e587c9ff4360403
Author: Ahmad Saleem <[email protected]>
Date: 2025-11-26 (Wed, 26 Nov 2025)
Changed paths:
A LayoutTests/svg/in-html/sizing/svg-inline-vertical-expected.txt
A LayoutTests/svg/in-html/sizing/svg-inline-vertical.html
M Source/WebCore/rendering/svg/RenderSVGRoot.cpp
M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGRoot.cpp
Log Message:
-----------
Return vertical writing mode aware intrinsic information for SVG
https://bugs.webkit.org/show_bug.cgi?id=248769
rdar://103262534
Reviewed by Antti Koivisto.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium. Also,
it fixes it for both Legacy SVG and Layer Based SVG engine.
Merge (Test):
https://chromium.googlesource.com/chromium/blink/+/60af46f13e39be1daacbcdab27c4e7212ae27886
SVG intrinsic dimensions need to be transposed for vertical writing modes
to correctly map physical dimensions to logical layout coordinates.
This patch updates computeIntrinsicSize() to transpose dimensions for
vertical writing modes, and updates preferredAspectRatio() to handle both
intrinsic size and viewBox ratios correctly in vertical contexts.
Test: svg/in-html/sizing/svg-inline-vertical.html
* LayoutTests/svg/in-html/sizing/svg-inline-vertical.html: Added.
* LayoutTests/svg/in-html/sizing/svg-inline-vertical-expected.txt: Added.
* Source/WebCore/rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeIntrinsicSize const):
(WebCore::RenderSVGRoot::preferredAspectRatio const):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGRoot.cpp:
(WebCore::LegacyRenderSVGRoot::computeIntrinsicSize const):
(WebCore::LegacyRenderSVGRoot::preferredAspectRatio const):
Canonical link: https://commits.webkit.org/303578@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications