NEW 62854
Vertical text in ruby element is not rendered properly if writing-mode is set dynamically
https://bugs.webkit.org/show_bug.cgi?id=62854
Summary Vertical text in ruby element is not rendered properly if writing-mode is set...
Ryosuke Niwa
Reported 2011-06-17 04:05:32 PDT
Open the url (Simple RTE shows you a scary XSS warning but you can trust me :)) Vertical text isn't rendered properly.
Attachments
reduction (545 bytes, text/html)
2011-06-17 04:24 PDT, Ryosuke Niwa
no flags
correct rendering (471 bytes, text/html)
2011-06-17 13:14 PDT, Ryosuke Niwa
no flags
Proposed patch for FreeType fonts (14.20 KB, patch)
2012-08-17 10:28 PDT, Denis Nomiyama (dnomi)
jchaffraix: review-
Ryosuke Niwa
Comment 1 2011-06-17 04:24:31 PDT
Created attachment 97578 [details] reduction Here's a reduction. The key is to wrap the contents by ruby element and set -webkit-writing-mode in script. WebKit then does not render vertical text properly.
Ryosuke Niwa
Comment 2 2011-06-17 04:25:50 PDT
I'd say this is a major loss of function since I can't read the text.
Ryosuke Niwa
Comment 3 2011-06-17 13:14:39 PDT
Created attachment 97644 [details] correct rendering
Denis Nomiyama (dnomi)
Comment 4 2012-08-17 10:28:05 PDT
Created attachment 159154 [details] Proposed patch for FreeType fonts I have tested this issue against the GTK with FreeType port, and I have noticed that both test contents (dynamic -webkit-writing-mode or not) don't work properly on this port. Mainly because texts are rotated 90 degrees, which make difficult to read. I have also noticed this problem is not only related to ruby elements but all CJK texts displayed with vertical-rl. I have been working on a fix for GTK/FreeType port and it would be great if someone could have a look at it. Please let me know if it would be better to raise a new bug report for this patch as this one is more related to dynamic -webkit-writing-mode. Many thanks.
Julien Chaffraix
Comment 5 2012-08-22 19:10:10 PDT
Comment on attachment 159154 [details] Proposed patch for FreeType fonts View in context: https://bugs.webkit.org/attachment.cgi?id=159154&action=review Thanks for the patch. r-'ing the patch because it's on the wrong bug, I don't know FreeType so I haven't looked at the change. > Source/WebCore/ChangeLog:4 > + [Layout and Rendering] This fix rotates CJK characters -90 degrees when using -webkit-writing-mode as vertical-rl. > + This fix is only applied to FreeType font. It's not good practice to hijack a bug to post your patch. This patch has *nothing* to do with the original bug (which is as you mentioned is specific to ruby) and should be attached on its own bug. Also you should use the bug title in your ChangeLog, not another name: if the bug title doesn't match what you want, change it to match the underlying bug. If you are unsure about the bugzilla etiquette, free free to check with people on #webkit.
Denis Nomiyama (dnomi)
Comment 6 2012-09-10 10:43:32 PDT
My apologies for attaching a patch to the wrong bug report. I didn't realize there was already a bug for it. The patch has been attached to Bug 50619.
Note You need to log in before you can comment on or make changes to this bug.