Changeset 267593 in webkit


Ignore:
Timestamp:
Sep 25, 2020 2:29:46 PM (4 years ago)
Author:
Chris Dumez
Message:

Unreviewed, reverting r267589.

Broke document.visibilityState when coming out of back/forward
cache

Reverted changeset:

"visibilitychange:hidden doesn't fire during page navigations"
https://bugs.webkit.org/show_bug.cgi?id=151234
https://trac.webkit.org/changeset/267589

Location:
trunk
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r267589 r267593  
     12020-09-25  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, reverting r267589.
     4
     5        Broke document.visibilityState when coming out of back/forward
     6        cache
     7
     8        Reverted changeset:
     9
     10        "visibilitychange:hidden doesn't fire during page navigations"
     11        https://bugs.webkit.org/show_bug.cgi?id=151234
     12        https://trac.webkit.org/changeset/267589
     13
    1142020-09-25  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/LayoutTests/imported/w3c/resources/import-expectations.json

    r267589 r267593  
    337337    "web-platform-tests/orientation-event": "skip",
    338338    "web-platform-tests/orientation-sensor": "skip",
    339     "web-platform-tests/page-visibility": "import",
     339    "web-platform-tests/page-visibility": "skip",
    340340    "web-platform-tests/paint-timing": "skip",
    341341    "web-platform-tests/payment-handler": "skip",
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/no_window_open_when_term_nesting_level_nonzero.window-expected.txt

    r267589 r267593  
    1 CONSOLE MESSAGE: Error: assert_equals: expected no popup during visibilitychange expected null but got object "[object Window]"
    21CONSOLE MESSAGE: Error: assert_equals: expected no popup during pagehide expected null but got object "[object Window]"
    32CONSOLE MESSAGE: Error: assert_equals: expected no popup during unload expected null but got object "[object Window]"
  • trunk/Source/WebCore/ChangeLog

    r267592 r267593  
     12020-09-25  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, reverting r267589.
     4
     5        Broke document.visibilityState when coming out of back/forward
     6        cache
     7
     8        Reverted changeset:
     9
     10        "visibilitychange:hidden doesn't fire during page navigations"
     11        https://bugs.webkit.org/show_bug.cgi?id=151234
     12        https://trac.webkit.org/changeset/267589
     13
    1142020-09-25  Antoine Quint  <graouts@webkit.org>
    215
  • trunk/Source/WebCore/dom/Document.cpp

    r267589 r267593  
    17731773    // that the page is hidden, as specified by the spec:
    17741774    // https://w3c.github.io/page-visibility/#visibilitystate-attribute
    1775     if (!m_frame || !m_frame->page() || m_isUnloadingOrUnloaded)
     1775    if (!m_frame || !m_frame->page())
    17761776        return VisibilityState::Hidden;
    17771777    return m_frame->page()->visibilityState();
  • trunk/Source/WebCore/dom/Document.h

    r267589 r267593  
    492492    bool isTimerThrottlingEnabled() const { return m_isTimerThrottlingEnabled; }
    493493
    494     void markAsUnloadingOrUnloaded() { m_isUnloadingOrUnloaded = true; }
    495 
    496494    WEBCORE_EXPORT ExceptionOr<Ref<Node>> adoptNode(Node& source);
    497495
     
    21302128#endif
    21312129    bool m_hasVisuallyNonEmptyCustomContent { false };
    2132     bool m_isUnloadingOrUnloaded { false };
    21332130
    21342131    Ref<UndoManager> m_undoManager;
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r267589 r267593  
    32763276            downcast<HTMLInputElement>(*currentFocusedElement).endEditing();
    32773277        if (m_pageDismissalEventBeingDispatched == PageDismissalType::None) {
    3278             m_frame.document()->markAsUnloadingOrUnloaded();
    3279 
    3280             m_frame.document()->dispatchEvent(Event::create(eventNames().visibilitychangeEvent, Event::CanBubble::Yes, Event::IsCancelable::No));
    3281 
    32823278            if (unloadEventPolicy == UnloadEventPolicyUnloadAndPageHide) {
    32833279                m_pageDismissalEventBeingDispatched = PageDismissalType::PageHide;
    32843280                m_frame.document()->domWindow()->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, m_frame.document()->backForwardCacheState() == Document::AboutToEnterBackForwardCache), m_frame.document());
    32853281            }
     3282
     3283            // FIXME: update Page Visibility state here.
     3284            // https://bugs.webkit.org/show_bug.cgi?id=116770
    32863285
    32873286            if (m_frame.document()->backForwardCacheState() == Document::NotInBackForwardCache) {
Note: See TracChangeset for help on using the changeset viewer.