Bug 800817: Use the "real" top when deciding whether to switch focus on a preventDefault()ed tap. r=smaug
authorChris Jones <jones.chris.g@gmail.com>
Sat, 13 Oct 2012 18:43:24 -0700
changeset 118148 ad6c79681a21a8984f831197719aa4c7150cda13
parent 118147 dfbaea0d50d1e032f9d879d0d03f6998087683b1
child 118149 6ea044d85c1e3ef0dddcc636890536ff7801cd43
push id1997
push userakeybl@mozilla.com
push dateMon, 07 Jan 2013 21:25:26 +0000
treeherdermozilla-beta@4baf45cdcf21 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs800817
milestone19.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 800817: Use the "real" top when deciding whether to switch focus on a preventDefault()ed tap. r=smaug
content/events/src/nsEventStateManager.cpp
--- a/content/events/src/nsEventStateManager.cpp
+++ b/content/events/src/nsEventStateManager.cpp
@@ -3257,18 +3257,18 @@ nsEventStateManager::PostHandleEvent(nsP
         if (mDocument && fm) {
           nsCOMPtr<nsIDOMWindow> currentWindow;
           fm->GetFocusedWindow(getter_AddRefs(currentWindow));
           if (currentWindow && mDocument->GetWindow() &&
               currentWindow != mDocument->GetWindow() &&
               !nsContentUtils::IsChromeDoc(mDocument)) {
             nsCOMPtr<nsIDOMWindow> currentTop;
             nsCOMPtr<nsIDOMWindow> newTop;
-            currentWindow->GetScriptableTop(getter_AddRefs(currentTop));
-            mDocument->GetWindow()->GetScriptableTop(getter_AddRefs(newTop));
+            currentWindow->GetTop(getter_AddRefs(currentTop));
+            mDocument->GetWindow()->GetTop(getter_AddRefs(newTop));
             nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(currentWindow);
             nsCOMPtr<nsIDocument> currentDoc = do_QueryInterface(win->GetExtantDocument());
             if (nsContentUtils::IsChromeDoc(currentDoc) ||
                 (currentTop && newTop && currentTop != newTop)) {
               fm->SetFocusedWindow(mDocument->GetWindow());
             }
           }
         }