Title: [215874] trunk
- Revision
- 215874
- Author
- an...@apple.com
- Date
- 2017-04-27 09:51:11 -0700 (Thu, 27 Apr 2017)
Log Message
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.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (215873 => 215874)
--- trunk/LayoutTests/ChangeLog 2017-04-27 16:47:00 UTC (rev 215873)
+++ trunk/LayoutTests/ChangeLog 2017-04-27 16:51:11 UTC (rev 215874)
@@ -1,3 +1,14 @@
+2017-04-27 Antti Koivisto <an...@apple.com>
+
+ 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.
+
+ * css3/viewport-percentage-lengths/vh-auto-size-expected.html: Added.
+ * css3/viewport-percentage-lengths/vh-auto-size.html: Added.
+
2017-04-27 Joanmarie Diggs <jdi...@igalia.com>
AX: Inconsistent exposure of ARIA "button" role with non-false value of aria-haspopup
Added: trunk/LayoutTests/css3/viewport-percentage-lengths/vh-auto-size-expected.html (0 => 215874)
--- trunk/LayoutTests/css3/viewport-percentage-lengths/vh-auto-size-expected.html (rev 0)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/vh-auto-size-expected.html 2017-04-27 16:51:11 UTC (rev 215874)
@@ -0,0 +1,7 @@
+<script>
+if (window.internals)
+ internals.enableAutoSizeMode(true, 1000, 1, 1000000, 1000000);
+</script>
+text text text text text text text
+<div style="height:1000px; border:2px solid green">
+</div>
Added: trunk/LayoutTests/css3/viewport-percentage-lengths/vh-auto-size.html (0 => 215874)
--- trunk/LayoutTests/css3/viewport-percentage-lengths/vh-auto-size.html (rev 0)
+++ trunk/LayoutTests/css3/viewport-percentage-lengths/vh-auto-size.html 2017-04-27 16:51:11 UTC (rev 215874)
@@ -0,0 +1,15 @@
+<html>
+<head>
+<script>
+if (window.internals)
+ internals.enableAutoSizeMode(true, 1000, 1, 1000000, 1000000);
+</script>
+</head>
+<body>
+<div style="width: 100vh">
+text text text text text text text
+<div style="height:1000px; border:2px solid green">
+</div>
+</div>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/ios/TestExpectations (215873 => 215874)
--- trunk/LayoutTests/platform/ios/TestExpectations 2017-04-27 16:47:00 UTC (rev 215873)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2017-04-27 16:51:11 UTC (rev 215874)
@@ -2944,3 +2944,6 @@
http/tests/security/contentSecurityPolicy/video-redirect-allowed2.html [ Skip ]
webkit.org/b/171272 fast/text/kaithi.html [ ImageOnlyFailure ]
+
+# auto-sizing produces inconsistent image results
+css3/viewport-percentage-lengths/vh-auto-size.html [ ImageOnlyFailure ]
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (215873 => 215874)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2017-04-27 16:47:00 UTC (rev 215873)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2017-04-27 16:51:11 UTC (rev 215874)
@@ -359,3 +359,6 @@
webkit.org/b/170935 imported/w3c/web-platform-tests/css/selectors4/focus-within-shadow-003.html [ ImageOnlyFailure ]
webkit.org/b/170935 imported/w3c/web-platform-tests/css/selectors4/focus-within-shadow-004.html [ ImageOnlyFailure ]
webkit.org/b/170935 imported/w3c/web-platform-tests/css/selectors4/focus-within-shadow-005.html [ ImageOnlyFailure ]
+
+# auto-sizing produces inconsistent image results
+css3/viewport-percentage-lengths/vh-auto-size.html [ ImageOnlyFailure ]
Modified: trunk/Source/WebCore/ChangeLog (215873 => 215874)
--- trunk/Source/WebCore/ChangeLog 2017-04-27 16:47:00 UTC (rev 215873)
+++ trunk/Source/WebCore/ChangeLog 2017-04-27 16:51:11 UTC (rev 215874)
@@ -1,3 +1,22 @@
+2017-04-27 Antti Koivisto <an...@apple.com>
+
+ 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.
+
+ 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.
+
2017-04-27 Alex Christensen <achristen...@webkit.org>
Modernize Frame.h
Modified: trunk/Source/WebCore/page/FrameView.cpp (215873 => 215874)
--- trunk/Source/WebCore/page/FrameView.cpp 2017-04-27 16:47:00 UTC (rev 215873)
+++ trunk/Source/WebCore/page/FrameView.cpp 2017-04-27 16:51:11 UTC (rev 215874)
@@ -3757,6 +3757,9 @@
setScrollbarModes(horizonalScrollbarMode, verticalScrollbarMode, true, true);
}
+ // All the resizing above may have invalidated style (for example if viewport units are being used).
+ document->updateStyleIfNeeded();
+
m_autoSizeContentSize = contentsSize();
if (m_autoSizeFixedMinimumHeight) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes