[webkit-changes] [WebKit/WebKit] e4cbd1: history properties should throw SecurityError when...
sideshowbarker
noreply at github.com
Wed Feb 7 18:18:40 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e4cbd15de56a52641bcdd542c0276fd48c0bcc9d
https://github.com/WebKit/WebKit/commit/e4cbd15de56a52641bcdd542c0276fd48c0bcc9d
Author: Michael[tm] Smith <mike at w3.org>
Date: 2024-02-07 (Wed, 07 Feb 2024)
Changed paths:
M LayoutTests/http/tests/dom/same-origin-detached-window-properties-expected.txt
M LayoutTests/http/tests/dom/same-origin-detached-window-properties.html
M LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/history_properties_only_fully_active-expected.txt
M Source/WebCore/bindings/js/JSHistoryCustom.cpp
M Source/WebCore/page/History.cpp
M Source/WebCore/page/History.h
Log Message:
-----------
history properties should throw SecurityError when not in a fully active Document
https://bugs.webkit.org/show_bug.cgi?id=264962
Reviewed by Darin Adler and Ryosuke Niwa.
This change makes all History API methods and getters and setters throw
a SecurityError if called from a document that isn’t fully active (has
no Frame) — as required by the series of algorithms in the HTML spec
starting at https://html.spec.whatwg.org/multipage/#dom-history-length
* LayoutTests/http/tests/dom/same-origin-detached-window-properties-expected.txt:
* LayoutTests/http/tests/dom/same-origin-detached-window-properties.html:
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/history_properties_only_fully_active-expected.txt:
* Source/WebCore/bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::state const):
* Source/WebCore/page/History.cpp:
(WebCore::isDocumentFullyActive):
(WebCore::documentNotFullyActive):
(WebCore::History::length const):
(WebCore::History::scrollRestoration const):
(WebCore::History::setScrollRestoration):
(WebCore::History::back):
(WebCore::History::forward):
(WebCore::History::go):
(WebCore::History::stateObjectAdded):
(WebCore::History::state): Deleted.
* Source/WebCore/page/History.h:
Canonical link: https://commits.webkit.org/274260@main
More information about the webkit-changes
mailing list