Title: [204799] releases/WebKitGTK/webkit-2.12
Revision
204799
Author
[email protected]
Date
2016-08-23 03:45:29 -0700 (Tue, 23 Aug 2016)

Log Message

Merge r203695 - Allow LocalStorage by default for file URLs.
https://bugs.webkit.org/show_bug.cgi?id=160169

Reviewed by Brent Fulgham.

Source/WebCore:

Test: storage/domstorage/localstorage/file-can-access.html

* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canAccessStorage): Remove the m_universalAccess check for local URLs.

LayoutTests:

* storage/domstorage/localstorage/blocked-file-access-expected.txt: Removed.
* storage/domstorage/localstorage/file-can-access-expected.txt: Added.
* storage/domstorage/localstorage/file-can-access.html: Renamed from LayoutTests/storage/domstorage/localstorage/blocked-file-access.html.
* storage/domstorage/localstorage/resources/unblocked-example.html: Renamed from LayoutTests/storage/domstorage/localstorage/resources/blocked-example.html.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog (204798 => 204799)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog	2016-08-23 10:45:16 UTC (rev 204798)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog	2016-08-23 10:45:29 UTC (rev 204799)
@@ -1,3 +1,15 @@
+2016-07-25  Brady Eidson  <[email protected]>
+
+        Allow LocalStorage by default for file URLs.
+        https://bugs.webkit.org/show_bug.cgi?id=160169
+
+        Reviewed by Brent Fulgham.
+
+        * storage/domstorage/localstorage/blocked-file-access-expected.txt: Removed.
+        * storage/domstorage/localstorage/file-can-access-expected.txt: Added.
+        * storage/domstorage/localstorage/file-can-access.html: Renamed from LayoutTests/storage/domstorage/localstorage/blocked-file-access.html.
+        * storage/domstorage/localstorage/resources/unblocked-example.html: Renamed from LayoutTests/storage/domstorage/localstorage/resources/blocked-example.html.
+
 2016-07-15  Brady Eidson  <[email protected]>
 
         WebKit should prevent push/replace state with username in URL.

Deleted: releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/blocked-file-access-expected.txt (204798 => 204799)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/blocked-file-access-expected.txt	2016-08-23 10:45:16 UTC (rev 204798)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/blocked-file-access-expected.txt	2016-08-23 10:45:29 UTC (rev 204799)
@@ -1,4 +0,0 @@
-CONSOLE MESSAGE: line 11: PASS: window.localStorage is NOT accessible
-CONSOLE MESSAGE: line 12: Exception: SecurityError: DOM Exception 18
-
-Test that we cannot access localStorage from a file URL if unversal access is turned off.

Deleted: releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/blocked-file-access.html (204798 => 204799)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/blocked-file-access.html	2016-08-23 10:45:16 UTC (rev 204798)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/blocked-file-access.html	2016-08-23 10:45:29 UTC (rev 204799)
@@ -1,16 +0,0 @@
-<html>
-<head>
-<script>
-if (window.testRunner) {
-    testRunner.setAllowUniversalAccessFromFileURLs(false);
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
-</script>
-</head>
-<body>
-<iframe src=""
-<div id="results"></div>
-Test that we cannot access localStorage from a file URL if unversal access is turned off.
-</body>
-</html>

Added: releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/file-can-access-expected.txt (0 => 204799)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/file-can-access-expected.txt	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/file-can-access-expected.txt	2016-08-23 10:45:29 UTC (rev 204799)
@@ -0,0 +1,3 @@
+CONSOLE MESSAGE: line 8: PASS: window.localStorage WAS accessible
+
+Test that we can access localStorage from a file URL even if universal access is turned off.

Copied: releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/file-can-access.html (from rev 204798, releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/blocked-file-access.html) (0 => 204799)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/file-can-access.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/file-can-access.html	2016-08-23 10:45:29 UTC (rev 204799)
@@ -0,0 +1,16 @@
+<html>
+<head>
+<script>
+if (window.testRunner) {
+    testRunner.setAllowUniversalAccessFromFileURLs(false);
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+</script>
+</head>
+<body>
+<iframe src=""
+<div id="results"></div>
+Test that we can access localStorage from a file URL even if universal access is turned off.
+</body>
+</html>

Deleted: releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/resources/blocked-example.html (204798 => 204799)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/resources/blocked-example.html	2016-08-23 10:45:16 UTC (rev 204798)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/resources/blocked-example.html	2016-08-23 10:45:29 UTC (rev 204799)
@@ -1,22 +0,0 @@
-<html>
-<head>
-<script>
-function runTest()
-{
-    try {
-        if (window.localStorage) {
-            console.log("FAIL: window.localStorage WAS accessible");
-        }
-    } catch(e) {
-        console.log("PASS: window.localStorage is NOT accessible");
-        console.log("Exception: " + e.message);
-    }
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-</script>
-</head>
-<body _onload_="runTest()">
-</body>
-</html>

Copied: releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/resources/unblocked-example.html (from rev 204798, releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/resources/blocked-example.html) (0 => 204799)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/resources/unblocked-example.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/storage/domstorage/localstorage/resources/unblocked-example.html	2016-08-23 10:45:29 UTC (rev 204799)
@@ -0,0 +1,22 @@
+<html>
+<head>
+<script>
+function runTest()
+{
+    try {
+        if (window.localStorage) {
+            console.log("PASS: window.localStorage WAS accessible");
+        }
+    } catch(e) {
+        console.log("FAIL: window.localStorage is NOT accessible");
+        console.log("Exception: " + e.message);
+    }
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+</script>
+</head>
+<body _onload_="runTest()">
+</body>
+</html>

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (204798 => 204799)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-08-23 10:45:16 UTC (rev 204798)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-08-23 10:45:29 UTC (rev 204799)
@@ -1,3 +1,15 @@
+2016-07-25  Brady Eidson  <[email protected]>
+
+        Allow LocalStorage by default for file URLs.
+        https://bugs.webkit.org/show_bug.cgi?id=160169
+
+        Reviewed by Brent Fulgham.
+
+        Test: storage/domstorage/localstorage/file-can-access.html
+
+        * page/SecurityOrigin.cpp:
+        (WebCore::SecurityOrigin::canAccessStorage): Remove the m_universalAccess check for local URLs.
+
 2016-07-15  Brady Eidson  <[email protected]>
 
         WebKit should prevent push/replace state with username in URL.

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/page/SecurityOrigin.cpp (204798 => 204799)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/page/SecurityOrigin.cpp	2016-08-23 10:45:16 UTC (rev 204798)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/page/SecurityOrigin.cpp	2016-08-23 10:45:29 UTC (rev 204799)
@@ -375,9 +375,6 @@
     if (m_storageBlockingPolicy == BlockAllStorage)
         return false;
 
-    if (isLocal() && !m_universalAccess && shouldAllowFromThirdParty != AlwaysAllowFromThirdParty)
-        return false;
-
     // FIXME: This check should be replaced with an ASSERT once we can guarantee that topOrigin is not null.
     if (!topOrigin)
         return true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to