[webkit-reviews] review requested: [Bug 31247] text-indent is unexpectedly applied to <ruby> : [Attachment 43412] patch - reset 'text-indent' on <ruby> and <rt> elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 18 01:20:01 PST 2009


Roland Steiner <rolandsteiner at google.com> has asked  for review:
Bug 31247: text-indent is unexpectedly applied to <ruby>
https://bugs.webkit.org/show_bug.cgi?id=31247

Attachment 43412: patch - reset 'text-indent' on <ruby> and <rt> elements
https://bugs.webkit.org/attachment.cgi?id=43412&action=review

------- Additional Comments from Roland Steiner <rolandsteiner at google.com>
The ruby uses block objects to align the ruby text with its base: RenderRubyRun
(anonymous, wrapping a base and a text), RenderRubyBase (anonymous, containing
the base text) and RenderRubyText (<rt>, containing the annotation text).
RenderRuby, corresponding to the <ruby> element is an inline renderer. 

However, <ruby> is just a means to add annotations to a base text and thus not
seen to open a block. Therefore, text-indent should not apply. Thus, the patch
changes the default UA style-sheet to reset 'text-indent' to 0.

I was considering whether a hard-coded approach to take out the "block-ness"
wouldn't be better, but at least for now I went with the KISS principle.

There is also the question whether we we need to consider other CSS constructs
that may have similar effects, such as :first-line (?). However, as a
pseudo-element this needs a selector subject, so AFAICT you'd need some
contrived CSS though for those to effect ruby in an non-intended way. Therefore
I left the patch with only addressing text-indent for the time being.


More information about the webkit-reviews mailing list