Bug 135383

Summary: Alt texts are rendered horizontally in vertical writing mode
Product: WebKit Reporter: Takeshi Kurosawa <taken.spc>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, ap, changseok, esprehn+autocc, ews-watchlist, glenn, koivisto, kondapallykalyan, mitz, mmaxfield, pdr, rniwa, sabouhallawa, simon.fraser, syoichi, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Testcase
none
Screenshot of testcase
none
[fast-cq]Patch none

Description Takeshi Kurosawa 2014-07-29 06:31:40 PDT
Created attachment 235683 [details]
Testcase

Alt texts for missing images are not rendered vertically in vertical writing mode and orientation of text is incorrect.

Expected rendering:
- Alt text: rendered vertically in vertical writing mode
- Japanese characters (fullwidth): glyphs are not rotated
- Latin characters (halfwidth): glyphs are rotated clockwise 90 degrees

Actual rendering:
- Alt text: rendered horizontally in vertical writing mode
- Japanese characters (fullwidth): glyphs are rotated counter-clockwise 90 degrees
- Latin characters (halfwidth): glyphs are not rotated
Comment 1 Takeshi Kurosawa 2014-07-29 06:33:17 PDT
Created attachment 235684 [details]
Screenshot of testcase

The alt text is rendered horizontally and orientation of text is incorrect.
Comment 2 Ahmad Saleem 2023-05-06 06:57:51 PDT
I am able to reproduce this bug in Safari 16.4.1 & WebKit ToT where ALT text is not respecting vertical writing mode.

Chrome Canary 115 and Firefox Nightly 114 works fine.
Comment 3 zalan 2023-05-06 21:32:11 PDT
Created attachment 466256 [details]
[fast-cq]Patch
Comment 4 zalan 2023-05-06 21:34:16 PDT
Sadly the test case won't produce any alt text as it is too long and it covers the broken image icon (shorter text will paint fine).
Comment 5 EWS 2023-05-07 06:20:40 PDT
Committed 263776@main (92a220066f0e): <https://commits.webkit.org/263776@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 466256 [details].
Comment 6 Radar WebKit Bug Importer 2023-05-07 06:21:21 PDT
<rdar://problem/109004347>
Comment 7 Ahmad Saleem 2023-05-08 17:18:58 PDT
(In reply to zalan from comment #4)
> Sadly the test case won't produce any alt text as it is too long and it
> covers the broken image icon (shorter text will paint fine).

Sorry to bump but we have WPT test for long ALT Text here: http://wpt.live/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/input-image-inline-alt.html

Which we are failing even after this patch on WebKit ToT. Just highlighting something you mentioned. Happy to create new bug to track this failure.
Comment 8 zalan 2023-05-08 17:52:06 PDT
(In reply to Ahmad Saleem from comment #7)
> (In reply to zalan from comment #4)
> > Sadly the test case won't produce any alt text as it is too long and it
> > covers the broken image icon (shorter text will paint fine).
> 
> Sorry to bump but we have WPT test for long ALT Text here:
> http://wpt.live/html/rendering/replaced-elements/attributes-for-embedded-
> content-and-images/input-image-inline-alt.html
> 
> Which we are failing even after this patch on WebKit ToT. Just highlighting
> something you mentioned. Happy to create new bug to track this failure.
please do. This bug was about vertical text.