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 110345 ad6c79681a21a8984f831197719aa4c7150cda13
parent 110344 dfbaea0d50d1e032f9d879d0d03f6998087683b1
child 110346 6ea044d85c1e3ef0dddcc636890536ff7801cd43
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewerssmaug
bugs800817
milestone19.0a1
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());
             }
           }
         }