Location.ancestorOrigins should return a FrozenArray<USVString>
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Aug 2016 14:44:52 +0000 (14:44 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Aug 2016 14:44:52 +0000 (14:44 +0000)
commit2819117a53ee16c1401748921ea86a583a56fee9
treea0dd59706f38cac248b0f1fa2d6a5e97b245c3a3
parent2111eecf42b3b000b3b6e14e5b78ff54b3e6cf62
Location.ancestorOrigins should return a FrozenArray<USVString>
https://bugs.webkit.org/show_bug.cgi?id=161018

Reviewed by Ryosuke Niwa and Chris Dumez.

Source/JavaScriptCore:

* runtime/ObjectConstructor.h:
(JSC::objectConstructorFreeze):
Export objectConstructorFreeze so it can be used to freeze DOM FrozenArrays.

Source/WebCore:

Updated tests: fast/dom/Window/Location/ancestor-origins.html
               fast/dom/indexed-getters-returning-string.html

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::createObjectStore):
(WebCore::IDBDatabase::transaction):
(WebCore::IDBDatabase::deleteObjectStore):
* Modules/indexeddb/IDBDatabase.h:
Remove unused ScriptExecutionContext parameter.

* Modules/indexeddb/IDBDatabase.idl:
There is no need for a custom implementation anymore.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
Remove JSDOMStringListCustom.cpp, which is no longer needed.

* bindings/js/JSDOMBinding.cpp:
(WebCore::jsArray): Deleted.
Remove overload of jsArray that took a DOMStringList.

* bindings/js/JSDOMBinding.h:
(WebCore::jsFrozenArray):
Add jsFrozenArray which returns an JSArray which has had the moral
equivalent of Object.freeze() called on it. This follows
http://heycam.github.io/webidl/#es-frozen-array.

* bindings/js/JSDOMStringListCustom.cpp:
Removed.

* bindings/js/JSIDBDatabaseCustom.cpp:
(WebCore::JSIDBDatabase::transaction): Deleted.
Remove no longer necessary custom implementation of transaction.

* bindings/scripts/CodeGenerator.pm:
(IsRefPtrType):
(IsSVGAnimatedType):
(IsSequenceType):
(GetSequenceType):
(IsFrozenArrayType):
(GetFrozenArrayInnerType):
* bindings/scripts/CodeGeneratorJS.pm:
(AreTypesDistinguishableForOverloadResolution):
(GenerateOverloadedFunctionOrConstructor):
(GetNativeType):
(GetNativeVectorInnerType):
(GetNativeTypeForCallbacks):
(JSValueToNative):
(NativeToJSValue):
* bindings/scripts/IDLParser.pm:
(parseNonAnyType):
Add support for FrozenArray, closely matching the sequence code.

* bindings/scripts/test/JS/JSTestCallback.cpp:
* bindings/scripts/test/JS/JSTestCallback.h:
* bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunction.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
Updated bindings test results.

* dom/DOMStringList.idl:
Remove JSCustomToNativeObject, which is no longer needed.

* inspector/InspectorIndexedDBAgent.cpp:
Update calls to IDBDatabase::transaction.

* page/Location.cpp:
(WebCore::Location::ancestorOrigins):
* page/Location.h:
Change ancestorOrigins to return a Vector<String> rather than
a DOMStringList.

* page/Location.idl:
Change ancestorOrigins to return a FrozenArray<USVString>, matching
the HTML5 spec.

LayoutTests:

Update existing tests to account for the change in type of Location.ancestorOrigins.

* fast/dom/Window/Location/ancestor-origins-expected.txt:
* fast/dom/Window/Location/ancestor-origins.html:
* fast/dom/indexed-getters-returning-string-expected.txt:
* fast/dom/indexed-getters-returning-string.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
33 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/Location/ancestor-origins-expected.txt
LayoutTests/fast/dom/Window/Location/ancestor-origins.html
LayoutTests/fast/dom/indexed-getters-returning-string-expected.txt
LayoutTests/fast/dom/indexed-getters-returning-string.html
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ObjectConstructor.h
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBDatabase.cpp
Source/WebCore/Modules/indexeddb/IDBDatabase.h
Source/WebCore/Modules/indexeddb/IDBDatabase.idl
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/JSDOMBinding.cpp
Source/WebCore/bindings/js/JSDOMBinding.h
Source/WebCore/bindings/js/JSDOMStringListCustom.cpp [deleted file]
Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp
Source/WebCore/bindings/scripts/CodeGenerator.pm
Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/IDLParser.pm
Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.h
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
Source/WebCore/dom/DOMStringList.idl
Source/WebCore/inspector/InspectorIndexedDBAgent.cpp
Source/WebCore/page/Location.cpp
Source/WebCore/page/Location.h
Source/WebCore/page/Location.idl