Bug 1303235 - Part 3: Enable test_restyle.html and remove the early return in CanIgnoreIfNotVisible. r=hiro, a=ritu
authorBoris Chiou <boris.chiou@gmail.com>
Wed, 11 Oct 2017 14:39:37 +0800
changeset 432750 921ae95a11f5bc29a129892d88e69e70264e20cf
parent 432749 167961e9d88e1c3e2a2bf442c5c3df1a76b50fee
child 432751 b1fbf45d83f42781ce189154669357b33c64cce3
push id8050
push userryanvm@gmail.com
push dateWed, 25 Oct 2017 18:39:16 +0000
treeherdermozilla-beta@921ae95a11f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro, ritu
bugs1303235
milestone57.0
Bug 1303235 - Part 3: Enable test_restyle.html and remove the early return in CanIgnoreIfNotVisible. r=hiro, a=ritu MozReview-Commit-ID: LMKSVW2sh5N
dom/animation/KeyframeEffectReadOnly.cpp
dom/animation/test/chrome/test_restyles.html
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -1811,22 +1811,16 @@ KeyframeEffectReadOnly::SetAnimation(Ani
 
 bool
 KeyframeEffectReadOnly::CanIgnoreIfNotVisible() const
 {
   if (!AnimationUtils::IsOffscreenThrottlingEnabled()) {
     return false;
   }
 
-  // FIXME (bug 1303235): We don't calculate mCumulativeChangeHint for
-  // the Servo backend yet
-  if (mDocument->IsStyledByServo()) {
-    return false;
-  }
-
   // FIXME: For further sophisticated optimization we need to check
   // change hint on the segment corresponding to computedTiming.progress.
   return NS_IsHintSubset(
     mCumulativeChangeHint, nsChangeHint_Hints_CanIgnoreIfNotVisible);
 }
 
 void
 KeyframeEffectReadOnly::MaybeUpdateFrameForCompositor()
--- a/dom/animation/test/chrome/test_restyles.html
+++ b/dom/animation/test/chrome/test_restyles.html
@@ -63,19 +63,17 @@ function ensureElementRemoval(aElement) 
 SimpleTest.expectAssertions(0, 1); // bug 1332970
 SimpleTest.waitForExplicitFinish();
 
 var omtaEnabled = isOMTAEnabled();
 
 var isAndroid = !!navigator.userAgent.includes("Android");
 var isServo = isStyledByServo();
 var offscreenThrottlingEnabled =
-  SpecialPowers.getBoolPref('dom.animations.offscreen-throttling') &&
-  !isServo; // Bug 1303235 : For stylo we don't yet accumulate change
-            // hints which are used for offscreen throttling.
+  SpecialPowers.getBoolPref('dom.animations.offscreen-throttling');
 
 function add_task_if_omta_enabled(test) {
   if (!omtaEnabled) {
     info(test.name + " is skipped because OMTA is disabled");
     return;
   }
   add_task(test);
 }