Bug 1369140 - Part 1: Revert to only flushing styles when checking whether an element is focusable; r=bzbarsky
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 31 May 2017 17:45:09 -0400
changeset 361853 d44994c678733c604990ecaca9dadbc9693c6625
parent 361803 9255719d469c99b4c11cacf6541c66e353518f24
child 361854 87c1327b918d380df584858e28c23d7340c65994
push id31946
push userryanvm@gmail.com
push dateThu, 01 Jun 2017 20:43:38 +0000
treeherdermozilla-central@b138d2f271fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1369140, 612018
milestone55.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 1369140 - Part 1: Revert to only flushing styles when checking whether an element is focusable; r=bzbarsky Bug 612018 made us flush layout for caret painting which isn't triggered from anything that can call this code any mode, therefore we can revert the change from that bug.
dom/base/nsFocusManager.cpp
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -1564,17 +1564,17 @@ nsFocusManager::CheckIfFocusable(nsICont
   // can't focus elements that are not in documents
   if (!doc) {
     LOGCONTENT("Cannot focus %s because content not in document", aContent)
     return nullptr;
   }
 
   // Make sure that our frames are up to date
   mEventHandlingNeedsFlush = false;
-  doc->FlushPendingNotifications(FlushType::Layout);
+  doc->FlushPendingNotifications(FlushType::Frames);
 
   nsIPresShell *shell = doc->GetShell();
   if (!shell)
     return nullptr;
 
   // the root content can always be focused,
   // except in userfocusignored context.
   if (aContent == doc->GetRootElement())