Make cross-origin properties enumerable
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Jul 2017 18:16:21 +0000 (18:16 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Jul 2017 18:16:21 +0000 (18:16 +0000)
commitf9031e8d04cea3369a6ab027da29f9e69b208b4b
tree2ab2cacbafa572fe4d9358a675f08b0bd231d6e5
parentf8a28eed64f46cc81f5b8f227d43afef6e0e15f6
Make cross-origin properties enumerable
https://bugs.webkit.org/show_bug.cgi?id=174576

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Re-sync tests from upstream and rebaseline to improve test coverage.

* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:
* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html:
* web-platform-tests/html/browsers/the-window-object/window-indexed-properties-expected.txt:
* web-platform-tests/html/browsers/the-window-object/window-indexed-properties.html:

Source/WebCore:

Makes cross-origin properties enumerable on Window and Location objects
as per:
- https://github.com/whatwg/html/pull/2777

This simplifies our code quite a bit.

No new tests, updated existing tests.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
(WebCore::JSDOMWindow::getOwnPropertyNames):
* bindings/js/JSLocationCustom.cpp:
(WebCore::getOwnPropertySlotCommon):
(WebCore::JSLocation::getOwnPropertyNames):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):

LayoutTests:

Update / rebaseline some tests to reflect behavior change.

* http/tests/security/cross-origin-descriptors-expected.txt:
* http/tests/security/cross-origin-descriptors.html:
* js/dom/getOwnPropertyDescriptor-expected.txt:
* js/resources/getOwnPropertyDescriptor.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/security/cross-frame-access-enumeration-expected.txt
LayoutTests/http/tests/security/cross-origin-descriptors-expected.txt
LayoutTests/http/tests/security/cross-origin-descriptors.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html
LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-indexed-properties-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-indexed-properties.html
LayoutTests/js/dom/getOwnPropertyDescriptor-expected.txt
LayoutTests/js/resources/getOwnPropertyDescriptor.js
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/js/JSLocationCustom.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm