DescriptionRuby: Update beforeChild when redirecting renderer insertion to a child.
In addChild(), beforeChild needs to be a descendant of the parent
that's attempting to insert a renderer.
Therefore, when inserting a something, and we decide to drill further
into the tree to find a suitable parent for the new renderer, we need
to update beforeChild as we go, to make sure that it remains a
descendant of the parent that's trying to do the insertion.
In this case it was the list item code that attempted to insert a list
item marker beside a RenderRubyRun (beforeChild). However,
RenderRubyAsBlock::addChild() doesn't want that, so it tells its
RenderRubyRun child to insert it instead. RenderRubyRun will in turn
do the same thing, redirect insertion to its RenderRubyBase child,
which finally is a suitable parent for the marker (and pretty much
anything else). Doing this without updating beforeChild as we go,
caused problems, since beforeChild suddenly was a parent of the
inserting parent.
BUG=395522
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183761
Patch Set 1 #Patch Set 2 : rebase master #Patch Set 3 : Add similar code to RenderRubyAsInline::addChild(). #Patch Set 4 : rebase master #
Total comments: 2
Patch Set 5 : code review #
Messages
Total messages: 14 (4 generated)
|