Title: [247317] trunk
Revision
247317
Author
[email protected]
Date
2019-07-10 12:46:05 -0700 (Wed, 10 Jul 2019)

Log Message

Unreviewed, rolling out r247223.
https://bugs.webkit.org/show_bug.cgi?id=199679

Caused perf regression. (Requested by deanj on #webkit).

Reverted changeset:

"[iPadOS] Viewport pops while loading sohu.com, xinhuanet.com,
and various other websites"
https://bugs.webkit.org/show_bug.cgi?id=199575
https://trac.webkit.org/changeset/247223

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (247316 => 247317)


--- trunk/LayoutTests/ChangeLog	2019-07-10 19:44:48 UTC (rev 247316)
+++ trunk/LayoutTests/ChangeLog	2019-07-10 19:46:05 UTC (rev 247317)
@@ -1,3 +1,17 @@
+2019-07-10  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r247223.
+        https://bugs.webkit.org/show_bug.cgi?id=199679
+
+        Caused perf regression. (Requested by deanj on #webkit).
+
+        Reverted changeset:
+
+        "[iPadOS] Viewport pops while loading sohu.com, xinhuanet.com,
+        and various other websites"
+        https://bugs.webkit.org/show_bug.cgi?id=199575
+        https://trac.webkit.org/changeset/247223
+
 2019-07-10  Youenn Fablet  <[email protected]>
 
         Disable speculative loading if cache is not to be used for the load

Deleted: trunk/LayoutTests/fast/viewport/ios/shrink-to-fit-content-before-document-load-expected.txt (247316 => 247317)


--- trunk/LayoutTests/fast/viewport/ios/shrink-to-fit-content-before-document-load-expected.txt	2019-07-10 19:44:48 UTC (rev 247316)
+++ trunk/LayoutTests/fast/viewport/ios/shrink-to-fit-content-before-document-load-expected.txt	2019-07-10 19:46:05 UTC (rev 247317)
@@ -1,11 +0,0 @@
-Verifies that the shrink-to-fit heuristic is given a chance to run before document load finishes. This test requires WebKitTestRunner.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS innerWidth is 1280
-PASS visualViewport.scale.toFixed(2) is (screen.width / 1280).toFixed(2)
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/fast/viewport/ios/shrink-to-fit-content-before-document-load.html (247316 => 247317)


--- trunk/LayoutTests/fast/viewport/ios/shrink-to-fit-content-before-document-load.html	2019-07-10 19:44:48 UTC (rev 247316)
+++ trunk/LayoutTests/fast/viewport/ios/shrink-to-fit-content-before-document-load.html	2019-07-10 19:46:05 UTC (rev 247317)
@@ -1,38 +0,0 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ shouldIgnoreMetaViewport=true ] -->
-<html>
-<head>
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<style>
-body, html {
-    margin: 0;
-    width: 100%;
-    height: 100%;
-}
-
-#bar {
-    width: 1280px;
-    height: 100px;
-    background: linear-gradient(to right, red 0%, green 50%, blue 100%);
-}
-</style>
-<script src=""
-<script src=""
-<script>
-description("Verifies that the shrink-to-fit heuristic is given a chance to run before document load finishes. This test requires WebKitTestRunner.");
-
-addEventListener("DOMContentLoaded", () => {
-    shouldBe("innerWidth", "1280");
-    shouldBe("visualViewport.scale.toFixed(2)", "(screen.width / 1280).toFixed(2)");
-});
-</script>
-</head>
-<body>
-<div id="bar"></div>
-<div id="description"></div>
-<div class="square"></div>
-<script>
-document.scrollingElement.scrollTo(0, 1);
-document.scrollingElement.scrollTop;
-</script>
-</body>
-</html>

Modified: trunk/LayoutTests/fast/viewport/ios/shrink-to-fit-content-temporary-overflow.html (247316 => 247317)


--- trunk/LayoutTests/fast/viewport/ios/shrink-to-fit-content-temporary-overflow.html	2019-07-10 19:44:48 UTC (rev 247316)
+++ trunk/LayoutTests/fast/viewport/ios/shrink-to-fit-content-temporary-overflow.html	2019-07-10 19:46:05 UTC (rev 247317)
@@ -48,20 +48,6 @@
 
 description("This test verifies that a temporary change in content width does not cause the viewport width to permanently expand to try and accomodate the content. To test manually, load the page and check that the box below reads 'PASS'. This test is only intended to run on devices with less than 1200px screen width.");
 
