Bug 612018 followup - Remove the extra document check, r=mats a=cleanup
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 16 Nov 2010 15:45:15 -0500
changeset 57598 ef83567ee8d8ce284a513c640dab55e0c366c27e
parent 57597 a80edd37a40a0029896fcc9bb1b30f365c537050
child 57601 aafeff43ea2582d6d6d2a8d55a4a0c2e81d57129
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersmats, cleanup
bugs612018
milestone2.0b8pre
Bug 612018 followup - Remove the extra document check, r=mats a=cleanup
dom/base/nsFocusManager.cpp
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -1352,18 +1352,17 @@ nsFocusManager::CheckIfFocusable(nsICont
     return CheckIfFocusable(redirectedFocus, aFlags);
 
   nsCOMPtr<nsIDocument> doc = aContent->GetCurrentDoc();
   // can't focus elements that are not in documents
   if (!doc)
     return nsnull;
 
   // Make sure that our frames are up to date
-  if (doc)
-    doc->FlushPendingNotifications(Flush_Layout);
+  doc->FlushPendingNotifications(Flush_Layout);
 
   nsIPresShell *shell = doc->GetShell();
   if (!shell)
     return nsnull;
 
   // the root content can always be focused
   if (aContent == doc->GetRootElement())
     return aContent;