[webkit-changes] [WebKit/WebKit] 3209fe: [Navigation] Throw exceptions when unloading

Rob Buis noreply at github.com
Fri Jul 12 01:53:58 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3209febcce786a323163ed4c5a67c96057507e1e
      https://github.com/WebKit/WebKit/commit/3209febcce786a323163ed4c5a67c96057507e1e
  Author: Rob Buis <rbuis at igalia.com>
  Date:   2024-07-12 (Fri, 12 Jul 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/navigate-pagehide-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/reload-pagehide-expected.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h
    R Source/WebCore/dom/IgnoreOpensDuringUnloadCountIncrementer.h
    A Source/WebCore/dom/UnloadCountIncrementer.h
    M Source/WebCore/history/BackForwardCache.cpp
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebCore/page/Navigation.cpp

  Log Message:
  -----------
  [Navigation] Throw exceptions when unloading
https://bugs.webkit.org/show_bug.cgi?id=276176

Reviewed by Alex Christensen.

Throw exceptions when unloading as specified for multiple methods [1, 2, 3].

This PR also renames m_ignoreOpensDuringUnloadCount to better reflect the specification [4]

[1] https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-navigate
[2] https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-reload
[3] https://html.spec.whatwg.org/multipage/nav-history-apis.html#performing-a-navigation-api-traversal
[4] https://html.spec.whatwg.org/multipage/document-lifecycle.html#unload-counter

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/navigate-pagehide-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/reload-pagehide-expected.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::open):
(WebCore::Document::write):
* Source/WebCore/dom/Document.h:
(WebCore::Document::unloadCounter const):
* Source/WebCore/dom/UnloadCountIncrementer.h: Renamed from Source/WebCore/dom/IgnoreOpensDuringUnloadCountIncrementer.h.
(WebCore::UnloadCountIncrementer::UnloadCountIncrementer):
(WebCore::UnloadCountIncrementer::~UnloadCountIncrementer):
* Source/WebCore/history/BackForwardCache.cpp:
(WebCore::firePageHideEventRecursively):
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::detachChildren):
(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::dispatchUnloadEvents):
* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::reload):
(WebCore::Navigation::navigate):
(WebCore::Navigation::performTraversal):

Canonical link: https://commits.webkit.org/280898@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