Rename "Cross-Origin-Options" HTTP header to "Cross-Origin-Window-Policy"
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jun 2018 04:11:49 +0000 (04:11 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jun 2018 04:11:49 +0000 (04:11 +0000)
commit90cef1802145a63102e15d14bc66c9f24c99c91f
tree8c127bc87f5cdc85bfe0530ad038e261773975c3
parent62944997a0770896ae3c25d21ae01acce0a83183
Rename "Cross-Origin-Options" HTTP header to "Cross-Origin-Window-Policy"
https://bugs.webkit.org/show_bug.cgi?id=186287
<rdar://problem/40783352>

Reviewed by Youenn Fablet.

Source/WebCore:

Tests: http/wpt/cross-origin-window-policy/allow-postmessage-from-deny.html
       http/wpt/cross-origin-window-policy/allow-postmessage.html
       http/wpt/cross-origin-window-policy/cross-origin-window-policy-header.html
       http/wpt/cross-origin-window-policy/navigation-from-opener-via-open-target.html
       http/wpt/cross-origin-window-policy/navigation-from-subframe-via-anchor-target.html

* bindings/js/JSDOMBindingSecurity.cpp:
(WebCore::BindingSecurity::shouldAllowAccessToDOMWindowGivenMinimumCrossOriginWindowPolicy):
* bindings/js/JSDOMBindingSecurity.h:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::effectiveCrossOriginWindowPolicyForAccess):
(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
(WebCore::addCrossOriginWindowPropertyNames):
(WebCore::addScopedChildrenIndexes):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributeGetterBodyDefinition):
(GetCrossOriginsOptionsFromExtendedAttributeValue):
(GenerateAttributeSetterBodyDefinition):
(GenerateOperationBodyDefinition):
* bindings/scripts/IDLAttributes.json:
* dom/Document.cpp:
(WebCore::Document::canNavigate):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument):
* page/AbstractDOMWindow.cpp:
(WebCore::AbstractDOMWindow::AbstractDOMWindow):
* page/AbstractDOMWindow.h:
(WebCore::AbstractDOMWindow::crossOriginWindowPolicy):
(WebCore::AbstractDOMWindow::setCrossOriginWindowPolicy):
* page/DOMWindow.idl:
* page/Settings.yaml:
* platform/network/HTTPHeaderNames.in:
* platform/network/HTTPParsers.cpp:
(WebCore::parseCrossOriginWindowPolicyHeader):
* platform/network/HTTPParsers.h:

Source/WebKit:

