Backed out changeset f8c14563b37d (bug 1364221) for m(c1) failures in test_animation_performance_warning.html a=backout
authorWes Kocher <wkocher@mozilla.com>
Fri, 19 May 2017 14:01:47 -0700
changeset 359391 1c743eebadc7735278911075c12d213d69b1de7a
parent 359390 ffeddbfe999a2d144070fca1246e3289c7380321
child 359392 c6b8df631a64cf20992cd221ae99ceb5ca4a84df
push id31854
push userarchaeopteryx@coole-files.de
push dateSat, 20 May 2017 16:46:00 +0000
treeherdermozilla-central@51736db67723 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1364221
milestone55.0a1
backs outf8c14563b37d26afff2db80daff5ee36474440bb
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
Backed out changeset f8c14563b37d (bug 1364221) for m(c1) failures in test_animation_performance_warning.html a=backout MozReview-Commit-ID: 9vwi69eAZ5r
dom/animation/AnimationPerformanceWarning.cpp
dom/animation/AnimationPerformanceWarning.h
dom/locales/en-US/chrome/layout/layout_errors.properties
layout/painting/nsDisplayList.cpp
--- a/dom/animation/AnimationPerformanceWarning.cpp
+++ b/dom/animation/AnimationPerformanceWarning.cpp
@@ -30,28 +30,21 @@ bool
 AnimationPerformanceWarning::ToLocalizedString(
   nsXPIDLString& aLocalizedString) const
 {
   const char* key = nullptr;
 
   switch (mType) {
     case Type::ContentTooLarge:
       MOZ_ASSERT(mParams && mParams->Length() == 6,
-                 "Parameter's length should be 6 for ContentTooLargeDimensions");
+                 "Parameter's length should be 6 for ContentTooLarge");
 
       return NS_SUCCEEDED(
         ToLocalizedStringWithIntParams<7>(
-          "CompositorAnimationWarningContentTooLargeDimensions", aLocalizedString));
-    case Type::ContentTooLargeArea:
-      MOZ_ASSERT(mParams && mParams->Length() == 2,
-                 "Parameter's length should be 2 for ContentTooLargeArea");
-
-      return NS_SUCCEEDED(
-        ToLocalizedStringWithIntParams<3>(
-          "CompositorAnimationWarningContentTooLargeArea", aLocalizedString));
+          "CompositorAnimationWarningContentTooLarge2", aLocalizedString));
     case Type::TransformBackfaceVisibilityHidden:
       key = "CompositorAnimationWarningTransformBackfaceVisibilityHidden";
       break;
     case Type::TransformPreserve3D:
       key = "CompositorAnimationWarningTransformPreserve3D";
       break;
     case Type::TransformSVG:
       key = "CompositorAnimationWarningTransformSVG";
