Bug 772275 - Make mozvisibilitychange event bubble, per spec. r=bz
authorJustin Lebar <justin.lebar@gmail.com>
Mon, 09 Jul 2012 23:32:47 -0400
changeset 98780 56545257892911d994aad63ae7b7415fdaacf4f4
parent 98779 8e8bc0324383771fb8540400883e8fe5df48927d
child 98781 552418e64261a15c9c51d691d1306ca61ffe2413
push id11643
push userjlebar@mozilla.com
push dateTue, 10 Jul 2012 03:33:01 +0000
treeherdermozilla-inbound@552418e64261 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs772275
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 772275 - Make mozvisibilitychange event bubble, per spec. r=bz
content/base/src/nsDocument.cpp
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -9537,17 +9537,18 @@ nsDocument::GetMozPointerLockElement(nsI
 void
 nsDocument::UpdateVisibilityState()
 {
   VisibilityState oldState = mVisibilityState;
   mVisibilityState = GetVisibilityState();
   if (oldState != mVisibilityState) {
     nsContentUtils::DispatchTrustedEvent(this, static_cast<nsIDocument*>(this),
                                          NS_LITERAL_STRING("mozvisibilitychange"),
-                                         false, false);
+                                         /* bubbles = */ true,
+                                         /* cancelable = */ false);
   }
 }
 
 nsDocument::VisibilityState
 nsDocument::GetVisibilityState() const
 {
   // We have to check a few pieces of information here:
   // 1)  Are we in bfcache (!IsVisible())?  If so, nothing else matters.