Don't pass semi-detached renderers to the flow thread (or anyone else).

Clean up RenderBlock::removeLeftoverAnonymousBlock(), and make sure that it
doesn't pass weird semi-detached renderers to anyone.

Promote the children of the leftover block (like before), then keep the
leftover block right in front of them (this is new; although it actually used
to be exactly there, it used to be semi-detached, confusing anyone who wanted
to traverse the tree), then notify the flow thread (and the grid code, that
doesn't seem to care either way), then manually detach the leftover block (like
before, only that it's a one-liner now) and finally destroy it.

The leftover block used to be partially detached in the sense that it had its
nextSibling reset, but still had its parent and previousSibling left intact.
Missing a nextSibling could make the flow thread code incorrectly believe that
we were removing the last piece of multicol content, and thus trigger a
deletion of a column set. This would in turn trigger an assertion failure when
attempting to insert more content later on, because the flow thread wouldn't
find any suitable column set.

BUG=457461
R=dsinclair@chromium.org,jchaffraix@chromium.org

Review URL: https://codereview.chromium.org/922173002

git-svn-id: svn://svn.chromium.org/blink/trunk@191096 bbb929c8-8fbe-4397-9dbb-9b2b20218538
6 files changed
tree: ad43b141d7e0f7da172cb71c400e7b8aa3fdb291
  1. third_party/