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. Does anybody have any idea what code resetting the margins, and what I need to do to talk it out of doing this? Regards, Eric
_______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

