Tables don't repaginate properly when the pagination height changes or the pagination...
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Feb 2015 21:39:00 +0000 (21:39 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Feb 2015 21:39:00 +0000 (21:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.
Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
https://bugs.webkit.org/show_bug.cgi?id=141207
<rdar://problem/18387659>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/table-dynamic-movement.html

Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.

Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
ended up getting marked for relayout.

Make sure rows do the right thing as well.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::RenderBlockFlow::positionNewFloats):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
* rendering/RenderTable.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):

LayoutTests:

* fast/multicol/table-dynamic-movement-expected.html: Added.
* fast/multicol/table-dynamic-movement.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179627 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/multicol/table-dynamic-movement-expected.html [new file with mode: 0644]
LayoutTests/fast/multicol/table-dynamic-movement.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderBlockFlow.cpp
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
Source/WebCore/rendering/RenderTable.cpp
Source/WebCore/rendering/RenderTable.h
Source/WebCore/rendering/RenderTableRow.cpp
Source/WebCore/rendering/RenderTableSection.cpp

index 3802339..b780960 100644 (file)
@@ -1,3 +1,14 @@
+2015-02-03  David Hyatt  <hyatt@apple.com>
+
+        Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
+        https://bugs.webkit.org/show_bug.cgi?id=141207
+        <rdar://problem/18387659>
+
+        Reviewed by Dean Jackson.
+
+        * fast/multicol/table-dynamic-movement-expected.html: Added.
+        * fast/multicol/table-dynamic-movement.html: Added.
+
 2015-02-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
 
         When using SVG as an image, we should load datauri images when these images are not in the image cache.