--- a/dom/animation/AnimationPerformanceWarning.h
+++ b/dom/animation/AnimationPerformanceWarning.h
@@ -16,17 +16,16 @@ class nsXPIDLString;
 
 namespace mozilla {
 
 // Represents the reason why we can't run the CSS property on the compositor.
 struct AnimationPerformanceWarning
 {
   enum class Type : uint8_t {
     ContentTooLarge,
-    ContentTooLargeArea,
     TransformBackfaceVisibilityHidden,
     TransformPreserve3D,
     TransformSVG,
     TransformWithGeometricProperties,
     TransformWithSyncGeometricAnimations,
     TransformFrameInactive,
     OpacityFrameInactive,
     HasRenderingObserver,
--- a/dom/locales/en-US/chrome/layout/layout_errors.properties
+++ b/dom/locales/en-US/chrome/layout/layout_errors.properties
@@ -6,25 +6,21 @@ ImageMapRectBoundsError=The “coords” attribute of the <area shape="rect"> tag is not in the “left,top,right,bottom” format.
 ImageMapCircleWrongNumberOfCoords=The “coords” attribute of the <area shape="circle"> tag is not in the “center-x,center-y,radius” format.
 ImageMapCircleNegativeRadius=The “coords” attribute of the <area shape="circle"> tag has a negative radius.
 ImageMapPolyWrongNumberOfCoords=The “coords” attribute of the <area shape="poly"> tag is not in the “x1,y1,x2,y2 …” format.
 ImageMapPolyOddNumberOfCoords=The “coords” attribute of the <area shape="poly"> tag is missing the last “y” coordinate (the correct format is “x1,y1,x2,y2 …”).
 
 TablePartRelPosWarning=Relative positioning of table rows and row groups is now supported. This site may need to be updated because it may depend on this feature having no effect.
 ScrollLinkedEffectFound2=This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://developer.mozilla.org/docs/Mozilla/Performance/ScrollLinkedEffects for further details and to join the discussion on related tools and features!
 
-## LOCALIZATION NOTE(CompositorAnimationWarningContentTooLargeArea):
-## %1$S is an integer value of the area of the frame size
-## %2$S is an integer value of the area of a limit based on the viewport size
-CompositorAnimationWarningContentTooLargeArea=Animation cannot be run on the compositor because the area of the frame size (%1$S) is too large relative to the viewport (larger than %2$S)
-## LOCALIZATION NOTE(CompositorAnimationWarningContentTooLargeDimensions):
+## LOCALIZATION NOTE(CompositorAnimationWarningContentTooLarge2):
 ## (%1$S, %2$S) is a pair of integer values of the frame size
 ## (%3$S, %4$S) is a pair of integer values of a limit based on the viewport size
 ## (%5$S, %6$S) is a pair of integer values of an absolute limit
-CompositorAnimationWarningContentTooLargeDimensions=Animation cannot be run on the compositor because the frame size (%1$S, %2$S) is too large relative to the viewport (larger than (%3$S, %4$S)) or larger than the maximum allowed value (%5$S, %6$S)
+CompositorAnimationWarningContentTooLarge2=Animation cannot be run on the compositor because the frame size (%1$S, %2$S) is too large relative to the viewport (larger than (%3$S, %4$S)) or larger than the maximum allowed value (%5$S, %6$S)
 ## LOCALIZATION NOTE(CompositorAnimationWarningTransformBackfaceVisibilityHidden):
 ## 'backface-visibility: hidden' is a CSS property, don't translate it.
 CompositorAnimationWarningTransformBackfaceVisibilityHidden=Animations of ‘backface-visibility: hidden’ transforms cannot be run on the compositor
 ## LOCALIZATION NOTE(CompositorAnimationWarningTransformPreserve3D):
 ## 'transform-style: preserve-3d' is a CSS property, don't translate it.
 CompositorAnimationWarningTransformPreserve3D=Animations of ‘transform-style: preserve-3d’ transforms cannot be run on the compositor
 ## LOCALIZATION NOTE(CompositorAnimationWarningTransformSVG,
 ##                   CompositorAnimationWarningTransformWithGeometricProperties,
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -7377,52 +7377,38 @@ nsDisplayTransform::ShouldPrerenderTrans
   // reference frame size (~viewport), and less than an absolute limit.
   // Both the ratio and the absolute limit are configurable.
   nsSize relativeLimit(nscoord(refSize.width * viewportRatioX),
                        nscoord(refSize.height * viewportRatioY));
   nsSize absoluteLimit(aFrame->PresContext()->DevPixelsToAppUnits(absoluteLimitX),
                        aFrame->PresContext()->DevPixelsToAppUnits(absoluteLimitY));
   nsSize maxSize = Min(relativeLimit, absoluteLimit);
   gfxSize scale = nsLayoutUtils::GetTransformToAncestorScale(aFrame);
-  nsSize frameSize(overflow.Size().width * scale.width,
-                   overflow.Size().height * scale.height);
-  uint64_t maxLimitArea = uint64_t(maxSize.width) * maxSize.height;
-  uint64_t frameArea = uint64_t(frameSize.width) * frameSize.height;
-  if (frameArea <= maxLimitArea && frameSize <= absoluteLimit) {
+  nsSize frameSize = nsSize(overflow.Size().width * scale.width,
+                            overflow.Size().height * scale.height);
+  if (frameSize <= maxSize) {
     *aDirtyRect = overflow;
     return FullPrerender;
   } else if (gfxPrefs::PartiallyPrerenderAnimatedContent()) {
     *aDirtyRect = nsLayoutUtils::ComputePartialPrerenderArea(*aDirtyRect, overflow, maxSize);
     return PartialPrerender;
   }
 
-  if (frameArea > maxLimitArea) {
-    EffectCompositor::SetPerformanceWarning(
-      aFrame, eCSSProperty_transform,
-      AnimationPerformanceWarning(
-        AnimationPerformanceWarning::Type::ContentTooLargeArea,
-        {
-          nsPresContext::AppUnitsToIntCSSPixels(frameArea),
-          nsPresContext::AppUnitsToIntCSSPixels(maxLimitArea),
-        }));
-  } else {
-    EffectCompositor::SetPerformanceWarning(
-      aFrame, eCSSProperty_transform,
-      AnimationPerformanceWarning(
-        AnimationPerformanceWarning::Type::ContentTooLarge,
-        {
-          nsPresContext::AppUnitsToIntCSSPixels(frameSize.width),
-          nsPresContext::AppUnitsToIntCSSPixels(frameSize.height),
-          nsPresContext::AppUnitsToIntCSSPixels(relativeLimit.width),
-          nsPresContext::AppUnitsToIntCSSPixels(relativeLimit.height),
-          nsPresContext::AppUnitsToIntCSSPixels(absoluteLimit.width),
-          nsPresContext::AppUnitsToIntCSSPixels(absoluteLimit.height),
-        }));
-  }
-
+  EffectCompositor::SetPerformanceWarning(
+    aFrame, eCSSProperty_transform,
+    AnimationPerformanceWarning(
+      AnimationPerformanceWarning::Type::ContentTooLarge,
+      {
+        nsPresContext::AppUnitsToIntCSSPixels(frameSize.width),
+        nsPresContext::AppUnitsToIntCSSPixels(frameSize.height),
+        nsPresContext::AppUnitsToIntCSSPixels(relativeLimit.width),
+        nsPresContext::AppUnitsToIntCSSPixels(relativeLimit.height),
+        nsPresContext::AppUnitsToIntCSSPixels(absoluteLimit.width),
+        nsPresContext::AppUnitsToIntCSSPixels(absoluteLimit.height),
+      }));
   return NoPrerender;
 }
 
 /* If the matrix is singular, or a hidden backface is shown, the frame won't be visible or hit. */
 static bool IsFrameVisible(nsIFrame* aFrame, const Matrix4x4& aMatrix)
 {
   if (aMatrix.IsSingular()) {
     return false;