[webkit-changes] [WebKit/WebKit] ba51e8: Handle empty URL passed to history.replaceState ac...
Patrick
noreply at github.com
Thu Sep 12 10:04:03 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ba51e8eae852a32250944ac0785c3561d749e0f9
https://github.com/WebKit/WebKit/commit/ba51e8eae852a32250944ac0785c3561d749e0f9
Author: Patrick Griffis <pgriffis at igalia.com>
Date: 2024-09-12 (Thu, 12 Sep 2024)
Changed paths:
M LayoutTests/fast/loader/stateobjects/pushstate-with-fragment-urls-and-hashchange-expected.txt
M LayoutTests/http/tests/history/replacestate-no-url-expected.txt
M LayoutTests/http/tests/history/replacestate-no-url.html
A LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-base-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-base.html
A LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-whitespace-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-whitespace.html
A LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate.html
A LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-base-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-base.html
A LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-whitespace-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-whitespace.html
A LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate.html
A LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/w3c-import.log
M Source/WebCore/page/History.cpp
M Source/WebCore/page/History.h
Log Message:
-----------
Handle empty URL passed to history.replaceState according to spec
https://bugs.webkit.org/show_bug.cgi?id=263635
Reviewed by Alex Christensen.
https://html.spec.whatwg.org/#shared-history-push/replace-state-steps Step 6 states:
> If url is not null or the empty string, then:
So this moves that logic into a conditional for a non-empty URL.
It also does some refactoring to move the quota checks for state object
changes into its own method.
* LayoutTests/http/tests/history/replacestate-no-url.html:
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-base-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-base.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-whitespace-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate-whitespace.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/pushstate.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-base-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-base.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-whitespace-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate-whitespace.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/replacestate.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/pushstate-replacestate-empty-string/w3c-import.log: Added.
* Source/WebCore/page/History.cpp:
(WebCore::History::updateAndCheckStateObjectQuota):
(WebCore::History::stateObjectAdded):
(WebCore::History::urlForState): Deleted.
* Source/WebCore/page/History.h:
Canonical link: https://commits.webkit.org/283565@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list