Bug 1275604 - Ensure that we schedule a paint if the touch-action property changes. r=tnikkel
authorKartikaya Gupta <kgupta@mozilla.com>
Wed, 01 Jun 2016 13:13:14 -0400
changeset 340994 fb962918980932c9a48d03c50fe0c10bd4aec955
parent 340993 ece66ce5876bcdb00e7d5309fcc4b848390c9739
child 340995 606a0907dec2120b487a0da9ba1536b932ca3a05
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs1275604
milestone49.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 1275604 - Ensure that we schedule a paint if the touch-action property changes. r=tnikkel MozReview-Commit-ID: Jy10Qa2JpSE
layout/style/nsStyleStruct.cpp
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -3062,16 +3062,22 @@ nsChangeHint nsStyleDisplay::CalcDiffere
                                NS_STYLE_WILL_CHANGE_OPACITY)) {
     hint |= nsChangeHint_RepaintFrame;
   }
 
   if (willChangeBitsChanged & NS_STYLE_WILL_CHANGE_FIXPOS_CB) {
     hint |= nsChangeHint_UpdateContainingBlock;
   }
 
+  // If touch-action is changed, we need to regenerate the event regions on
+  // the layers and send it over to the compositor for APZ to handle.
+  if (mTouchAction != aOther.mTouchAction) {
+    hint |= nsChangeHint_RepaintFrame;
+  }
+
   // Note:  Our current behavior for handling changes to the
   // transition-duration, transition-delay, and transition-timing-function
   // properties is to do nothing.  In other words, the transition
   // property that matters is what it is when the transition begins, and
   // we don't stop a transition later because the transition property
   // changed.
   // We do handle changes to transition-property, but we don't need to
   // bother with anything here, since the transition manager is notified