* Shared/WebPreferences.yaml:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::frameBecameRemote):

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences crossOriginWindowPolicySupportEnabled]):
(-[WebPreferences setCrossOriginWindowPolicySupportEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::crossOriginWindowPolicySupportEnabled):
(WebPreferences::setCrossOriginWindowPolicySupportEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):

LayoutTests:

* http/wpt/cross-origin-options/allow-postmessage-expected.txt: Removed.
* http/wpt/cross-origin-options/allow-postmessage-from-deny-expected.txt: Removed.
* http/wpt/cross-origin-options/allow-postmessage-from-deny.html.headers: Removed.
* http/wpt/cross-origin-options/cross-origin-options-header-expected.txt: Removed.
* http/wpt/cross-origin-options/navigation-from-opener-via-open-target-expected.txt: Removed.
* http/wpt/cross-origin-options/navigation-from-subframe-via-anchor-target-expected.txt: Removed.
* http/wpt/cross-origin-options/resources/cross-origin-options-allow-postmessage-pong.html.headers: Removed.
* http/wpt/cross-origin-window-policy/allow-postmessage-expected.txt: Added.
* http/wpt/cross-origin-window-policy/allow-postmessage-from-deny-expected.txt: Added.
* http/wpt/cross-origin-window-policy/allow-postmessage-from-deny.html: Renamed from LayoutTests/http/wpt/cross-origin-options/allow-postmessage-from-deny.html.
* http/wpt/cross-origin-window-policy/allow-postmessage-from-deny.html.headers: Added.
* http/wpt/cross-origin-window-policy/allow-postmessage.html: Renamed from LayoutTests/http/wpt/cross-origin-options/allow-postmessage.html.
* http/wpt/cross-origin-window-policy/cross-origin-window-policy-header-expected.txt: Added.
* http/wpt/cross-origin-window-policy/cross-origin-window-policy-header.html: Renamed from LayoutTests/http/wpt/cross-origin-options/cross-origin-options-header.html.
* http/wpt/cross-origin-window-policy/navigation-from-opener-via-open-target-expected.txt: Added.
* http/wpt/cross-origin-window-policy/navigation-from-opener-via-open-target.html: Renamed from LayoutTests/http/wpt/cross-origin-options/navigation-from-opener-via-open-target.html.
* http/wpt/cross-origin-window-policy/navigation-from-subframe-via-anchor-target-expected.txt: Added.
* http/wpt/cross-origin-window-policy/navigation-from-subframe-via-anchor-target.html: Renamed from LayoutTests/http/wpt/cross-origin-options/navigation-from-subframe-via-anchor-target.html.
* http/wpt/cross-origin-window-policy/resources/cross-origin-window-policy-allow-postmessage-pong.html: Renamed from LayoutTests/http/wpt/cross-origin-options/resources/cross-origin-options-allow-postmessage-pong.html.
* http/wpt/cross-origin-window-policy/resources/cross-origin-window-policy-allow-postmessage-pong.html.headers: Added.
* http/wpt/cross-origin-window-policy/resources/destination.html: Renamed from LayoutTests/http/wpt/cross-origin-options/resources/destination.html.
* http/wpt/cross-origin-window-policy/resources/navigate-parent-via-anchor.html: Renamed from LayoutTests/http/wpt/cross-origin-options/resources/navigate-parent-via-anchor.html.
* http/wpt/cross-origin-window-policy/resources/navigation-from-subframe-frame.py: Renamed from LayoutTests/http/wpt/cross-origin-options/resources/navigation-from-subframe-frame.py.
(main):
* http/wpt/cross-origin-window-policy/resources/serve-cross-origin-window-policy-header.py: Renamed from LayoutTests/http/wpt/cross-origin-options/resources/serve-cross-origin-options-header.py.
(main):
* http/wpt/cross-origin-window-policy/resources/utils.js: Renamed from LayoutTests/http/wpt/cross-origin-options/resources/utils.js.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
60 files changed:
LayoutTests/ChangeLog
LayoutTests/http/wpt/cross-origin-options/allow-postmessage-expected.txt [deleted file]
LayoutTests/http/wpt/cross-origin-options/allow-postmessage-from-deny-expected.txt [deleted file]
LayoutTests/http/wpt/cross-origin-options/allow-postmessage-from-deny.html.headers [deleted file]
LayoutTests/http/wpt/cross-origin-options/cross-origin-options-header-expected.txt [deleted file]
LayoutTests/http/wpt/cross-origin-options/navigation-from-opener-via-open-target-expected.txt [deleted file]
LayoutTests/http/wpt/cross-origin-options/navigation-from-subframe-via-anchor-target-expected.txt [deleted file]
LayoutTests/http/wpt/cross-origin-options/resources/cross-origin-options-allow-postmessage-pong.html.headers [deleted file]
LayoutTests/http/wpt/cross-origin-window-policy/allow-postmessage-expected.txt [new file with mode: 0644]
LayoutTests/http/wpt/cross-origin-window-policy/allow-postmessage-from-deny-expected.txt [new file with mode: 0644]
LayoutTests/http/wpt/cross-origin-window-policy/allow-postmessage-from-deny.html [moved from LayoutTests/http/wpt/cross-origin-options/allow-postmessage-from-deny.html with 61% similarity]
LayoutTests/http/wpt/cross-origin-window-policy/allow-postmessage-from-deny.html.headers [new file with mode: 0644]
LayoutTests/http/wpt/cross-origin-window-policy/allow-postmessage.html [moved from LayoutTests/http/wpt/cross-origin-options/allow-postmessage.html with 69% similarity]
LayoutTests/http/wpt/cross-origin-window-policy/cross-origin-window-policy-header-expected.txt [new file with mode: 0644]
LayoutTests/http/wpt/cross-origin-window-policy/cross-origin-window-policy-header.html [moved from LayoutTests/http/wpt/cross-origin-options/cross-origin-options-header.html with 53% similarity]
LayoutTests/http/wpt/cross-origin-window-policy/navigation-from-opener-via-open-target-expected.txt [new file with mode: 0644]
LayoutTests/http/wpt/cross-origin-window-policy/navigation-from-opener-via-open-target.html [moved from LayoutTests/http/wpt/cross-origin-options/navigation-from-opener-via-open-target.html with 67% similarity]
LayoutTests/http/wpt/cross-origin-window-policy/navigation-from-subframe-via-anchor-target-expected.txt [new file with mode: 0644]
LayoutTests/http/wpt/cross-origin-window-policy/navigation-from-subframe-via-anchor-target.html [moved from LayoutTests/http/wpt/cross-origin-options/navigation-from-subframe-via-anchor-target.html with 75% similarity]
LayoutTests/http/wpt/cross-origin-window-policy/resources/cross-origin-window-policy-allow-postmessage-pong.html [moved from LayoutTests/http/wpt/cross-origin-options/resources/cross-origin-options-allow-postmessage-pong.html with 100% similarity]
LayoutTests/http/wpt/cross-origin-window-policy/resources/cross-origin-window-policy-allow-postmessage-pong.html.headers [new file with mode: 0644]
LayoutTests/http/wpt/cross-origin-window-policy/resources/destination.html [moved from LayoutTests/http/wpt/cross-origin-options/resources/destination.html with 100% similarity]
LayoutTests/http/wpt/cross-origin-window-policy/resources/navigate-parent-via-anchor.html [moved from LayoutTests/http/wpt/cross-origin-options/resources/navigate-parent-via-anchor.html with 84% similarity]
LayoutTests/http/wpt/cross-origin-window-policy/resources/navigation-from-subframe-frame.py [moved from LayoutTests/http/wpt/cross-origin-options/resources/navigation-from-subframe-frame.py with 75% similarity]
LayoutTests/http/wpt/cross-origin-window-policy/resources/serve-cross-origin-window-policy-header.py [moved from LayoutTests/http/wpt/cross-origin-options/resources/serve-cross-origin-options-header.py with 86% similarity]
LayoutTests/http/wpt/cross-origin-window-policy/resources/utils.js [moved from LayoutTests/http/wpt/cross-origin-options/resources/utils.js with 98% similarity]
LayoutTests/platform/wk2/http/wpt/cross-origin-options/navigation-from-subframe-via-anchor-target-expected.txt [deleted file]
LayoutTests/platform/wk2/http/wpt/cross-origin-window-policy/navigation-from-subframe-via-anchor-target-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMBindingSecurity.cpp
Source/WebCore/bindings/js/JSDOMBindingSecurity.h
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/IDLAttributes.json
Source/WebCore/dom/Document.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/page/AbstractDOMWindow.cpp
Source/WebCore/page/AbstractDOMWindow.h
Source/WebCore/page/DOMWindow.idl
Source/WebCore/page/Settings.yaml
Source/WebCore/platform/network/HTTPHeaderNames.in
Source/WebCore/platform/network/HTTPParsers.cpp
Source/WebCore/platform/network/HTTPParsers.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKitLegacy/mac/WebView/WebPreferences.mm
Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
Source/WebKitLegacy/mac/WebView/WebView.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl
Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h
Source/WebKitLegacy/win/WebPreferences.cpp
Source/WebKitLegacy/win/WebPreferences.h
Source/WebKitLegacy/win/WebView.cpp
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/win/DumpRenderTree.cpp