Diff
Modified: releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog (241796 => 241797)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog 2019-02-20 12:43:37 UTC (rev 241796)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog 2019-02-20 12:43:45 UTC (rev 241797)
@@ -1,3 +1,15 @@
+2019-02-18 John Wilander <wilan...@apple.com>
+
+ Check the existence of the frame in Document::hasFrameSpecificStorageAccess() and Document::setHasFrameSpecificStorageAccess()
+ https://bugs.webkit.org/show_bug.cgi?id=194777
+ <rdar://problem/47731945>
+
+ Reviewed by Geoffrey Garen and Chris Dumez.
+
+ * http/tests/storageAccess/remove-requesting-iframe-expected.txt: Added.
+ * http/tests/storageAccess/remove-requesting-iframe.html: Added.
+ * http/tests/storageAccess/resources/request-storage-access-and-immediately-postmessage-iframe.html: Added.
+
2019-02-17 Matt Baker <mattba...@apple.com>
Web Inspector: Frontend performance is very slow reloading theverge.com - 50% of time in TreeOutline _indexOfTreeElement
Added: releases/WebKitGTK/webkit-2.24/LayoutTests/http/tests/storageAccess/remove-requesting-iframe-expected.txt (0 => 241797)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/http/tests/storageAccess/remove-requesting-iframe-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/http/tests/storageAccess/remove-requesting-iframe-expected.txt 2019-02-20 12:43:45 UTC (rev 241797)
@@ -0,0 +1,10 @@
+Tests that Storage Access API calls work well for removed frames.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS iframe removed.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: releases/WebKitGTK/webkit-2.24/LayoutTests/http/tests/storageAccess/remove-requesting-iframe.html (0 => 241797)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/http/tests/storageAccess/remove-requesting-iframe.html (rev 0)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/http/tests/storageAccess/remove-requesting-iframe.html 2019-02-20 12:43:45 UTC (rev 241797)
@@ -0,0 +1,62 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+ <script src=""
+ <script src=""
+ <script src=""
+</head>
+<body _onload_="runTest()">
+<script>
+ description("Tests that Storage Access API calls work well for removed frames.");
+ jsTestIsAsync = true;
+
+ function finishTest() {
+ setEnableFeature(false, finishJSTest);
+ }
+
+ function receiveMessage() {
+ requestingiframe.remove();
+ testPassed("iframe removed.");
+ setTimeout(finishTest, 0.5);
+ }
+
+ window.addEventListener("message", receiveMessage, false);
+
+ function activateElement(elementId) {
+ var element = document.getElementById(elementId);
+ var centerX = element.offsetLeft + element.offsetWidth / 2;
+ var centerY = element.offsetTop + element.offsetHeight / 2;
+ UIHelper.activateAt(centerX, centerY).then(
+ function () {
+ if (window.eventSender)
+ eventSender.keyDown("escape");
+ else {
+ testFailed("No eventSender.");
+ finishTest();
+ }
+ },
+ function () {
+ testFailed("Promise rejected.");
+ finishTest();
+ }
+ );
+ }
+
+ const iframeID = "requestingiframe";
+ const iframeSource = "http://localhost:8000/storageAccess/resources/request-storage-access-and-immediately-postmessage-iframe.html";
+
+ function runTest() {
+ let iframeElement = document.createElement("iframe");
+ iframeElement._onload_ = function() {
+ testRunner.statisticsUpdateCookieBlocking(function() {
+ activateElement(iframeID);
+ });
+ };
+ iframeElement.id = iframeID;
+ iframeElement.src = ""
+ document.body.appendChild(iframeElement);
+ }
+</script>
+</body>
+</html>
\ No newline at end of file
Added: releases/WebKitGTK/webkit-2.24/LayoutTests/http/tests/storageAccess/resources/request-storage-access-and-immediately-postmessage-iframe.html (0 => 241797)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/http/tests/storageAccess/resources/request-storage-access-and-immediately-postmessage-iframe.html (rev 0)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/http/tests/storageAccess/resources/request-storage-access-and-immediately-postmessage-iframe.html 2019-02-20 12:43:45 UTC (rev 241797)
@@ -0,0 +1,15 @@
+<html>
+<head>
+ <script>
+ if (internals)
+ internals.setUserGrantsStorageAccess(true);
+
+ function makeRequestWithUserGesture() {
+ document.requestStorageAccess();
+ top.postMessage("API called.", "http://127.0.0.1:8000");
+ }
+ </script>
+</head>
+<body _onclick_="makeRequestWithUserGesture()">
+</body>
+</html>
\ No newline at end of file
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog (241796 => 241797)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-02-20 12:43:37 UTC (rev 241796)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-02-20 12:43:45 UTC (rev 241797)
@@ -1,3 +1,22 @@
+2019-02-18 John Wilander <wilan...@apple.com>
+
+ Check the existence of the frame in Document::hasFrameSpecificStorageAccess() and Document::setHasFrameSpecificStorageAccess()
+ https://bugs.webkit.org/show_bug.cgi?id=194777
+ <rdar://problem/47731945>
+
+ Reviewed by Geoffrey Garen and Chris Dumez.
+
+ Test: http/tests/storageAccess/remove-requesting-iframe.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::hasFrameSpecificStorageAccess const):
+ Now checks for the existence of the frame.
+ (WebCore::Document::setHasFrameSpecificStorageAccess):
+ Now checks for the existence of the frame.
+ * loader/ResourceLoadObserver.cpp:
+ (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
+ Now checks that the session ID is valid.
+
2019-02-16 Zalan Bujtas <za...@apple.com>
[LFC] Apply min/max width constraints to preferred width computation
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/dom/Document.cpp (241796 => 241797)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/dom/Document.cpp 2019-02-20 12:43:37 UTC (rev 241796)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/dom/Document.cpp 2019-02-20 12:43:45 UTC (rev 241797)
@@ -8458,12 +8458,13 @@
#if ENABLE(RESOURCE_LOAD_STATISTICS)
bool Document::hasFrameSpecificStorageAccess() const
{
- return m_frame->loader().client().hasFrameSpecificStorageAccess();
+ return m_frame && m_frame->loader().client().hasFrameSpecificStorageAccess();
}
void Document::setHasFrameSpecificStorageAccess(bool value)
{
- m_frame->loader().client().setHasFrameSpecificStorageAccess(value);
+ if (m_frame)
+ m_frame->loader().client().setHasFrameSpecificStorageAccess(value);
}
bool Document::hasRequestedPageSpecificStorageAccessWithUserInteraction(const String& primaryDomain)
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/loader/ResourceLoadObserver.cpp (241796 => 241797)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/loader/ResourceLoadObserver.cpp 2019-02-20 12:43:37 UTC (rev 241796)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/loader/ResourceLoadObserver.cpp 2019-02-20 12:43:45 UTC (rev 241797)
@@ -193,7 +193,7 @@
void ResourceLoadObserver::logUserInteractionWithReducedTimeResolution(const Document& document)
{
- if (!shouldLog(document.sessionID().isEphemeral()))
+ if (!document.sessionID().isValid() || !shouldLog(document.sessionID().isEphemeral()))
return;
auto& url = ""
Modified: releases/WebKitGTK/webkit-2.24/Source/WebKit/ChangeLog (241796 => 241797)
--- releases/WebKitGTK/webkit-2.24/Source/WebKit/ChangeLog 2019-02-20 12:43:37 UTC (rev 241796)
+++ releases/WebKitGTK/webkit-2.24/Source/WebKit/ChangeLog 2019-02-20 12:43:45 UTC (rev 241797)
@@ -1,3 +1,16 @@
+2019-02-18 John Wilander <wilan...@apple.com>
+
+ Check the existence of the frame in Document::hasFrameSpecificStorageAccess() and Document::setHasFrameSpecificStorageAccess()
+ https://bugs.webkit.org/show_bug.cgi?id=194777
+ <rdar://problem/47731945>
+
+ Reviewed by Geoffrey Garen and Chris Dumez.
+
+ * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+ (WebKit::NetworkConnectionToWebProcess::logUserInteraction):
+ Now returns early if the incoming session ID is invalid.
+ Added an ASSERT to help us find other call sites passing invalid session IDs.
+
2019-02-18 Carlos Garcia Campos <cgar...@igalia.com>
[GTK] Crash while filling selection data during drag and drop
Modified: releases/WebKitGTK/webkit-2.24/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (241796 => 241797)
--- releases/WebKitGTK/webkit-2.24/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2019-02-20 12:43:37 UTC (rev 241796)
+++ releases/WebKitGTK/webkit-2.24/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp 2019-02-20 12:43:45 UTC (rev 241797)
@@ -587,6 +587,10 @@
void NetworkConnectionToWebProcess::logUserInteraction(PAL::SessionID sessionID, const String& topLevelOrigin)
{
+ ASSERT(sessionID.isValid());
+ if (!sessionID.isValid())
+ return;
+
if (auto networkSession = networkProcess().networkSession(sessionID)) {
if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics())
resourceLoadStatistics->logUserInteraction(topLevelOrigin, [] { });