Changeset 260483 in webkit
- Timestamp:
- Apr 21, 2020 6:34:57 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r260482 r260483 1 2020-04-21 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 The visibilitychange event should bubble 4 https://bugs.webkit.org/show_bug.cgi?id=210829 5 6 Reviewed by Darin Adler. 7 8 * fast/events/page-visibility-transition-test-expected.txt: 9 * fast/events/page-visibility-transition-test.html: 10 1 11 2020-04-21 Simon Fraser <simon.fraser@apple.com> 2 12 -
trunk/LayoutTests/fast/events/page-visibility-transition-test-expected.txt
r218747 r260483 7 7 PASS document.hidden is false 8 8 PASS internals.scriptedAnimationsAreSuspended is false 9 PASS event.bubbles is true 9 10 PASS document.visibilityState is "hidden" 10 11 PASS document.hidden is true … … 13 14 PASS document.hidden is true 14 15 PASS internals.scriptedAnimationsAreSuspended is true 16 PASS event.bubbles is true 15 17 PASS document.visibilityState is "visible" 16 18 PASS document.hidden is false -
trunk/LayoutTests/fast/events/page-visibility-transition-test.html
r218747 r260483 65 65 66 66 function onVisibilityChange() { 67 shouldBeTrue("event.bubbles"); 67 68 if (numVisibilityChanges == 1) { 68 69 checkIsPageHidden(); -
trunk/Source/WebCore/ChangeLog
r260482 r260483 1 2020-04-21 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 The visibilitychange event should bubble 4 https://bugs.webkit.org/show_bug.cgi?id=210829 5 6 Reviewed by Darin Adler. 7 8 This change makes `visibilitychange` event bubble as per spec [1], aligning WebKit 9 with Blink and Gecko. Also fixes broken spec link to `visibilityState` attribute. 10 11 [1] https://w3c.github.io/page-visibility/#dfn-now-visible-algorithm (step 2) 12 13 Test: fast/events/page-visibility-transition-test.html 14 15 * dom/Document.cpp: 16 (WebCore::Document::visibilityStateChanged): 17 (WebCore::Document::visibilityState const): 18 1 19 2020-04-21 Simon Fraser <simon.fraser@apple.com> 2 20 -
trunk/Source/WebCore/dom/Document.cpp
r260435 r260483 1740 1740 void Document::visibilityStateChanged() 1741 1741 { 1742 // //https://w3c.github.io/page-visibility/#reacting-to-visibilitychange-changes1743 queueTaskToDispatchEvent(TaskSource::UserInteraction, Event::create(eventNames().visibilitychangeEvent, Event::CanBubble:: No, Event::IsCancelable::No));1742 // https://w3c.github.io/page-visibility/#reacting-to-visibilitychange-changes 1743 queueTaskToDispatchEvent(TaskSource::UserInteraction, Event::create(eventNames().visibilitychangeEvent, Event::CanBubble::Yes, Event::IsCancelable::No)); 1744 1744 for (auto* client : m_visibilityStateCallbackClients) 1745 1745 client->visibilityStateChanged(); … … 1763 1763 // page. If there is no page associated with the document, we will assume 1764 1764 // that the page is hidden, as specified by the spec: 1765 // http ://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#dom-document-hidden1765 // https://w3c.github.io/page-visibility/#visibilitystate-attribute 1766 1766 if (!m_frame || !m_frame->page()) 1767 1767 return VisibilityState::Hidden;
Note: See TracChangeset
for help on using the changeset viewer.