WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
47596
Ruby isn't displayed correctly after switching from display:none to display:inline
https://bugs.webkit.org/show_bug.cgi?id=47596
Summary
Ruby isn't displayed correctly after switching from display:none to display:i...
Alexey Proskuryakov
Reported
2010-10-13 09:27:30 PDT
Created
attachment 70615
[details]
test case See attached test case, or try switching Furigana on at <
http://kids.gakken.co.jp/kagaku/110ban/text/1480.html
>. I'm not sure whether this is really expected to work. The default style for rt is block, but the site sets it to inline when toggling ruby on. But then, CSS3 Ruby Module has a whole lot of custom display styles for ruby, see <
http://www.w3.org/TR/css3-ruby/#display
>. So, perhaps both block and inline need some custom translation when applied to this element. I haven't checked whether this works in IE8.
Attachments
test case
(708 bytes, text/html)
2010-10-13 09:27 PDT
,
Alexey Proskuryakov
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2010-10-13 09:27:56 PDT
<
rdar://problem/8452319
>
Alexey Proskuryakov
Comment 2
2010-10-13 13:41:52 PDT
I checked now, and this works in IE.
Roland Steiner
Comment 3
2010-10-13 19:39:40 PDT
It could be argued that the current behavior is correct as the ruby text is displayed inline, rather than as ruby text, just as specified by the JS. Toggling works if the code is changed to toggle between 'none' and empty string (i.e., not overwriting the browser default. It doesn't work correctly if toggling between 'none' and 'ruby-text' - this is due to the fact that so far we avoided implementing the ruby-specific display types, because of questions of the state and direction of the ruby spec(s). IIRC the current code explicitly "aborts" ruby rendering if the user tampers with the display type. If compatibility with IE is a goal, then one short term solution might be to just entirely ignore the display type on <rt> unless it's 'none', but I'm not sure that's a good idea. OTOH, even if we fully implement the ruby display-types, the example would still not work as intended, because it'd then need to specify 'ruby-text' rather than 'inline' (the latter would continue to be displayed as-is). Any inputs or other suggestions?
Alexey Proskuryakov
Comment 4
2010-10-13 22:32:43 PDT
From the very little data that I have (this single site), it appears that IE compatibility can be a reasonable goal, yes.
Dave Hyatt
Comment 5
2010-10-14 12:22:12 PDT
Ignoring the display type is probably ok actually. I imagine that's what IE is doing.
Roland Steiner
Comment 6
2010-10-14 21:52:16 PDT
Ignoring the display type does, however, imply that you could never (e.g., in user style sheets, or using JS) change <rt> to be displayed inline rather than as ruby text, on any site or device. Are you positive that sacrificing this functionality is a good exchange for the sake of IE compatibility?
Alexey Proskuryakov
Comment 7
2010-10-14 23:36:39 PDT
Would it make sense to decide whether to display <rt> inline based on whether <rp> was forced to be anything but display:none?
Roland Steiner
Comment 8
2010-10-18 19:18:17 PDT
I'm not sure about this suggestion - on one hand it could certainly serve as a heuristic. On the other hand, not all ruby uses <rp>, and it would be a pretty opaque condition to describe to new developers.
Alexey Proskuryakov
Comment 9
2010-11-09 20:00:04 PST
See also:
bug 44515
.
Tim Nguyen (:ntim)
Comment 10
2024-03-10 23:28:43 PDT
I think this might be fixed with the recent ruby rewrite.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug