Bug 135383 - Alt texts are rendered horizontally in vertical writing mode
Summary: Alt texts are rendered horizontally in vertical writing mode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-07-29 06:31 PDT by Takeshi Kurosawa
Modified: 2023-05-08 17:52 PDT (History)
17 users (show)

See Also:


Attachments
Testcase (435 bytes, text/html)
2014-07-29 06:31 PDT, Takeshi Kurosawa
no flags Details
Screenshot of testcase (59.27 KB, image/png)
2014-07-29 06:33 PDT, Takeshi Kurosawa
no flags Details
[fast-cq]Patch (8.38 KB, patch)
2023-05-06 21:32 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.