Summary: | Ruby isn't displayed correctly after switching from display:none to display:inline | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexey Proskuryakov <ap> | ||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | NEW --- | ||||||
Severity: | Normal | CC: | ahmad.saleem792, hyatt, koivisto, ntim, rolandsteiner, zalan | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
URL: | http://kids.gakken.co.jp/kagaku/110ban/text/1480.html | ||||||
Attachments: |
|
Description
Alexey Proskuryakov
2010-10-13 09:27:30 PDT
I checked now, and this works in IE. 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? From the very little data that I have (this single site), it appears that IE compatibility can be a reasonable goal, yes. Ignoring the display type is probably ok actually. I imagine that's what IE is doing. 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? Would it make sense to decide whether to display <rt> inline based on whether <rp> was forced to be anything but display:none? 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. I think this might be fixed with the recent ruby rewrite. |