Bug 1426653 - Stop calling SchedulePaint uselessly when bumping the APZ focus sequence number. r=rhunt
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 09 Jan 2018 14:02:42 -0500
changeset 452745 516bfb7086809b896dcabcc14be2a3b4c56cd33d
parent 452744 7b813845b721a97bb5e2743912635c149f26039c
child 452746 ac7f70f6635ab948e746b41d2c812a500858a191
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhunt
bugs1426653
milestone59.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 1426653 - Stop calling SchedulePaint uselessly when bumping the APZ focus sequence number. r=rhunt MozReview-Commit-ID: Hq8QXLjDWL
layout/base/PresShell.cpp
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -6900,22 +6900,20 @@ PresShell::HandleEvent(nsIFrame* aFrame,
       type = SourceEventType::Key;
     }
     taskTracerEvent.emplace(type);
   }
 #endif
 
   NS_ASSERTION(aFrame, "aFrame should be not null");
 
-  // Update the latest focus sequence number with this new sequence number
+  // Update the latest focus sequence number with this new sequence number;
+  // the next transasction that gets sent to the compositor will carry this over
   if (mAPZFocusSequenceNumber < aEvent->mFocusSequenceNumber) {
     mAPZFocusSequenceNumber = aEvent->mFocusSequenceNumber;
-
-    // Schedule an empty transaction to transmit this focus update
-    aFrame->SchedulePaint(nsIFrame::PAINT_COMPOSITE_ONLY, false);
   }
 
   if (mIsDestroying ||
       (sDisableNonTestMouseEvents && !aEvent->mFlags.mIsSynthesizedForTests &&
        aEvent->HasMouseEventMessage())) {
     return NS_OK;
   }