Repeated layouts in Mail due to viewport units being used with auto-sizing
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Apr 2017 16:51:11 +0000 (16:51 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Apr 2017 16:51:11 +0000 (16:51 +0000)
commit881fff6e347aa377ad01c71904e76e28bfa0c26c
treea96cdfda17925e2753f3b9bfdf1ac6c2d494fa56
parentdf3571538891dbac7e516474498d4776a8348b21
Repeated layouts in Mail due to viewport units being used with auto-sizing
https://bugs.webkit.org/show_bug.cgi?id=171371
<rdar://problem/28780084>

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: css3/viewport-percentage-lengths/vh-auto-size.html

Auto-sizing code would adjust the size of the view in the beginning of layout(). This would
end up invalidating style for elements that use vh units and we would perform main layout
with unclean style. This would result in endless layout loops and hit assert on debug.

* page/FrameView.cpp:
(WebCore::FrameView::availableContentSizeChanged):

    Ensure we heve clean style after resize if we are in pre-layout.

LayoutTests:

* css3/viewport-percentage-lengths/vh-auto-size-expected.html: Added.
* css3/viewport-percentage-lengths/vh-auto-size.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/viewport-percentage-lengths/vh-auto-size-expected.html [new file with mode: 0644]
LayoutTests/css3/viewport-percentage-lengths/vh-auto-size.html [new file with mode: 0644]
LayoutTests/platform/ios/TestExpectations
LayoutTests/platform/mac-wk1/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp