<rdar://problem/8488444> REGRESSION (r67771)
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Oct 2010 01:36:33 +0000 (01:36 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Oct 2010 01:36:33 +0000 (01:36 +0000)
commit322c1689a9c79e806febd75010a61803699ca789
treee938382da9ad3e9cfa79fc4384f845c2b8ab730f
parent7828485d9d8429483fc7bc3759fca675354e632b
<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
15 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/printing/simultaneous-position-float-change-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/printing/simultaneous-position-float-change-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/printing/simultaneous-position-float-change-expected.txt [new file with mode: 0644]
LayoutTests/printing/simultaneous-position-float-change.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/LayoutState.cpp
WebCore/rendering/LayoutState.h
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderBlock.h
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderBox.h
WebCore/rendering/RenderFlexibleBox.cpp
WebCore/rendering/RenderView.cpp
WebCore/rendering/RenderView.h