[webkit-changes] [WebKit/WebKit] 3bd888: Refactor dispatching of pagehideEvent and pageshow...

Ryosuke Niwa noreply at github.com
Fri Mar 10 14:25:18 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3bd88829cdb91ac7a72bdf44cda12f5a96ad1170
      https://github.com/WebKit/WebKit/commit/3bd88829cdb91ac7a72bdf44cda12f5a96ad1170
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2023-03-10 (Fri, 10 Mar 2023)

  Changed paths:
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebCore/page/DOMWindow.cpp
    M Source/WebCore/page/DOMWindow.h
    M Source/WebCore/page/ios/FrameIOS.mm

  Log Message:
  -----------
  Refactor dispatching of pagehideEvent and pageshowEvent
https://bugs.webkit.org/show_bug.cgi?id=253682

Reviewed by Chris Dumez.

Consolidate the code to dispatch pagehide and pageshow events to Document,
and also move m_lastPageStatus from DOMWindow to Document.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::dispatchPageshowEvent):
(WebCore::Document::dispatchPagehideEvent):
* Source/WebCore/dom/Document.h:
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::dispatchUnloadEvents):
* Source/WebCore/page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
(WebCore::DOMWindow::dispatchEvent):
* Source/WebCore/page/DOMWindow.h:
* Source/WebCore/page/ios/FrameIOS.mm:
(WebCore::Frame::dispatchPageHideEventBeforePause): These are only used in WebKit1 on iOS.
(WebCore::Frame::dispatchPageShowEventBeforeResume): Ditto.

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




More information about the webkit-changes mailing list