[webkit-dev] Ruby Text Enhancements
rolandsteiner at google.com
Wed Oct 13 22:52:12 PDT 2010
Thanks a lot for the review! The patch has landed and should be a much
cleaner foundation for generated content (which may also have to be
Speaking of general ruby text enhancements: there is a new bug
https://bugs.webkit.org/show_bug.cgi?id=47596 regarding the ruby display
types. The previous consensus was that we shouldn't implement them (yet).
Furthermore, the expectation in that bug description would run contrary to
the spec anyway: setting <rt> to 'display: inline' should display it as ruby
text (rather than inline). Do you guys have any suggestions on this?
On Thu, Oct 7, 2010 at 2:14 PM, Roland Steiner <rolandsteiner at google.com>wrote:
> Seeing that this is progressing ad a quick pace, could I entice some kind
> reviewer to r+ my patch for bug
> https://bugs.webkit.org/show_bug.cgi?id=41040 before I get (another...)
> mid-air collision?
> ^_^; Roland
> On Wed, Oct 6, 2010 at 5:34 PM, Eric Mader <emader at apple.com> wrote:
>> On Oct 5, 2010, at 6:25 PM, David Hyatt wrote:
>> On Oct 5, 2010, at 7:33 PM, Eric Mader wrote:
>> On Sep 24, 2010, at 8:02 PM, David Hyatt wrote:
>> This is a tough problem. It seems like you have to get involved in the
>> line layout code e.g., findNextLineBreak in order to really do the right
>> thing. findNextLineBreak uses an iterator that walks the objects, so it's
>> easier to tell what text came before you and what text comes after you. You
>> can also tell whether or not that text will even fit on the line and
>> possibly do the margin hacking there.
>> I just did a prototype that checks for a RenderRubyRun in the isReplaced()
>> code inside findNextLineBreak and calls a method on the RenderRubyRun that
>> takes the last and the next object and sets negative margins by calling
>> setMarginLeft() and setMarginRight(). I stepped through this code and it
>> computes the correct margins, but the margins don't seem to take - the ruby
>> doesn't overlap the surrounding text.
>> Guessing that some other code is resetting the margins, I modified the
>> code to cache the computed margins in the RenderRubyRun object and return
>> the cached values through subclassed marginLeft() and marginRight() methods.
>> With this change, the ruby displays as I would expect.
>> It's probably RenderBlockLineLayout line 348 getting you in trouble (
>> computeInlineDirectionPositionsForLine). computeLogicalWidth is called
>> again, and that will recompute the left/right margins and blow away the
>> changes you made to them. I have no idea why that call is there. It should
>> not be necessary, but maybe there's something subtle I'm missing. You could
>> try removing it, and see if that fixes the problem (it should).
>> Yes, that did the trick! I haven't noticed any obvious problems with that
>> line removed, but I haven't done much testing yet.
>> (hyatt at apple.com)
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev