<rdar://problem/8488444> REGRESSION (r67771)
https://bugs.webkit.org/show_bug.cgi?id=47434
Crash when printing in RenderBlock::markDescendantBlocksAndLinesForLayout
Reviewed by Dan Bernstein
Added printing/simultaneous-position-float-change.html
Remove the markDescendantBlocksAndLinesForLayout method since it can walk m_floatingObjects lists with deleted
objects in them. Make the mechanism for relayout when the page height changes the same as the one when pageY
changes and just tie a concept of pageHeightChanged to the layout state. If that is set, blocks will just
automatically mark themselves as needing layout.
WebCore:
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
(WebCore::LayoutState::LayoutState):
(WebCore::LayoutState::pageHeight):
(WebCore::LayoutState::pageHeightChanged):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::positionNewFloats):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
* rendering/RenderBox.h:
(WebCore::RenderBox::markForPaginationRelayoutIfNeeded):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutHorizontalBox):
(WebCore::RenderFlexibleBox::layoutVerticalBox):
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
(WebCore::RenderView::layout):
* rendering/RenderView.h:
(WebCore::RenderView::setPageHeight):
(WebCore::RenderView::pushLayoutState):
(WebCore::LayoutStateMaintainer::LayoutStateMaintainer):
(WebCore::LayoutStateMaintainer::push):
LayoutTests:
* platform/mac/printing/simultaneous-position-float-change-expected.checksum: Added.
* platform/mac/printing/simultaneous-position-float-change-expected.png: Added.
* platform/mac/printing/simultaneous-position-float-change-expected.txt: Added.
* printing/simultaneous-position-float-change.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@69628
268f45cc-cd09-0410-ab3c-
d52691b4dbfc