Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1435893003: PageVisibility API: Ensure bubbling events are generated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/page-visibility-bubble-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index c24eb4170bbab3d22b2581b842b399250f664c4c..da9853e9daeb00e1da68f901fbad55c94c2c7e26 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -1377,9 +1377,11 @@ bool Document::hidden() const
void Document::didChangeVisibilityState()
{
- dispatchEvent(Event::create(EventTypeNames::visibilitychange));
+ // 'visibilitychange' event should bubble
+ // See: http://www.w3.org/TR/page-visibility/#sec-processing-model
dtapuska 2015/11/13 00:26:58 I don't think we need the comments here; it is pre
+ dispatchEvent(Event::createBubble(EventTypeNames::visibilitychange));
// Also send out the deprecated version until it can be removed.
- dispatchEvent(Event::create(EventTypeNames::webkitvisibilitychange));
+ dispatchEvent(Event::createBubble(EventTypeNames::webkitvisibilitychange));
PageVisibilityState state = pageVisibilityState();
for (DocumentVisibilityObserver* observer : m_visibilityObservers)
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/page-visibility-bubble-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698