Unreviewed, rolling out r251255.

This is causing the existing back/forward tests to be flaky

Reverted changeset:

"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
https://trac.webkit.org/changeset/251255

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@251267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 42e8975..a850492 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2019-10-17  Chris Dumez  <cdumez@apple.com>
+
+        Unreviewed, rolling out r251255.
+
+        This is causing the existing back/forward tests to be flaky
+
+        Reverted changeset:
+
+        "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
+        https://trac.webkit.org/changeset/251255
+
 2019-10-17  Mark Lam  <mark.lam@apple.com>
 
         Use constexpr in more places and remove some unnecessary external linkage.
diff --git a/Source/WebCore/history/BackForwardCache.cpp b/Source/WebCore/history/BackForwardCache.cpp
index 02acd95..937353f 100644
--- a/Source/WebCore/history/BackForwardCache.cpp
+++ b/Source/WebCore/history/BackForwardCache.cpp
@@ -132,11 +132,6 @@
         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());
diff --git a/Source/WebCore/page/DiagnosticLoggingKeys.cpp b/Source/WebCore/page/DiagnosticLoggingKeys.cpp
index 84ff08b..98bd0c7 100644
--- a/Source/WebCore/page/DiagnosticLoggingKeys.cpp
+++ b/Source/WebCore/page/DiagnosticLoggingKeys.cpp
@@ -218,11 +218,6 @@
     return "backForwardCacheFailure"_s;
 }
 
-String DiagnosticLoggingKeys::visuallyEmptyKey()
-{
-    return "visuallyEmpty"_s;
-}
-
 String DiagnosticLoggingKeys::noDocumentLoaderKey()
 {
     return "noDocumentLoader"_s;
diff --git a/Source/WebCore/page/DiagnosticLoggingKeys.h b/Source/WebCore/page/DiagnosticLoggingKeys.h
index 92ac3b6..972a0df 100644
--- a/Source/WebCore/page/DiagnosticLoggingKeys.h
+++ b/Source/WebCore/page/DiagnosticLoggingKeys.h
@@ -116,7 +116,6 @@
     WEBCORE_EXPORT static String otherKey();
     static String backForwardCacheKey();
     static String backForwardCacheFailureKey();
-    static String visuallyEmptyKey();
     static String pageContainsAtLeastOneMediaEngineKey();
     static String pageContainsAtLeastOnePluginKey();
     static String pageContainsMediaEngineKey();