-function forceLayoutByScrollingTo(y) {
-    document.scrollingElement.scrollTo(0, y);
-    return document.scrollingElement.scrollTop;
-}
-
-addEventListener("DOMContentLoaded", () => {
-    forceLayoutByScrollingTo(1);
-    const bar = document.createElement("div");
-    bar.classList.add("bar");
-    document.body.appendChild(bar);
-    forceLayoutByScrollingTo(0);
-    bar.remove();
-});
-
 addEventListener("load", async () => {
     if (!window.testRunner)
         return;
@@ -76,5 +62,14 @@
 <body>
 <div id="description"></div>
 <div class="square"></div>
+<script>
+const bar = document.createElement("div");
+bar.classList.add("bar");
+document.body.appendChild(bar);
+document.scrollingElement.scrollTo(0, 1);
+document.scrollingElement.scrollTo(0, 0);
+document.scrollingElement.scrollTop;
+bar.remove();
+</script>
 </body>
 </html>

Modified: trunk/Source/WebKit/ChangeLog (247316 => 247317)


--- trunk/Source/WebKit/ChangeLog	2019-07-10 19:44:48 UTC (rev 247316)
+++ trunk/Source/WebKit/ChangeLog	2019-07-10 19:46:05 UTC (rev 247317)
@@ -1,3 +1,17 @@
+2019-07-10  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r247223.
+        https://bugs.webkit.org/show_bug.cgi?id=199679
+
+        Caused perf regression. (Requested by deanj on #webkit).
+
+        Reverted changeset:
+
+        "[iPadOS] Viewport pops while loading sohu.com, xinhuanet.com,
+        and various other websites"
+        https://bugs.webkit.org/show_bug.cgi?id=199575
+        https://trac.webkit.org/changeset/247223
+
 2019-07-10  Youenn Fablet  <[email protected]>
 
         Disable speculative loading if cache is not to be used for the load

Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (247316 => 247317)


--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2019-07-10 19:44:48 UTC (rev 247316)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2019-07-10 19:46:05 UTC (rev 247317)
@@ -614,6 +614,8 @@
 
     // Notify the UIProcess.
     webPage->send(Messages::WebPageProxy::DidFinishDocumentLoadForFrame(m_frame->frameID(), navigationID, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
+
+    webPage->didFinishDocumentLoad(*m_frame);
 }
 
 void WebFrameLoaderClient::dispatchDidFinishLoad()

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (247316 => 247317)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2019-07-10 19:44:48 UTC (rev 247316)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2019-07-10 19:46:05 UTC (rev 247317)
@@ -3270,11 +3270,6 @@
 
 void WebPage::didCompletePageTransition()
 {
-#if ENABLE(VIEWPORT_RESIZING)
-    if (immediatelyShrinkToFitContent())
-        viewportConfigurationChanged(ZoomToInitialScale::Yes);
-#endif
-
     unfreezeLayerTree(LayerTreeFreezeReason::PageTransition);
 
     RELEASE_LOG_IF_ALLOWED("%p - WebPage - Did complete page transition", this);
@@ -5800,6 +5795,16 @@
     updateMockAccessibilityElementAfterCommittingLoad();
 }
 
+void WebPage::didFinishDocumentLoad(WebFrame& frame)
+{
+    if (!frame.isMainFrame())
+        return;
+
+#if ENABLE(VIEWPORT_RESIZING)
+    scheduleShrinkToFitContent();
+#endif
+}
+
 void WebPage::didFinishLoad(WebFrame& frame)
 {
     if (!frame.isMainFrame())

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (247316 => 247317)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-07-10 19:44:48 UTC (rev 247316)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-07-10 19:46:05 UTC (rev 247317)
@@ -359,6 +359,7 @@
     void didCommitLoad(WebFrame*);
     void willReplaceMultipartContent(const WebFrame&);
     void didReplaceMultipartContent(const WebFrame&);
+    void didFinishDocumentLoad(WebFrame&);
     void didFinishLoad(WebFrame&);
     void show();
     String userAgent(const URL&) const;

Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (247316 => 247317)


--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-07-10 19:44:48 UTC (rev 247316)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2019-07-10 19:46:05 UTC (rev 247317)
@@ -3320,9 +3320,6 @@
     if (m_isClosed)
         return false;
 
-    if (!m_mainFrame)
-        return false;
-
     if (!m_page->settings().allowViewportShrinkToFitContent())
         return false;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to