Diff
Modified: branches/safari-600.1-branch/LayoutTests/ChangeLog (171572 => 171573)
--- branches/safari-600.1-branch/LayoutTests/ChangeLog 2014-07-25 01:16:25 UTC (rev 171572)
+++ branches/safari-600.1-branch/LayoutTests/ChangeLog 2014-07-25 01:18:23 UTC (rev 171573)
@@ -1,5 +1,23 @@
2014-07-24 Lucas Forschler <[email protected]>
+ Merge r171567
+
+ 2014-07-24 Simon Fraser <[email protected]>
+
+ [iOS WK1] CSS viewport units use the wrong viewport size in WebKit1
+ https://bugs.webkit.org/show_bug.cgi?id=135254
+ <rdar://problem/17781423>
+
+ Reviewed by Tim Horton.
+
+ New test that ensures that viewport units are resolved against the correct
+ viewport size after the first style recalc.
+
+ * fast/css/viewport-units-dynamic.html: Added.
+ * platform/mac/fast/css/viewport-units-dynamic-expected.txt: Added.
+
+2014-07-24 Lucas Forschler <[email protected]>
+
Merge r171561
2014-07-24 Myles C. Maxfield <[email protected]>
Copied: branches/safari-600.1-branch/LayoutTests/fast/css/viewport-units-dynamic.html (from rev 171567, trunk/LayoutTests/fast/css/viewport-units-dynamic.html) (0 => 171573)
--- branches/safari-600.1-branch/LayoutTests/fast/css/viewport-units-dynamic.html (rev 0)
+++ branches/safari-600.1-branch/LayoutTests/fast/css/viewport-units-dynamic.html 2014-07-25 01:18:23 UTC (rev 171573)
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ body {
+ height: 10000px;
+ width: 10000px;
+ margin: 0;
+ }
+ .box {
+ position: absolute;
+ background-color: rgba(0, 0, 0, 0.5);
+ border: 5px solid black;
+ box-sizing: border-box;
+ }
+
+ .width {
+ width: 100px;
+ height: 100px;
+ padding-left: 100px;
+ }
+
+ .height {
+ height: 100px;
+ width: 100px;
+ padding-top: 100px;
+ }
+
+ body.changed .height {
+ height: 100vh;
+ }
+
+ body.changed .width {
+ width: 100vw;
+ }
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ function doTest()
+ {
+ window.setTimeout(function() {
+ document.body.classList.add('changed');
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0);
+ }
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+<div class="box width">
+ This should be as wide as the CSS viewport.
+</div>
+
+<div id="vertical" class="box height">
+ This should be as tall as the CSS viewport.
+</div>
+</body>
+</html>
Copied: branches/safari-600.1-branch/LayoutTests/platform/mac/fast/css/viewport-units-dynamic-expected.txt (from rev 171567, trunk/LayoutTests/platform/mac/fast/css/viewport-units-dynamic-expected.txt) (0 => 171573)
--- branches/safari-600.1-branch/LayoutTests/platform/mac/fast/css/viewport-units-dynamic-expected.txt (rev 0)
+++ branches/safari-600.1-branch/LayoutTests/platform/mac/fast/css/viewport-units-dynamic-expected.txt 2014-07-25 01:18:23 UTC (rev 171573)
@@ -0,0 +1,16 @@
+layer at (0,0) size 10000x10000
+ RenderView at (0,0) size 785x585
+layer at (0,0) size 785x10000
+ RenderBlock {HTML} at (0,0) size 785x10000
+ RenderBody {BODY} at (0,0) size 10000x10000
+layer at (0,0) size 800x100
+ RenderBlock (positioned) {DIV} at (0,0) size 800x100 [bgcolor=#0000007F] [border: (5px solid #000000)]
+ RenderText {#text} at (105,5) size 282x18
+ text run at (105,5) width 282: "This should be as wide as the CSS viewport."
+layer at (0,0) size 100x600
+ RenderBlock (positioned) {DIV} at (0,0) size 100x600 [bgcolor=#0000007F] [border: (5px solid #000000)]
+ RenderText {#text} at (5,105) size 74x72
+ text run at (5,105) width 74: "This should"
+ text run at (5,123) width 72: "be as tall as"
+ text run at (5,141) width 52: "the CSS"
+ text run at (5,159) width 60: "viewport."
Modified: branches/safari-600.1-branch/Source/WebCore/ChangeLog (171572 => 171573)
--- branches/safari-600.1-branch/Source/WebCore/ChangeLog 2014-07-25 01:16:25 UTC (rev 171572)
+++ branches/safari-600.1-branch/Source/WebCore/ChangeLog 2014-07-25 01:18:23 UTC (rev 171573)
@@ -1,5 +1,27 @@
2014-07-24 Lucas Forschler <[email protected]>
+ Merge r171567
+
+ 2014-07-24 Simon Fraser <[email protected]>
+
+ [iOS WK1] CSS viewport units use the wrong viewport size in WebKit1
+ https://bugs.webkit.org/show_bug.cgi?id=135254
+ <rdar://problem/17781423>
+
+ Reviewed by Tim Horton.
+
+ Test: fast/css/viewport-units-dynamic.html
+
+ In WebKit1 on iOS, we want to resolve viewport units against the visible
+ viewport, not the legacy WK1 notion of the "viewport" which is the entire document.
+
+ Fixes rendering of medium.com articles in WK1 views on iPad.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::viewportSizeForCSSViewportUnits):
+
+2014-07-24 Lucas Forschler <[email protected]>
+
Merge r171561
2014-07-24 Myles C. Maxfield <[email protected]>
Modified: branches/safari-600.1-branch/Source/WebCore/page/FrameView.cpp (171572 => 171573)
--- branches/safari-600.1-branch/Source/WebCore/page/FrameView.cpp 2014-07-25 01:16:25 UTC (rev 171572)
+++ branches/safari-600.1-branch/Source/WebCore/page/FrameView.cpp 2014-07-25 01:18:23 UTC (rev 171573)
@@ -4522,7 +4522,7 @@
if (m_hasOverrideViewportSize)
return m_overrideViewportSize;
- return visibleContentRectIncludingScrollbars(ScrollableArea::LegacyIOSDocumentVisibleRect).size();
+ return visibleContentRectIncludingScrollbars().size();
}
} // namespace WebCore