Title: [172765] branches/safari-600.1-branch

Diff

Modified: branches/safari-600.1-branch/LayoutTests/ChangeLog (172764 => 172765)


--- branches/safari-600.1-branch/LayoutTests/ChangeLog	2014-08-19 22:05:46 UTC (rev 172764)
+++ branches/safari-600.1-branch/LayoutTests/ChangeLog	2014-08-19 22:18:32 UTC (rev 172765)
@@ -1,3 +1,19 @@
+2014-08-19  Dana Burkart  <[email protected]>
+
+        Merge r172603
+
+    2014-08-14  Martin Hock  <[email protected]>
+
+            IndexedDB should respect SchemeRegistry's database access setting.
+            https://bugs.webkit.org/show_bug.cgi?id=135890
+            <rdar://problem/17989469>
+
+            Reviewed by Alexey Proskuryakov.
+
+            * storage/indexeddb/open-db-private-browsing-expected.txt: Added.
+            * storage/indexeddb/open-db-private-browsing.html: Added. Simple test to open database in private browsing mode.
+            * storage/indexeddb/resources/open-db-private-browsing.js: Added.
+
 2014-08-13  Lucas Forschler  <[email protected]>
 
         Merge r172534

Copied: branches/safari-600.1-branch/LayoutTests/storage/indexeddb/open-db-private-browsing-expected.txt (from rev 172603, trunk/LayoutTests/storage/indexeddb/open-db-private-browsing-expected.txt) (0 => 172765)


--- branches/safari-600.1-branch/LayoutTests/storage/indexeddb/open-db-private-browsing-expected.txt	                        (rev 0)
+++ branches/safari-600.1-branch/LayoutTests/storage/indexeddb/open-db-private-browsing-expected.txt	2014-08-19 22:18:32 UTC (rev 172765)
@@ -0,0 +1,12 @@
+Simple test to open IndexedDB database in private browsing mode.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
+
+PASS indexedDB.open('db') is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: branches/safari-600.1-branch/LayoutTests/storage/indexeddb/open-db-private-browsing.html (from rev 172603, trunk/LayoutTests/storage/indexeddb/open-db-private-browsing.html) (0 => 172765)


--- branches/safari-600.1-branch/LayoutTests/storage/indexeddb/open-db-private-browsing.html	                        (rev 0)
+++ branches/safari-600.1-branch/LayoutTests/storage/indexeddb/open-db-private-browsing.html	2014-08-19 22:18:32 UTC (rev 172765)
@@ -0,0 +1,9 @@
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+<body>
+<script src=""
+</body>
+</html>

Copied: branches/safari-600.1-branch/LayoutTests/storage/indexeddb/resources/open-db-private-browsing.js (from rev 172603, trunk/LayoutTests/storage/indexeddb/resources/open-db-private-browsing.js) (0 => 172765)


--- branches/safari-600.1-branch/LayoutTests/storage/indexeddb/resources/open-db-private-browsing.js	                        (rev 0)
+++ branches/safari-600.1-branch/LayoutTests/storage/indexeddb/resources/open-db-private-browsing.js	2014-08-19 22:18:32 UTC (rev 172765)
@@ -0,0 +1,11 @@
+if (this.importScripts) {
+    importScripts('../../../resources/js-test.js');
+    importScripts('shared.js');
+}
+
+description("Simple test to open IndexedDB database in private browsing mode.");
+
+testRunner.setPrivateBrowsingEnabled(true);
+removeVendorPrefixes();
+shouldBeNull("indexedDB.open('db')");
+finishJSTest();

Modified: branches/safari-600.1-branch/Source/WebCore/ChangeLog (172764 => 172765)


--- branches/safari-600.1-branch/Source/WebCore/ChangeLog	2014-08-19 22:05:46 UTC (rev 172764)
+++ branches/safari-600.1-branch/Source/WebCore/ChangeLog	2014-08-19 22:18:32 UTC (rev 172765)
@@ -1,5 +1,21 @@
 2014-08-19  Dana Burkart  <[email protected]>
 
+        Merge r172603
+
+    2014-08-14  Martin Hock  <[email protected]>
+
+            IndexedDB should respect SchemeRegistry's database access setting.
+            https://bugs.webkit.org/show_bug.cgi?id=135890
+            <rdar://problem/17989469>
+
+            Reviewed by Alexey Proskuryakov.
+
+            Test: storage/indexeddb/open-db-private-browsing.html
+
+            * Modules/indexeddb/IDBFactory.cpp:
+
+2014-08-19  Dana Burkart  <[email protected]>
+
         Merge r172600
 
     2014-08-14  Yoav Weiss  <[email protected]>

Modified: branches/safari-600.1-branch/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (172764 => 172765)


--- branches/safari-600.1-branch/Source/WebCore/Modules/indexeddb/IDBFactory.cpp	2014-08-19 22:05:46 UTC (rev 172764)
+++ branches/safari-600.1-branch/Source/WebCore/Modules/indexeddb/IDBFactory.cpp	2014-08-19 22:18:32 UTC (rev 172765)
@@ -46,6 +46,7 @@
 #include "Logging.h"
 #include "Page.h"
 #include "PageGroup.h"
+#include "SchemeRegistry.h"
 #include "SecurityOrigin.h"
 #include "WorkerGlobalScope.h"
 #include "WorkerLoaderProxy.h"
@@ -70,7 +71,7 @@
     ASSERT(context->isDocument() || context->isWorkerGlobalScope());
     if (context->isDocument()) {
         Document* document = toDocument(context);
-        return document->frame() && document->page();
+        return document->frame() && document->page() && (!document->page()->usesEphemeralSession() || SchemeRegistry::allowsDatabaseAccessInPrivateBrowsing(document->securityOrigin()->protocol()));
     }
     return true;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to