Title: [257986] releases/WebKitGTK/webkit-2.28/Source/WebCore
- Revision
- 257986
- Author
- [email protected]
- Date
- 2020-03-06 06:28:23 -0800 (Fri, 06 Mar 2020)
Log Message
Merge r257714 - Add quirk to disable to back/forward cache on docs.google.com
https://bugs.webkit.org/show_bug.cgi?id=208381
<rdar://problem/59893415>
Reviewed by Ryosuke Niwa.
Google Docs used to bypass the back/forward cache by serving "Cache-Control: no-store"
over HTTPS. We started caching such content in r250437 but the Google Docs content
unfortunately is not currently compatible because it puts an overlay over the page and
starts an animation when navigating away and fails to remove those when coming back from
the back/forward cache (e.g. in 'pageshow' event handler).
* page/Quirks.cpp:
(WebCore::Quirks::shouldBypassBackForwardCache const):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog (257985 => 257986)
--- releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog 2020-03-06 14:28:18 UTC (rev 257985)
+++ releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog 2020-03-06 14:28:23 UTC (rev 257986)
@@ -1,3 +1,20 @@
+2020-03-02 Chris Dumez <[email protected]>
+
+ Add quirk to disable to back/forward cache on docs.google.com
+ https://bugs.webkit.org/show_bug.cgi?id=208381
+ <rdar://problem/59893415>
+
+ Reviewed by Ryosuke Niwa.
+
+ Google Docs used to bypass the back/forward cache by serving "Cache-Control: no-store"
+ over HTTPS. We started caching such content in r250437 but the Google Docs content
+ unfortunately is not currently compatible because it puts an overlay over the page and
+ starts an animation when navigating away and fails to remove those when coming back from
+ the back/forward cache (e.g. in 'pageshow' event handler).
+
+ * page/Quirks.cpp:
+ (WebCore::Quirks::shouldBypassBackForwardCache const):
+
2020-02-28 Chris Dumez <[email protected]>
Garbage collection prevents FontFace.loaded promise from getting resolved
Modified: releases/WebKitGTK/webkit-2.28/Source/WebCore/page/Quirks.cpp (257985 => 257986)
--- releases/WebKitGTK/webkit-2.28/Source/WebCore/page/Quirks.cpp 2020-03-06 14:28:18 UTC (rev 257985)
+++ releases/WebKitGTK/webkit-2.28/Source/WebCore/page/Quirks.cpp 2020-03-06 14:28:23 UTC (rev 257986)
@@ -34,6 +34,7 @@
#include "EventNames.h"
#include "FrameLoader.h"
#include "HTMLBodyElement.h"
+#include "HTMLDivElement.h"
#include "HTMLMetaElement.h"
#include "HTMLObjectElement.h"
#include "JSEventListener.h"
@@ -627,6 +628,19 @@
return documentLoader->response().cacheControlContainsNoStore();
}
+ // Google Docs used to bypass the back/forward cache by serving "Cache-Control: no-store" over HTTPS.
+ // We started caching such content in r250437 but the Google Docs index page unfortunately is not currently compatible
+ // because it puts an overlay (with class "docs-homescreen-freeze-el-full") over the page when navigating away and fails
+ // to remove it when coming back from the back/forward cache (e.g. in 'pageshow' event handler). See <rdar://problem/57670064>.
+ // Note that this does not check for docs.google.com host because of hosted G Suite apps.
+ static NeverDestroyed<const AtomString> googleDocsOverlayDivClass("docs-homescreen-freeze-el-full", AtomString::ConstructFromLiteral);
+ auto* firstChildInBody = m_document->body() ? m_document->body()->firstChild() : nullptr;
+ if (is<HTMLDivElement>(firstChildInBody)) {
+ auto& div = downcast<HTMLDivElement>(*firstChildInBody);
+ if (div.hasClass() && div.classNames().contains(googleDocsOverlayDivClass))
+ return true;
+ }
+
return false;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes