Bug 1426653 - Stop calling SchedulePaint uselessly when bumping the APZ focus sequence number. r?rhunt draft
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 09 Jan 2018 14:02:42 -0500
changeset 717870 62c47597c28ea28368978cf286265d1a67b01277
parent 717738 6f5fac320fcb6625603fa8a744ffa8523f8b3d71
child 745372 46a58123734aef8db1018ca86f981e68bc165ccf
push id94805
push userkgupta@mozilla.com
push dateTue, 09 Jan 2018 19:04:37 +0000
reviewersrhunt
bugs1426653
milestone59.0a1
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;
   }