[New Multicolumn] Table cells and list items need to work as multicolumn blocks.
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jan 2014 17:14:22 +0000 (17:14 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jan 2014 17:14:22 +0000 (17:14 +0000)
commit3931e4b479c42c3991004cc5e8e71e12b6e3db79
tree1c7e0e4f3d5f18f36d4505541c10bcdcbf60eaa6
parent5f1d89fc2efb8accb9cdaecd2f1de2c6dc394ac0
[New Multicolumn] Table cells and list items need to work as multicolumn blocks.
https://bugs.webkit.org/show_bug.cgi?id=127365

This patch is a first step towards eliminating RenderMultiColumnBlock and moving
all its functionality into RenderBlockFlow. Doing so will allow table cells, list
items and the RenderView to use the new multi-column layout.

Reviewed by Simon Fraser.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::setMultiColumnFlowThread):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderBlockFlow::multiColumnFlowThread):
Add the flow thread pointer to the multi-column flow thread to RenderBlockFlow's
rare data. This lets us use only one pointer in the rare data to point to an object
that can hold all of the rest of the multi-column info.

* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
Move the construction of the flow thread to the constructor. This ensures we
never have a null flow thread and lets us avoid having to null check it for
empty multi-column blocks.

(WebCore::RenderMultiColumnBlock::columnHeightAvailable):
(WebCore::RenderMultiColumnBlock::columnWidth):
(WebCore::RenderMultiColumnBlock::columnCount):
(WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth):
The above functions now call through to the multi-column flow thread for results.

(WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
 Set the column height available on the flow thread.

(WebCore::RenderMultiColumnBlock::relayoutForPagination):
The balancing pass and guard is in the multi-column flow thread now.

(WebCore::RenderMultiColumnBlock::addChild):
Don't have to create the flow thread here any longer, since we do it up front
in the constructor of RenderMultiColumnBlock.

(WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
Don't need the null check of the flow thread any more.

* rendering/RenderMultiColumnBlock.h:
Change the inlined functions to not be inlined, since they need to call
RenderMultiColumnFlowThread functions now.

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
Init the new member variables we moved here from RenderMultiColumnBlock.

(WebCore::RenderMultiColumnFlowThread::computeColumnCountAndWidth):
Moved from RenderMultiColumnBlock.

* rendering/RenderMultiColumnFlowThread.h:
Add public getters/setters to the member variables so that RenderMultiColumnBlock can
still see them. Move the member variables here from RenderMultiColumnBlock.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::calculateBalancedHeight):
(WebCore::RenderMultiColumnSet::prepareForLayout):
(WebCore::RenderMultiColumnSet::columnCount):
Call through to the flow thread instead.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlockFlow.cpp
Source/WebCore/rendering/RenderBlockFlow.h
Source/WebCore/rendering/RenderMultiColumnBlock.cpp
Source/WebCore/rendering/RenderMultiColumnBlock.h
Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp
Source/WebCore/rendering/RenderMultiColumnFlowThread.h
Source/WebCore/rendering/RenderMultiColumnSet.cpp