[New Multicolumn] Change inRenderFlowThread to follow containing block chain
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Mar 2013 21:44:06 +0000 (21:44 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Mar 2013 21:44:06 +0000 (21:44 +0000)
commit0658876d821fcf5cbcd8f7e29115d7c2ca98a183
treeed2d6a62e4ae47fd170eef8bb958f0c5a87ccd29
parentb9219663dab9c5bb8bf5f74c6420417c2a363052
[New Multicolumn] Change inRenderFlowThread to follow containing block chain
https://bugs.webkit.org/show_bug.cgi?id=111206

Reviewed by Simon Fraser.

Source/WebCore:

This patch removes inRenderFlowThread and changes enclosingRenderFlowThread()
to flowThreadContainingBlock(). flowThreadContainingBlock() now follows
the containing block chain instead of the parent chain when outside of layout.
(It already did the right thing when called during layout.)

By removing inRenderFlowThread (which was following the parent chain), all
code that is checking for flow thread containment now correctly uses the
containing block chain. This allows for content to escape in-flow flow threads
and do the right thing without asserting.

Test: fast/multicol/positioned-outside-of-columns.html

* dom/WebKitNamedFlow.cpp:
(WebCore::inFlowThread):
(WebCore::WebKitNamedFlow::getRegionsByContent):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removeLeftoverAnonymousBlock):
(WebCore::RenderBlock::collapseAnonymousBoxChild):
(WebCore::RenderBlock::updateRegionsAndExclusionsLogicalSize):
(WebCore::RenderBlock::computeRegionRangeForBlock):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::computeOverflow):
(WebCore::RenderBlock::determineLogicalLeftPositionForChild):
(WebCore::RenderBlock::computeLogicalLocationForFloat):
(WebCore::RenderBlock::logicalLeftOffsetForContent):
(WebCore::RenderBlock::logicalRightOffsetForContent):
(WebCore::RenderBlock::hasNextPage):
(WebCore::RenderBlock::applyBeforeBreak):
(WebCore::RenderBlock::applyAfterBreak):
(WebCore::RenderBlock::pageLogicalTopForOffset):
(WebCore::RenderBlock::pageLogicalHeightForOffset):
(WebCore::RenderBlock::pageRemainingLogicalHeightForOffset):
(WebCore::RenderBlock::adjustForUnsplittableChild):
(WebCore::RenderBlock::adjustLinePositionForPagination):
(WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
(WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage):
(WebCore::RenderBlock::regionAtBlockOffset):
(WebCore::RenderBlock::setStaticInlinePositionForChild):
(WebCore::RenderBlock::logicalWidthChangedInRegions):
(WebCore::RenderBlock::clampToStartAndEndRegions):
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::layoutExclusionShapeInsideInfo):
(WebCore::LineLayoutState::LineLayoutState):
(WebCore::LineLayoutState::flowThread):
(WebCore::LineLayoutState::setFlowThread):
(LineLayoutState):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::linkToEndLineIfNeeded):
(WebCore::RenderBlock::layoutInlineChildren):
(WebCore::RenderBlock::determineStartPosition):
(WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clearRenderBoxRegionInfo):
(WebCore::RenderBox::renderBoxRegionInfo):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::objectInFlowRegion):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::updateAlwaysCreateLineBoxes):
* rendering/RenderLayer.cpp:
(WebCore::accumulateOffsetTowardsAncestor):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::canBeComposited):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::layout):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::locateFlowThreadContainingBlock):
(WebCore::RenderObject::containerForRepaint):
(WebCore::RenderObject::willBeRemovedFromTree):
(WebCore::RenderObject::removeFromRenderFlowThread):
(WebCore::RenderObject::removeFromRenderFlowThreadRecursive):
* rendering/RenderObject.h:
(RenderObject):
(WebCore::RenderObject::flowThreadContainingBlock):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::setObjectStyleInRegion):
* rendering/RenderView.cpp:
(WebCore::RenderView::addChild):
(WebCore::RenderView::initializeLayoutState):
(WebCore::RenderView::setSelection):
* rendering/RenderView.h:
(WebCore::RenderView::pushLayoutState):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::containingRegion):
(WebCore::RootInlineBox::setContainingRegion):

LayoutTests:

* fast/multicol/positioned-outside-of-columns-expected.html: Added.
* fast/multicol/positioned-outside-of-columns.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/multicol/positioned-outside-of-columns-expected.html [new file with mode: 0644]
LayoutTests/fast/multicol/positioned-outside-of-columns.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/WebKitNamedFlow.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlowThread.cpp
Source/WebCore/rendering/RenderGrid.cpp
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderMedia.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderRegion.cpp
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RenderView.h
Source/WebCore/rendering/RootInlineBox.cpp