Use LayoutObject to locate the flow thread.

No need for (poorly) duplicated efforts in DeprecatedPaintLayer.

Cleaned up the code a little while I was here. One of the transform checks was
getting in the way, so I removed them both. They did nothing useful anyway.
The flow thread (i.e. pagination layer) itself can never be transformed.

Also removed the fast-path completely, since most layers don't use it.

When all this was gone, it became obvious that we should just fold
updatePagination() into updatePaginationRecursive().

What really went wrong here was that we failed to re-establish the layers when
evacuating a flow thread (which happens when a multicol container ceases to be
one), so we just kept what we had, and the flow thread got deleted without any
of the decendant layers noticing (so that we were pointing to dead enclosing
pagination layers). There's code in LayoutBoxModelObject::moveChildTo() that
normally handles such things (notifications that involve re-establishing the
layers), but only for LayoutInline and LayoutBlock. In this case we were
dealing with a LayoutSVGRoot, which is LayoutReplaced. There could be other
problems with SVG with layers inside because of this, but in this bug, the
correct fix is to just disallow pagination-awareness inside SVG, which
LayoutObject::locateFlowThreadContainingBlock() already does for us, if we but
just bother to invoke it.

BUG=507992
R=chrishtr@chromium.org

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

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