Diff
Modified: trunk/LayoutTests/ChangeLog (199888 => 199889)
--- trunk/LayoutTests/ChangeLog 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/LayoutTests/ChangeLog 2016-04-22 19:22:54 UTC (rev 199889)
@@ -1,3 +1,17 @@
+2016-04-22 Chris Dumez <cdu...@apple.com>
+
+ Support disabling at runtime IndexedDB constructors exposed to workers
+ https://bugs.webkit.org/show_bug.cgi?id=156883
+
+ Reviewed by Darin Adler.
+
+ Add layout test coverage.
+
+ * storage/indexeddb/modern/resources/workers-disabled.js:
+ * storage/indexeddb/modern/resources/workers-enable.js:
+ * storage/indexeddb/modern/workers-disabled-expected.txt:
+ * storage/indexeddb/modern/workers-enable-expected.txt:
+
2016-04-22 Dave Hyatt <hy...@apple.com>
-webkit-image-set doesn't work inside CSS variables
Modified: trunk/LayoutTests/storage/indexeddb/modern/resources/workers-disabled.js (199888 => 199889)
--- trunk/LayoutTests/storage/indexeddb/modern/resources/workers-disabled.js 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/workers-disabled.js 2016-04-22 19:22:54 UTC (rev 199889)
@@ -5,6 +5,12 @@
description("Check to make sure IndexedDB in workers can be disabled at runtime");
-shouldBeUndefined("self.indexedDB");
+var propertiesToTest = ['indexedDB', 'IDBCursor', 'IDBCursorWithValue', 'IDBDatabase', 'IDBFactory', 'IDBIndex', 'IDBKeyRange', 'IDBObjectStore', 'IDBOpenDBRequest', 'IDBRequest', 'IDBTransaction', 'IDBVersionChangeEvent'];
+for (var i = 0; i < propertiesToTest.length; i++) {
+ propertyToTest = propertiesToTest[i];
+ shouldBeUndefined("self." + propertyToTest);
+ shouldBeFalse("'" + propertyToTest + "' in self");
+}
+
finishJSTest();
Modified: trunk/LayoutTests/storage/indexeddb/modern/resources/workers-enable.js (199888 => 199889)
--- trunk/LayoutTests/storage/indexeddb/modern/resources/workers-enable.js 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/workers-enable.js 2016-04-22 19:22:54 UTC (rev 199889)
@@ -5,8 +5,15 @@
description("Check to make sure we can enable IndexedDB in workers via a runtime setting");
-shouldBeDefined("self.indexedDB");
-shouldBeNonNull("self.indexedDB");
+var propertiesToTest = ['indexedDB', 'IDBCursor', 'IDBCursorWithValue', 'IDBDatabase', 'IDBFactory', 'IDBIndex', 'IDBKeyRange', 'IDBObjectStore', 'IDBOpenDBRequest', 'IDBRequest', 'IDBTransaction', 'IDBVersionChangeEvent'];
+
+for (var i = 0; i < propertiesToTest.length; i++) {
+ propertyToTest = propertiesToTest[i];
+ shouldBeDefined("self." + propertyToTest);
+ shouldBeNonNull("self." + propertyToTest);
+ shouldBeTrue("'" + propertyToTest + "' in self");
+}
+
shouldBeTrue("self.indexedDB instanceof IDBFactory");
finishJSTest();
Modified: trunk/LayoutTests/storage/indexeddb/modern/workers-disabled-expected.txt (199888 => 199889)
--- trunk/LayoutTests/storage/indexeddb/modern/workers-disabled-expected.txt 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/LayoutTests/storage/indexeddb/modern/workers-disabled-expected.txt 2016-04-22 19:22:54 UTC (rev 199889)
@@ -5,6 +5,29 @@
Starting worker: resources/workers-disabled.js
PASS [Worker] self.indexedDB is undefined.
+PASS [Worker] 'indexedDB' in self is false
+PASS [Worker] self.IDBCursor is undefined.
+PASS [Worker] 'IDBCursor' in self is false
+PASS [Worker] self.IDBCursorWithValue is undefined.
+PASS [Worker] 'IDBCursorWithValue' in self is false
+PASS [Worker] self.IDBDatabase is undefined.
+PASS [Worker] 'IDBDatabase' in self is false
+PASS [Worker] self.IDBFactory is undefined.
+PASS [Worker] 'IDBFactory' in self is false
+PASS [Worker] self.IDBIndex is undefined.
+PASS [Worker] 'IDBIndex' in self is false
+PASS [Worker] self.IDBKeyRange is undefined.
+PASS [Worker] 'IDBKeyRange' in self is false
+PASS [Worker] self.IDBObjectStore is undefined.
+PASS [Worker] 'IDBObjectStore' in self is false
+PASS [Worker] self.IDBOpenDBRequest is undefined.
+PASS [Worker] 'IDBOpenDBRequest' in self is false
+PASS [Worker] self.IDBRequest is undefined.
+PASS [Worker] 'IDBRequest' in self is false
+PASS [Worker] self.IDBTransaction is undefined.
+PASS [Worker] 'IDBTransaction' in self is false
+PASS [Worker] self.IDBVersionChangeEvent is undefined.
+PASS [Worker] 'IDBVersionChangeEvent' in self is false
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/storage/indexeddb/modern/workers-enable-expected.txt (199888 => 199889)
--- trunk/LayoutTests/storage/indexeddb/modern/workers-enable-expected.txt 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/LayoutTests/storage/indexeddb/modern/workers-enable-expected.txt 2016-04-22 19:22:54 UTC (rev 199889)
@@ -6,6 +6,40 @@
Starting worker: resources/workers-enable.js
PASS [Worker] self.indexedDB is defined.
PASS [Worker] self.indexedDB is non-null.
+PASS [Worker] 'indexedDB' in self is true
+PASS [Worker] self.IDBCursor is defined.
+PASS [Worker] self.IDBCursor is non-null.
+PASS [Worker] 'IDBCursor' in self is true
+PASS [Worker] self.IDBCursorWithValue is defined.
+PASS [Worker] self.IDBCursorWithValue is non-null.
+PASS [Worker] 'IDBCursorWithValue' in self is true
+PASS [Worker] self.IDBDatabase is defined.
+PASS [Worker] self.IDBDatabase is non-null.
+PASS [Worker] 'IDBDatabase' in self is true
+PASS [Worker] self.IDBFactory is defined.
+PASS [Worker] self.IDBFactory is non-null.
+PASS [Worker] 'IDBFactory' in self is true
+PASS [Worker] self.IDBIndex is defined.
+PASS [Worker] self.IDBIndex is non-null.
+PASS [Worker] 'IDBIndex' in self is true
+PASS [Worker] self.IDBKeyRange is defined.
+PASS [Worker] self.IDBKeyRange is non-null.
+PASS [Worker] 'IDBKeyRange' in self is true
+PASS [Worker] self.IDBObjectStore is defined.
+PASS [Worker] self.IDBObjectStore is non-null.
+PASS [Worker] 'IDBObjectStore' in self is true
+PASS [Worker] self.IDBOpenDBRequest is defined.
+PASS [Worker] self.IDBOpenDBRequest is non-null.
+PASS [Worker] 'IDBOpenDBRequest' in self is true
+PASS [Worker] self.IDBRequest is defined.
+PASS [Worker] self.IDBRequest is non-null.
+PASS [Worker] 'IDBRequest' in self is true
+PASS [Worker] self.IDBTransaction is defined.
+PASS [Worker] self.IDBTransaction is non-null.
+PASS [Worker] 'IDBTransaction' in self is true
+PASS [Worker] self.IDBVersionChangeEvent is defined.
+PASS [Worker] self.IDBVersionChangeEvent is non-null.
+PASS [Worker] 'IDBVersionChangeEvent' in self is true
PASS [Worker] self.indexedDB instanceof IDBFactory is true
PASS successfullyParsed is true
Modified: trunk/Source/WebCore/ChangeLog (199888 => 199889)
--- trunk/Source/WebCore/ChangeLog 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/Source/WebCore/ChangeLog 2016-04-22 19:22:54 UTC (rev 199889)
@@ -1,3 +1,27 @@
+2016-04-22 Chris Dumez <cdu...@apple.com>
+
+ Support disabling at runtime IndexedDB constructors exposed to workers
+ https://bugs.webkit.org/show_bug.cgi?id=156883
+
+ Reviewed by Darin Adler.
+
+ Support disabling at runtime IndexedDB constructors exposed to workers.
+ Previously, constructors visibility to workers and window was constrolled
+ by the same runtime flag.
+
+ * Modules/indexeddb/IDBCursor.idl:
+ * Modules/indexeddb/IDBCursorWithValue.idl:
+ * Modules/indexeddb/IDBDatabase.idl:
+ * Modules/indexeddb/IDBFactory.idl:
+ * Modules/indexeddb/IDBIndex.idl:
+ * Modules/indexeddb/IDBKeyRange.idl:
+ * Modules/indexeddb/IDBObjectStore.idl:
+ * Modules/indexeddb/IDBOpenDBRequest.idl:
+ * Modules/indexeddb/IDBRequest.idl:
+ * Modules/indexeddb/IDBTransaction.idl:
+ * Modules/indexeddb/IDBVersionChangeEvent.idl:
+ * workers/WorkerGlobalScope.idl:
+
2016-04-22 Dean Jackson <d...@apple.com>
Attempting to fix Windows build. Add isHidden implementation.
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl (199888 => 199889)
--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl 2016-04-22 19:22:54 UTC (rev 199889)
@@ -30,7 +30,6 @@
ActiveDOMObject,
SkipVTableValidation,
JSCustomMarkFunction,
- Exposed=(Window,Worker),
] interface IDBCursor {
[CustomGetter] readonly attribute any source;
readonly attribute DOMString direction;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl (199888 => 199889)
--- trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursorWithValue.idl 2016-04-22 19:22:54 UTC (rev 199889)
@@ -29,7 +29,6 @@
ActiveDOMObject,
SkipVTableValidation,
JSCustomMarkFunction,
- Exposed=(Window,Worker),
] interface IDBCursorWithValue : IDBCursor {
readonly attribute any value;
};
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl (199888 => 199889)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl 2016-04-22 19:22:54 UTC (rev 199889)
@@ -29,7 +29,6 @@
ActiveDOMObject,
EnabledAtRuntime=IndexedDB,
SkipVTableValidation,
- Exposed=(Window,Worker),
] interface IDBDatabase : EventTarget {
readonly attribute DOMString name;
readonly attribute unsigned long long version;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl (199888 => 199889)
--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl 2016-04-22 19:22:54 UTC (rev 199889)
@@ -27,7 +27,6 @@
Conditional=INDEXED_DATABASE,
EnabledAtRuntime=IndexedDB,
SkipVTableValidation,
- Exposed=(Window,Worker),
] interface IDBFactory {
[CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBOpenDBRequest open(DOMString name, [EnforceRange] optional unsigned long long version);
[CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBOpenDBRequest deleteDatabase(DOMString name);
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl (199888 => 199889)
--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl 2016-04-22 19:22:54 UTC (rev 199889)
@@ -29,7 +29,6 @@
SkipVTableValidation,
JSCustomMarkFunction,
GenerateIsReachable=Impl,
- Exposed=(Window,Worker),
] interface IDBIndex {
readonly attribute DOMString name;
readonly attribute IDBObjectStore objectStore;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl (199888 => 199889)
--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl 2016-04-22 19:22:54 UTC (rev 199889)
@@ -27,7 +27,6 @@
Conditional=INDEXED_DATABASE,
ImplementationLacksVTable,
EnabledAtRuntime=IndexedDB,
- Exposed=(Window,Worker),
] interface IDBKeyRange {
[ImplementationReturnType=IDBKey] readonly attribute any lower;
[ImplementationReturnType=IDBKey] readonly attribute any upper;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl (199888 => 199889)
--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl 2016-04-22 19:22:54 UTC (rev 199889)
@@ -29,7 +29,6 @@
SkipVTableValidation,
JSCustomMarkFunction,
GenerateIsReachable=Impl,
- Exposed=(Window,Worker),
] interface IDBObjectStore {
readonly attribute DOMString? name;
[ImplementationReturnType=IDBKeyPath] readonly attribute any keyPath;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl (199888 => 199889)
--- trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.idl 2016-04-22 19:22:54 UTC (rev 199889)
@@ -29,7 +29,6 @@
JSGenerateToNativeObject,
EnabledAtRuntime=IndexedDB,
SkipVTableValidation,
- Exposed=(Window,Worker),
] interface IDBOpenDBRequest : IDBRequest {
attribute EventHandler onblocked;
attribute EventHandler onupgradeneeded;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl (199888 => 199889)
--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl 2016-04-22 19:22:54 UTC (rev 199889)
@@ -33,7 +33,6 @@
EnabledAtRuntime=IndexedDB,
GenerateIsReachable=Impl,
SkipVTableValidation,
- Exposed=(Window,Worker),
] interface IDBRequest : EventTarget {
[CustomGetter] readonly attribute any result;
[GetterRaisesExceptionWithMessage] readonly attribute DOMError error;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl (199888 => 199889)
--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.idl 2016-04-22 19:22:54 UTC (rev 199889)
@@ -29,7 +29,6 @@
ActiveDOMObject,
EnabledAtRuntime=IndexedDB,
SkipVTableValidation,
- Exposed=(Window,Worker),
] interface IDBTransaction : EventTarget {
readonly attribute DOMString mode;
readonly attribute IDBDatabase db;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl (199888 => 199889)
--- trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl 2016-04-22 19:22:54 UTC (rev 199889)
@@ -27,7 +27,6 @@
Conditional=INDEXED_DATABASE,
EnabledAtRuntime=IndexedDB,
ConstructorTemplate=Event,
- Exposed=(Window,Worker),
] interface IDBVersionChangeEvent : Event {
[InitializedByEventConstructor] readonly attribute unsigned long long oldVersion;
[InitializedByEventConstructor] readonly attribute unsigned long long? newVersion;
Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.idl (199888 => 199889)
--- trunk/Source/WebCore/workers/WorkerGlobalScope.idl 2016-04-22 19:14:50 UTC (rev 199888)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.idl 2016-04-22 19:22:54 UTC (rev 199889)
@@ -50,6 +50,19 @@
// Additional constructors
attribute DOMURLConstructor webkitURL; // FIXME: deprecate this.
+
+ // FIXME: Automatically generate these once we can drop the IndexedDBWorkers runtime flag.
+ [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBCursorConstructor IDBCursor;
+ [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBCursorWithValueConstructor IDBCursorWithValue;
+ [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBDatabaseConstructor IDBDatabase;
+ [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBFactoryConstructor IDBFactory;
+ [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBIndexConstructor IDBIndex;
+ [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBKeyRangeConstructor IDBKeyRange;
+ [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBObjectStoreConstructor IDBObjectStore;
+ [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBOpenDBRequestConstructor IDBOpenDBRequest;
+ [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBRequestConstructor IDBRequest;
+ [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBTransactionConstructor IDBTransaction;
+ [Conditional=INDEXED_DATABASE_IN_WORKERS, EnabledAtRuntime=IndexedDBWorkers] attribute IDBVersionChangeEventConstructor IDBVersionChangeEvent;
};
WorkerGlobalScope implements WindowTimers;