Bug 248769

Summary: [LegacySVG] Return vertical writing mode aware intrinsic information for SVG
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: sabouhallawa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=256962

Description Ahmad Saleem 2022-12-05 11:30:54 PST
Hi Team,

While going through Blink's commit, I came across following commit:

Commit - https://chromium.googlesource.com/chromium/blink/+/60af46f13e39be1daacbcdab27c4e7212ae27886

Webkit GitHub Source - https://github.com/WebKit/WebKit/blob/ecaf5946d7a021d6e1d8bda4bb6e2c990a73d26a/Source/WebCore/rendering/svg/RenderSVGRoot.cpp#LL108 & https://github.com/WebKit/WebKit/blob/ecaf5946d7a021d6e1d8bda4bb6e2c990a73d26a/Source/WebCore/rendering/svg/RenderSVGRoot.cpp#L118

Test Failing (Firefox Nightly 109 & Chrome Canary 110 passes) - https://jsfiddle.net/28hwu6cy/show

Just wanted to raise bug before trying to merge this fix.

Thanks!
Comment 1 Radar WebKit Bug Importer 2022-12-12 11:31:17 PST
<rdar://problem/103262534>
Comment 2 Ahmad Saleem 2023-05-18 07:48:44 PDT
    if (!isHorizontalWritingMode())
        intrinsicSize = intrinsicSize.transposedSize();    

 if (!isHorizontalWritingMode())
                intrinsicRatioValue = 1 / intrinsicRatio

^ This make us pass another one of the test similar to Blink patch. I tried that in the past but didn't work. I might have done something silly.
Comment 3 Ahmad Saleem 2023-05-18 08:35:50 PDT
https://github.com/WebKit/WebKit/pull/14014 <- at least fixing one test case.