Bug 1068802 - Clear the callback transform when the scroll update acknowledgement reaches the content side. r=botond
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 19 Sep 2014 09:33:53 -0400
changeset 206233 60a55c2a755157647450e923543c34f610d6a570
parent 206232 4df302f6b71995dd1a9010dc1bfecf1639e6f810
child 206234 2d94eebed4edeffedd549c98a8f38ec5bf6b6bef
push id27516
push userryanvm@gmail.com
push dateFri, 19 Sep 2014 17:54:48 +0000
treeherdermozilla-central@b00bdb144e06 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1068802
milestone35.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 1068802 - Clear the callback transform when the scroll update acknowledgement reaches the content side. r=botond
gfx/layers/apz/util/APZCCallbackHelper.cpp
--- a/gfx/layers/apz/util/APZCCallbackHelper.cpp
+++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp
@@ -287,16 +287,25 @@ public:
     NS_IMETHOD Run() {
         MOZ_ASSERT(NS_IsMainThread());
 
         nsIScrollableFrame* sf = nsLayoutUtils::FindScrollableFrameFor(mScrollId);
         if (sf) {
             sf->ResetScrollInfoIfGeneration(mScrollGeneration);
         }
 
+        // Since the APZ and content are in sync, we need to clear any callback transform
+        // that might have been set on the last repaint request (which might have failed
+        // due to the inflight scroll update that this message is acknowledging).
+        nsCOMPtr<nsIContent> content = nsLayoutUtils::FindContentFor(mScrollId);
+        if (content) {
+            content->SetProperty(nsGkAtoms::apzCallbackTransform, new CSSPoint(),
+                                 nsINode::DeleteProperty<CSSPoint>);
+        }
+
         return NS_OK;
     }
 
 protected:
     ViewID mScrollId;
     uint32_t mScrollGeneration;
 };