Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 392522f03118c2441c27bb304d97f4d70e342318
      
https://github.com/WebKit/WebKit/commit/392522f03118c2441c27bb304d97f4d70e342318
  Author: Matt Woodrow <[email protected]>
  Date:   2024-08-30 (Fri, 30 Aug 2024)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/navigation/pageswap-push-navigation-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/navigation/pageswap-push-with-redirect-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/navigation/pageswap-replace-navigation-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/navigation/pageswap-traverse-navigation-no-bfcache.https-expected.txt
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebCore/loader/HistoryController.cpp
    M Source/WebCore/loader/HistoryController.h
    M Source/WebCore/page/Navigation.cpp
    M Source/WebCore/page/Navigation.h

  Log Message:
  -----------
  Include a NavigationActivation object in the 'page swap' event.
https://bugs.webkit.org/show_bug.cgi?id=278199
<rdar://133993708>

Reviewed by Charlie Wolfe.

This creates a NavigationActivation object for the pageswap event (for same
origin navigations), as required by the spec.

The code for dispatching pageswap gets moved slightly earlier in the commit
process, to be before BackForwardCache::singleton().addIfCacheable. This code
mutates the global history, but also can fire the unload event if the old page
got put into the BF cache. Moving the pageswap event earlier guarantees that it
always happens before unload. It also makes the global history easier to reason
about, even if it doesn't match what the spec wants (as described in the inline
FIXME).

This code should work even with the Navigation API setting disabled, as its an
important feature for cross-document view-transitions (and demos are relying on
being able to access the new/old URLS).

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/navigation/pageswap-push-navigation-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/navigation/pageswap-push-with-redirect-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/navigation/pageswap-replace-navigation-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/navigation/pageswap-traverse-navigation-no-bfcache.https-expected.txt:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::dispatchPageswapEvent):
* Source/WebCore/dom/Document.h:
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::transitionToCommitted):
* Source/WebCore/loader/HistoryController.cpp:
(WebCore::HistoryController::restoreDocumentState):
(WebCore::HistoryController::goToItem):
(WebCore::HistoryController::updateForReload):
(WebCore::HistoryController::initializeItem):
(WebCore::HistoryController::createItem):
(WebCore::HistoryController::createNewItem):
(WebCore::HistoryController::updateCurrentItem):
* Source/WebCore/loader/HistoryController.h:
* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::createForPageswapEvent):
* Source/WebCore/page/Navigation.h:

Canonical link: https://commits.webkit.org/282953@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to