Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Navigation] Support "initial about:blank document" logic #28792

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rwlbuis
Copy link
Contributor

@rwlbuis rwlbuis commented May 20, 2024

7d612aa

[Navigation] Support "initial about:blank document" logic
https://bugs.webkit.org/show_bug.cgi?id=274393

Reviewed by NOBODY (OOPS!).

Keep track of the "initial about:blank document" flag and check it in
the "has entries and events disabled" algorithm.

[1] https://html.spec.whatwg.org/multipage/nav-history-apis.html#has-entries-and-events-disabled (Step 3)

* LayoutTests/imported/w3c/web-platform-tests/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc-popup-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/updateCurrentEntry-method/exception-order-initial-about-blank-unserializablestate-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/updateCurrentEntry-method/initial-about-blank-expected.txt:
* Source/WebCore/dom/Document.h:
(WebCore::Document::isInitialAboutBlank const):
(WebCore::Document::setIsInitialAboutBlank):
* Source/WebCore/loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::end):
* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::hasEntriesAndEventsDisabled const):

7d612aa

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2 βœ… πŸ§ͺ wincairo-tests
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ api-wpe
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ›  wpe-cairo
❌ πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ›  gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2-stress βœ… πŸ§ͺ api-gtk
βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@rwlbuis rwlbuis requested review from cdumez and rniwa as code owners May 20, 2024 16:19
@rwlbuis rwlbuis self-assigned this May 20, 2024
@rwlbuis rwlbuis added the WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). label May 20, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 20, 2024
@rwlbuis rwlbuis removed the merging-blocked Applied to prevent a change from being merged label May 21, 2024
@rwlbuis rwlbuis force-pushed the eng/Navigation-Support-initial-aboutblank-document-logic branch from c81d8c8 to b9d79a4 Compare May 21, 2024 16:03
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 21, 2024
@rwlbuis rwlbuis removed the merging-blocked Applied to prevent a change from being merged label May 22, 2024
@rwlbuis rwlbuis force-pushed the eng/Navigation-Support-initial-aboutblank-document-logic branch from b9d79a4 to 4450c08 Compare May 22, 2024 15:15
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 22, 2024
@rwlbuis rwlbuis removed the merging-blocked Applied to prevent a change from being merged label May 22, 2024
@rwlbuis rwlbuis force-pushed the eng/Navigation-Support-initial-aboutblank-document-logic branch from 4450c08 to 0f10b9d Compare May 22, 2024 20:32
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 23, 2024
@rwlbuis rwlbuis removed request for rniwa and cdumez May 23, 2024 03:44
@rwlbuis rwlbuis removed the merging-blocked Applied to prevent a change from being merged label May 23, 2024
@rwlbuis rwlbuis force-pushed the eng/Navigation-Support-initial-aboutblank-document-logic branch from 0f10b9d to 7266be7 Compare May 23, 2024 03:52
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 23, 2024
@rwlbuis rwlbuis removed the merging-blocked Applied to prevent a change from being merged label May 23, 2024
@rwlbuis rwlbuis force-pushed the eng/Navigation-Support-initial-aboutblank-document-logic branch from 7266be7 to 1563fb2 Compare May 23, 2024 19:22
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 24, 2024
@rwlbuis rwlbuis removed the merging-blocked Applied to prevent a change from being merged label May 24, 2024
@rwlbuis rwlbuis force-pushed the eng/Navigation-Support-initial-aboutblank-document-logic branch from 1563fb2 to affa258 Compare May 24, 2024 06:23
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 24, 2024
@rwlbuis rwlbuis removed the merging-blocked Applied to prevent a change from being merged label May 27, 2024
@rwlbuis rwlbuis force-pushed the eng/Navigation-Support-initial-aboutblank-document-logic branch from affa258 to 863a2a1 Compare May 27, 2024 18:29
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 27, 2024
@rwlbuis rwlbuis removed the merging-blocked Applied to prevent a change from being merged label May 28, 2024
@rwlbuis rwlbuis force-pushed the eng/Navigation-Support-initial-aboutblank-document-logic branch from 863a2a1 to cd2d8ca Compare May 28, 2024 09:15
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 28, 2024
https://bugs.webkit.org/show_bug.cgi?id=274393

Reviewed by NOBODY (OOPS!).

Keep track of the "initial about:blank document" flag and check it in
the "has entries and events disabled" algorithm.

[1] https://html.spec.whatwg.org/multipage/nav-history-apis.html#has-entries-and-events-disabled (Step 3)

* LayoutTests/imported/w3c/web-platform-tests/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc-popup-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/updateCurrentEntry-method/exception-order-initial-about-blank-unserializablestate-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/updateCurrentEntry-method/initial-about-blank-expected.txt:
* Source/WebCore/dom/Document.h:
(WebCore::Document::isInitialAboutBlank const):
(WebCore::Document::setIsInitialAboutBlank):
* Source/WebCore/loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::end):
* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::hasEntriesAndEventsDisabled const):
@rwlbuis rwlbuis removed the merging-blocked Applied to prevent a change from being merged label May 28, 2024
@rwlbuis rwlbuis force-pushed the eng/Navigation-Support-initial-aboutblank-document-logic branch from cd2d8ca to 7d612aa Compare May 28, 2024 12:50
@@ -2597,6 +2600,8 @@ class Document
bool m_scheduledDeferredAXObjectCacheUpdate { false };
bool m_wasRemovedLastRefCalled { false };

bool m_isInitialAboutBlank { false };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The FrameLoader already has this state:
bool isShowingInitialAboutBlank = m_localFrame->loader().stateMachine().isDisplayingInitialEmptyDocument()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore).
Projects
None yet
4 participants