Title: [251255] trunk/Source/WebCore
Revision
251255
Author
[email protected]
Date
2019-10-17 13:31:36 -0700 (Thu, 17 Oct 2019)

Log Message

Don't put pages that have not reached the non-visually empty layout milestone in the back/forward cache
https://bugs.webkit.org/show_bug.cgi?id=203108

Reviewed by Geoffrey Garen.

We don't want to go back to a visually empty page on back/forward navigation.

* history/BackForwardCache.cpp:
(WebCore::canCacheFrame):
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::visuallyEmptyKey):
* page/DiagnosticLoggingKeys.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (251254 => 251255)


--- trunk/Source/WebCore/ChangeLog	2019-10-17 20:21:19 UTC (rev 251254)
+++ trunk/Source/WebCore/ChangeLog	2019-10-17 20:31:36 UTC (rev 251255)
@@ -1,3 +1,18 @@
+2019-10-17  Chris Dumez  <[email protected]>
+
+        Don't put pages that have not reached the non-visually empty layout milestone in the back/forward cache
+        https://bugs.webkit.org/show_bug.cgi?id=203108
+
+        Reviewed by Geoffrey Garen.
+
+        We don't want to go back to a visually empty page on back/forward navigation.
+
+        * history/BackForwardCache.cpp:
+        (WebCore::canCacheFrame):
+        * page/DiagnosticLoggingKeys.cpp:
+        (WebCore::DiagnosticLoggingKeys::visuallyEmptyKey):
+        * page/DiagnosticLoggingKeys.h:
+
 2019-10-17  Dirk Schulze  <[email protected]>
 
         transform-box: content-box, stroke-box missing

Modified: trunk/Source/WebCore/history/BackForwardCache.cpp (251254 => 251255)


--- trunk/Source/WebCore/history/BackForwardCache.cpp	2019-10-17 20:21:19 UTC (rev 251254)
+++ trunk/Source/WebCore/history/BackForwardCache.cpp	2019-10-17 20:31:36 UTC (rev 251255)
@@ -132,6 +132,11 @@
         logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::noCurrentHistoryItemKey());
         isCacheable = false;
     }
+    if (frame.isMainFrame() && frame.view() && !frame.view()->isVisuallyNonEmpty()) {
+        PCLOG("   -Main frame is visually empty");
+        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::visuallyEmptyKey());
+        isCacheable = false;
+    }
     if (frameLoader.quickRedirectComing()) {
         PCLOG("   -Quick redirect is coming");
         logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::quirkRedirectComingKey());

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp (251254 => 251255)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2019-10-17 20:21:19 UTC (rev 251254)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2019-10-17 20:31:36 UTC (rev 251255)
@@ -218,6 +218,11 @@
     return "backForwardCacheFailure"_s;
 }
 
+String DiagnosticLoggingKeys::visuallyEmptyKey()
+{
+    return "visuallyEmpty"_s;
+}
+
 String DiagnosticLoggingKeys::noDocumentLoaderKey()
 {
     return "noDocumentLoader"_s;

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.h (251254 => 251255)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2019-10-17 20:21:19 UTC (rev 251254)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2019-10-17 20:31:36 UTC (rev 251255)
@@ -116,6 +116,7 @@
     WEBCORE_EXPORT static String otherKey();
     static String backForwardCacheKey();
     static String backForwardCacheFailureKey();
+    static String visuallyEmptyKey();
     static String pageContainsAtLeastOneMediaEngineKey();
     static String pageContainsAtLeastOnePluginKey();
     static String pageContainsMediaEngineKey();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to