diff --git a/LayoutTests/fast/multicol/table-dynamic-movement-expected.html b/LayoutTests/fast/multicol/table-dynamic-movement-expected.html
new file mode 100644 (file)
index 0000000..ed346e4
--- /dev/null
@@ -0,0 +1,9 @@
+
+<div id='test' style="-webkit-columns:2; height:500px; border:3px solid black; -webkit-column-fill: auto"><div style="height:150px; background-color:lime"></div>
+
+<table style="height:300px"><tr><td style="vertical-align:middle; height:100%">Hello world<br><img style="height:250px;width:175px; background-color:purple">
+<td style="vertical-align:middle; height:100%">Also world<br>
+<img style="height:250px;width:175px; background-color:purple">
+</table>
+
+</div>
diff --git a/LayoutTests/fast/multicol/table-dynamic-movement.html b/LayoutTests/fast/multicol/table-dynamic-movement.html
new file mode 100644 (file)
index 0000000..6780d95
--- /dev/null
@@ -0,0 +1,21 @@
+
+<script>
+function doIt()
+{
+document.getElementById('test').offsetHeight
+document.getElementById('test').style.height = '500px';
+}
+</script>
+
+<div id='test' style="-webkit-columns:2; height:400px; border:3px solid black; -webkit-column-fill: auto"><div style="height:150px; background-color:lime"></div>
+
+<table style="height:300px"><tr><td style="vertical-align:middle; height:100%">Hello world<br><img style="height:250px;width:175px; background-color:purple">
+<td style="vertical-align:middle; height:100%">Also world<br>
+<img style="height:250px;width:175px; background-color:purple">
+</table>
+
+</div>
+
+<script>
+doIt()
+</script>
index 8cc5774..0beb032 100644 (file)
@@ -1,3 +1,39 @@
+2015-02-03  David Hyatt  <hyatt@apple.com>
+
+        Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
+        https://bugs.webkit.org/show_bug.cgi?id=141207
+        <rdar://problem/18387659>
+
+        Reviewed by Dean Jackson.
+
+        Added fast/multicol/table-dynamic-movement.html
+
+        Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.
+
+        Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
+        ended up getting marked for relayout.
+
+        Make sure rows do the right thing as well.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::layoutPositionedObjects):
+        (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
+        * rendering/RenderBlock.h:
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::layoutBlockChild):
+        (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
+        (WebCore::RenderBlockFlow::positionNewFloats):
+        * rendering/RenderDeprecatedFlexibleBox.cpp:
+        (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
+        (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
+        * rendering/RenderTable.h:
+        * rendering/RenderTableRow.cpp:
+        (WebCore::RenderTableRow::layout):
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::layout):
+
 2015-02-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
 
         When using SVG as an image, we should load datauri images when these images are not in the image cache.
index f8d727f..a9fd291 100644 (file)
@@ -1335,8 +1335,7 @@ void RenderBlock::layoutPositionedObjects(bool relayoutChildren, bool fixedPosit
         if (relayoutChildren && r.needsPreferredWidthsRecalculation())
             r.setPreferredLogicalWidthsDirty(true, MarkOnlyThis);
         
-        if (!r.needsLayout())
-            r.markForPaginationRelayoutIfNeeded();
+        r.markForPaginationRelayoutIfNeeded();
         
         // We don't have to do a full layout.  We just have to update our position. Try that first. If we have shrink-to-fit width
         // and we hit the available width constraint, the layoutIfNeeded() will catch it and do a full layout.
@@ -1384,8 +1383,7 @@ void RenderBlock::markPositionedObjectsForLayout()
 
 void RenderBlock::markForPaginationRelayoutIfNeeded()
 {
-    ASSERT(!needsLayout());
-    if (needsLayout())
+    if (needsLayout() || !view().layoutState()->isPaginated())
         return;
 
     if (view().layoutState()->pageLogicalHeightChanged() || (view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(this, logicalTop()) != pageLogicalOffset()))
index 8ae1297..17e5202 100644 (file)
@@ -114,7 +114,7 @@ public:
     bool generatesLineBoxesForInlineChild(RenderObject*);
 
     void markPositionedObjectsForLayout();
-    virtual void markForPaginationRelayoutIfNeeded() override final;
+    virtual void markForPaginationRelayoutIfNeeded() override;
     
     // FIXME-BLOCKFLOW: Remove virtualizaion when all of the line layout code has been moved out of RenderBlock
     virtual bool containsFloats() const { return false; }
index 2e135c7..9972a9e 100644 (file)
@@ -695,8 +695,7 @@ void RenderBlockFlow::layoutBlockChild(RenderBox& child, MarginInfo& marginInfo,
             previousFloatLogicalBottom = std::max(previousFloatLogicalBottom, oldLogicalTop + childBlockFlow->lowestFloatLogicalBottom());
     }
 
-    if (!child.needsLayout())
-        child.markForPaginationRelayoutIfNeeded();
+    child.markForPaginationRelayoutIfNeeded();
 
     bool childHadLayout = child.everHadLayout();
     bool childNeededLayout = child.needsLayout();
@@ -734,8 +733,7 @@ void RenderBlockFlow::layoutBlockChild(RenderBox& child, MarginInfo& marginInfo,
         if (childBlockFlow) {
             if (!child.avoidsFloats() && childBlockFlow->containsFloats())
                 childBlockFlow->markAllDescendantsWithFloatsForLayout();
-            if (!child.needsLayout())
-                child.markForPaginationRelayoutIfNeeded();
+            child.markForPaginationRelayoutIfNeeded();
         }
     }
 
@@ -1533,8 +1531,7 @@ LayoutUnit RenderBlockFlow::adjustBlockChildForPagination(LayoutUnit logicalTopA
         if (childRenderBlock) {
             if (!child.avoidsFloats() && childRenderBlock->containsFloats())
                 downcast<RenderBlockFlow>(*childRenderBlock).markAllDescendantsWithFloatsForLayout();
-            if (!child.needsLayout())
-                child.markForPaginationRelayoutIfNeeded();
+            child.markForPaginationRelayoutIfNeeded();
         }
 
         // Our guess was wrong. Make the child lay itself out again.
@@ -2450,13 +2447,11 @@ bool RenderBlockFlow::positionNewFloats()
 
         estimateRegionRangeForBoxChild(childBox);
 
+        childBox.markForPaginationRelayoutIfNeeded();
+        childBox.layoutIfNeeded();
+        
         LayoutState* layoutState = view().layoutState();
         bool isPaginated = layoutState->isPaginated();
-        if (isPaginated && !childBox.needsLayout())
-            childBox.markForPaginationRelayoutIfNeeded();
-        
-        childBox.layoutIfNeeded();
-
         if (isPaginated) {
             // If we are unsplittable and don't fit, then we need to move down.
             // We include our margins as part of the unsplittable area.
index c73fd3a..80faf36 100644 (file)
@@ -423,8 +423,7 @@ void RenderDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
             // Compute the child's vertical margins.
             child->computeAndSetBlockDirectionMargins(this);
 
-            if (!child->needsLayout())
-                child->markForPaginationRelayoutIfNeeded();
+            child->markForPaginationRelayoutIfNeeded();
             
             // Apply the child's current layout delta.
             layoutChildIfNeededApplyingDelta(child, childLayoutDelta);
@@ -499,8 +498,7 @@ void RenderDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
             if (oldChildHeight != child->height())
                 child->setChildNeedsLayout(MarkOnlyThis);
 
-            if (!child->needsLayout())
-                child->markForPaginationRelayoutIfNeeded();
+            child->markForPaginationRelayoutIfNeeded();
 
             layoutChildIfNeededApplyingDelta(child, childLayoutDelta);
 
@@ -744,8 +742,7 @@ void RenderDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren)
             // Add in the child's marginTop to our height.
             setHeight(height() + child->marginTop());
 
-            if (!child->needsLayout())
-                child->markForPaginationRelayoutIfNeeded();
+            child->markForPaginationRelayoutIfNeeded();
 
             // Now do a layout.
             layoutChildIfNeededApplyingDelta(child, childLayoutDelta);
index 5b4dd9e..c00c8d7 100644 (file)
@@ -1536,4 +1536,18 @@ const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel
     return style().borderStart();
 }
 
+void RenderTable::markForPaginationRelayoutIfNeeded()
+{
+    if (!view().layoutState()->isPaginated() || (!view().layoutState()->pageLogicalHeightChanged() && (!view().layoutState()->pageLogicalHeight() || view().layoutState()->pageLogicalOffset(this, logicalTop()) == pageLogicalOffset())))
+        return;
+    
+    // When a table moves, we have to dirty all of the sections too.
+    if (!needsLayout())
+        setChildNeedsLayout(MarkOnlyThis);
+    for (auto& child : childrenOfType<RenderTableSection>(*this)) {
+        if (!child.needsLayout())
+            child.setChildNeedsLayout(MarkOnlyThis);
+    }
+}
+
 }
index e01f7a9..e16ab93 100644 (file)
@@ -275,7 +275,9 @@ public:
     LayoutUnit offsetLeftForColumn(const RenderTableCol&) const;
     LayoutUnit offsetWidthForColumn(const RenderTableCol&) const;
     LayoutUnit offsetHeightForColumn(const RenderTableCol&) const;
-
+    
+    virtual void markForPaginationRelayoutIfNeeded() override final;
+    
 protected:
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override final;
     virtual void simplifiedNormalFlowLayout() override final;
index c426a7b..af92a35 100644 (file)
@@ -168,7 +168,7 @@ void RenderTableRow::layout()
     bool paginated = view().layoutState()->isPaginated();
                 
     for (RenderTableCell* cell = firstCell(); cell; cell = cell->nextCell()) {
-        if (!cell->needsLayout() && paginated && view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset())
+        if (!cell->needsLayout() && paginated && (view().layoutState()->pageLogicalHeightChanged() || (view().layoutState()->pageLogicalHeight() && view().layoutState()->pageLogicalOffset(cell, cell->logicalTop()) != cell->pageLogicalOffset())))
             cell->setChildNeedsLayout(MarkOnlyThis);
 
         if (cell->needsLayout()) {
index 26dd433..d2fc4cc 100644 (file)
@@ -392,9 +392,10 @@ void RenderTableSection::layout()
     m_grid.shrinkToFit();
 
     LayoutStateMaintainer statePusher(view(), *this, locationOffset(), hasTransform() || hasReflection() || style().isFlippedBlocksWritingMode());
-
+    bool paginated = view().layoutState()->isPaginated();
+    
     const Vector<int>& columnPos = table()->columnPositions();
-
+    
     for (unsigned r = 0; r < m_grid.size(); ++r) {
         Row& row = m_grid[r].row;
         unsigned cols = row.size();
@@ -417,8 +418,12 @@ void RenderTableSection::layout()
             cell->setCellLogicalWidth(tableLayoutLogicalWidth);
         }
 
-        if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer)
+        if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer) {
+            if (!rowRenderer->needsLayout() && paginated && view().layoutState()->pageLogicalHeightChanged())
+                rowRenderer->setChildNeedsLayout(MarkOnlyThis);
+
             rowRenderer->layoutIfNeeded();
+        }
     }
 
     statePusher.pop();