Bug 944047 - Capture scroll events in TabChild. r=kats
authorChris Lord <chrislord.net@gmail.com>
Thu, 05 Dec 2013 20:47:20 +0000
changeset 173768 1689fa499c1ce39ec6ffd8b21ddd9d1464b4a6c6
parent 173767 015be0f83e7a38d3f92081fe3c42daeec4ad3155
child 173769 2722412248da07351ad840e2e9deac96feac2c58
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs944047
milestone28.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 944047 - Capture scroll events in TabChild. r=kats Set useCapture to true in the event listener on scroll events. It appears that scroll events for sub-frames are often(/always?) swallowed before they reach this point.
dom/ipc/TabChild.cpp
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -2183,17 +2183,17 @@ TabChild::InitTabChildGlobal(FrameScript
 
     scope->Init();
 
     nsCOMPtr<nsPIWindowRoot> root = do_QueryInterface(chromeHandler);
     NS_ENSURE_TRUE(root, false);
     root->SetParentTarget(scope);
 
     chromeHandler->AddEventListener(NS_LITERAL_STRING("DOMMetaAdded"), this, false);
-    chromeHandler->AddEventListener(NS_LITERAL_STRING("scroll"), this, false);
+    chromeHandler->AddEventListener(NS_LITERAL_STRING("scroll"), this, true);
   }
 
   if (aScriptLoading != DONT_LOAD_SCRIPTS && !mTriedBrowserInit) {
     mTriedBrowserInit = true;
     // Initialize the child side of the browser element machinery,
     // if appropriate.
     if (IsBrowserOrApp()) {
       RecvLoadRemoteScript(BROWSER_ELEMENT_CHILD_SCRIPT);