Frame flattening ASSERT(!needsLayout()) in FrameView::paintContents()
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Mar 2012 20:22:55 +0000 (20:22 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Mar 2012 20:22:55 +0000 (20:22 +0000)
commit8fc3859c65d51485188ba0ce31d9fcd137b58227
treed23eb296c755df590feb7bedb24826f4e1b6a284
parent073f3b8184359ea183396b3e9e08d26557b9d04d
Frame flattening ASSERT(!needsLayout()) in FrameView::paintContents()
https://bugs.webkit.org/show_bug.cgi?id=80155

Patch by Zalan Bujtas <zbujtas@gmail.com> on 2012-03-14
Reviewed by Antti Koivisto.

Source/WebCore:

This patch ensures that an iframe only schedules and calls parent's layout,
when it is going to be flattened. Non-flattened iframe does not affect
parent's layout, so normal layout flow applies. isInSubframeLayoutWithFrameFlattening()
function has been added to test whether a particular child frame is changing
parent's layout. This function also ensures that scheduleRelayout() and layout()
are in sync of checking againts frame flattening.

Test: fast/frames/flattening/iframe-flattening-fixed-width-and-height-no-scrolling-with-js-forced-layout.html

* page/FrameView.cpp:
(WebCore::FrameView::avoidScrollbarCreation):
(WebCore::FrameView::layout):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::isInChildFrameWithFrameFlattening):
(WebCore):
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
* page/FrameView.h:
(FrameView):
* rendering/RenderIFrame.h:
(RenderIFrame):
(WebCore::RenderIFrame::renderName):

LayoutTests:

* fast/frames/flattening/iframe-flattening-fixed-width-and-height-no-scrolling-with-js-forced-layout-expected.txt: Added.
* fast/frames/flattening/iframe-flattening-fixed-width-and-height-no-scrolling-with-js-forced-layout.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/frames/flattening/iframe-flattening-fixed-width-and-height-no-scrolling-with-js-forced-layout-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/flattening/iframe-flattening-fixed-width-and-height-no-scrolling-with-js-forced-layout.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/rendering/RenderIFrame.h