Bug 1267251 - Change message IDs for animation warnings. r?birtles,pbro draft
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Thu, 19 May 2016 13:06:27 +0900
changeset 369275 c5330f041de0ad6d13e79a9d5552aa74088fb389
parent 369022 c67dc1f9fab86d4f2cf3224307809c44fe3ce820
child 521540 930fb73c18ab0ae9b73457bf0c79e888b54b6f23
push id18825
push userhiikezoe@mozilla-japan.org
push dateSat, 21 May 2016 08:29:17 +0000
reviewersbirtles, pbro
bugs1267251
milestone49.0a1
Bug 1267251 - Change message IDs for animation warnings. r?birtles,pbro MozReview-Commit-ID: Fb93m5xt1Ey
devtools/client/animationinspector/test/browser_animation_animated_properties_displayed.js
dom/animation/AnimationPerformanceWarning.cpp
dom/animation/test/chrome/test_animation_performance_warning.html
dom/locales/en-US/chrome/layout/layout_errors.properties
--- a/devtools/client/animationinspector/test/browser_animation_animated_properties_displayed.js
+++ b/devtools/client/animationinspector/test/browser_animation_animated_properties_displayed.js
@@ -72,15 +72,16 @@ function hasExpectedProperties(container
   }
 
   return true;
 }
 
 function hasExpectedWarnings(containerEl) {
   let warnings = [...containerEl.querySelectorAll(".warning")];
   for (let warning of warnings) {
-    if (warning.getAttribute("title") ==
-         L10N.getStr("AnimationWarningTransformWithGeometricProperties")) {
+    let warningID =
+      "CompositorAnimationWarningTransformWithGeometricProperties";
+    if (warning.getAttribute("title") == L10N.getStr(warningID)) {
       return true;
     }
   }
   return false;
 }
--- a/dom/animation/AnimationPerformanceWarning.cpp
+++ b/dom/animation/AnimationPerformanceWarning.cpp
@@ -33,42 +33,42 @@ AnimationPerformanceWarning::ToLocalized
   const char* key = nullptr;
 
   switch (mType) {
     case Type::ContentTooSmall:
       MOZ_ASSERT(mParams && mParams->Length() == 2,
                  "Parameter's length should be 2 for ContentTooSmall");
 
       return NS_SUCCEEDED(
-        ToLocalizedStringWithIntParams<2>("AnimationWarningContentTooSmall",
-                                          aLocalizedString));
+        ToLocalizedStringWithIntParams<2>(
+          "CompositorAnimationWarningContentTooSmall", aLocalizedString));
     case Type::ContentTooLarge:
       MOZ_ASSERT(mParams && mParams->Length() == 7,
                  "Parameter's length should be 7 for ContentTooLarge");
 
       return NS_SUCCEEDED(
-        ToLocalizedStringWithIntParams<7>("AnimationWarningContentTooLarge",
-                                          aLocalizedString));
+        ToLocalizedStringWithIntParams<7>(
+          "CompositorAnimationWarningContentTooLarge", aLocalizedString));
     case Type::TransformBackfaceVisibilityHidden:
-      key = "AnimationWarningTransformBackfaceVisibilityHidden";
+      key = "CompositorAnimationWarningTransformBackfaceVisibilityHidden";
       break;
     case Type::TransformPreserve3D:
-      key = "AnimationWarningTransformPreserve3D";
+      key = "CompositorAnimationWarningTransformPreserve3D";
       break;
     case Type::TransformSVG:
-      key = "AnimationWarningTransformSVG";
+      key = "CompositorAnimationWarningTransformSVG";
       break;
     case Type::TransformWithGeometricProperties:
-      key = "AnimationWarningTransformWithGeometricProperties";
+      key = "CompositorAnimationWarningTransformWithGeometricProperties";
       break;
     case Type::TransformFrameInactive:
-      key = "AnimationWarningTransformFrameInactive";
+      key = "CompositorAnimationWarningTransformFrameInactive";
       break;
     case Type::OpacityFrameInactive:
-      key = "AnimationWarningOpacityFrameInactive";
+      key = "CompositorAnimationWarningOpacityFrameInactive";
       break;
   }
 
   nsresult rv =
     nsContentUtils::GetLocalizedString(nsContentUtils::eLAYOUT_PROPERTIES,
                                        key, aLocalizedString);
   return NS_SUCCEEDED(rv);
 }
--- a/dom/animation/test/chrome/test_animation_performance_warning.html
+++ b/dom/animation/test/chrome/test_animation_performance_warning.html
@@ -192,17 +192,17 @@ var gAnimationWithGeometricKeyframeTests
       withGeometric: [
         {
           property: 'width',
           runningOnCompositor: false
         },
         {
           property: 'transform',
           runningOnCompositor: false,
-          warning: 'AnimationWarningTransformWithGeometricProperties'
+          warning: 'CompositorAnimationWarningTransformWithGeometricProperties'
         }
       ]
     }
   },
   {
     desc: 'opacity and transform',
     frames: {
       opacity: [0, 1],
@@ -226,17 +226,17 @@ var gAnimationWithGeometricKeyframeTests
         },
         {
           property: 'opacity',
           runningOnCompositor: true
         },
         {
           property: 'transform',
           runningOnCompositor: false,
-          warning: 'AnimationWarningTransformWithGeometricProperties'
+          warning: 'CompositorAnimationWarningTransformWithGeometricProperties'
         }
       ]
     }
   },
 ];
 
 var gPerformanceWarningTests = [
   {
@@ -244,31 +244,31 @@ var gPerformanceWarningTests = [
     frames: {
       transform: ['translate(0px)', 'translate(100px)']
     },
     style: 'transform-style: preserve-3d',
     expected: [
       {
         property: 'transform',
         runningOnCompositor: false,
-        warning: 'AnimationWarningTransformPreserve3D'
+        warning: 'CompositorAnimationWarningTransformPreserve3D'
       }
     ]
   },
   {
     desc: 'transform with backface-visibility:hidden',
     frames: {
       transform: ['translate(0px)', 'translate(100px)']
     },
     style: 'backface-visibility: hidden;',
     expected: [
       {
         property: 'transform',
         runningOnCompositor: false,
-        warning: 'AnimationWarningTransformBackfaceVisibilityHidden'
+        warning: 'CompositorAnimationWarningTransformBackfaceVisibilityHidden'
       }
     ]
   },
   {
     desc: 'opacity and transform with preserve-3d',
     frames: {
       opacity: [0, 1],
       transform: ['translate(0px)', 'translate(100px)']
@@ -277,17 +277,17 @@ var gPerformanceWarningTests = [
     expected: [
       {
         property: 'opacity',
         runningOnCompositor: true
       },
       {
         property: 'transform',
         runningOnCompositor: false,
-        warning: 'AnimationWarningTransformPreserve3D'
+        warning: 'CompositorAnimationWarningTransformPreserve3D'
       }
     ]
   },
   {
     desc: 'opacity and transform with backface-visibility:hidden',
     frames: {
       opacity: [0, 1],
       transform: ['translate(0px)', 'translate(100px)']
@@ -296,17 +296,17 @@ var gPerformanceWarningTests = [
     expected: [
       {
         property: 'opacity',
         runningOnCompositor: true
       },
       {
         property: 'transform',
         runningOnCompositor: false,
-        warning: 'AnimationWarningTransformBackfaceVisibilityHidden'
+        warning: 'CompositorAnimationWarningTransformBackfaceVisibilityHidden'
       }
     ]
   },
 ];
 
 var gMultipleAsyncAnimationsTests = [
   {
     desc: 'opacity and transform with preserve-3d',
@@ -315,17 +315,17 @@ var gMultipleAsyncAnimationsTests = [
       {
         frames: {
           transform: ['translate(0px)', 'translate(100px)']
         },
         expected: [
           {
             property: 'transform',
             runningOnCompositor: false,
-            warning: 'AnimationWarningTransformPreserve3D'
+            warning: 'CompositorAnimationWarningTransformPreserve3D'
           }
         ]
       },
       {
         frames: {
           opacity: [0, 1]
         },
         expected: [
@@ -344,17 +344,17 @@ var gMultipleAsyncAnimationsTests = [
       {
         frames: {
           transform: ['translate(0px)', 'translate(100px)']
         },
         expected: [
           {
             property: 'transform',
             runningOnCompositor: false,
-            warning: 'AnimationWarningTransformBackfaceVisibilityHidden'
+            warning: 'CompositorAnimationWarningTransformBackfaceVisibilityHidden'
           }
         ]
       },
       {
         frames: {
           opacity: [0, 1]
         },
         expected: [
@@ -386,17 +386,17 @@ var gMultipleAsyncAnimationsWithGeometri
               property: 'transform',
               runningOnCompositor: true
             }
           ],
           withGeometric: [
             {
               property: 'transform',
               runningOnCompositor: false,
-              warning: 'AnimationWarningTransformWithGeometricProperties'
+              warning: 'CompositorAnimationWarningTransformWithGeometricProperties'
             }
           ]
         }
       },
       {
         frames: {
           opacity: [0, 1]
         },
@@ -457,17 +457,17 @@ var gMultipleAsyncAnimationsWithGeometri
           withGeometric: [
             {
               property: 'width',
               runningOnCompositor: false,
             },
             {
               property: 'transform',
               runningOnCompositor: false,
-              warning: 'AnimationWarningTransformWithGeometricProperties'
+              warning: 'CompositorAnimationWarningTransformWithGeometricProperties'
             }
           ]
         }
       }
     ]
   },
 ];
 
@@ -480,17 +480,17 @@ var gMultipleAsyncAnimationsWithGeometri
       {
         frames: {
           transform: ['translate(0px)', 'translate(100px)']
         },
         expected: [
           {
             property: 'transform',
             runningOnCompositor: false,
-            warning: 'AnimationWarningTransformWithGeometricProperties'
+            warning: 'CompositorAnimationWarningTransformWithGeometricProperties'
           }
         ]
       },
     ]
   },
   {
     desc: 'opacity',
     animations: [
@@ -513,17 +513,17 @@ var gMultipleAsyncAnimationsWithGeometri
       {
         frames: {
           transform: ['translate(0px)', 'translate(100px)']
         },
         expected: [
           {
             property: 'transform',
             runningOnCompositor: false,
-            warning: 'AnimationWarningTransformWithGeometricProperties'
+            warning: 'CompositorAnimationWarningTransformWithGeometricProperties'
           }
         ]
       },
       {
         frames: {
           opacity: [0, 1]
         },
         expected: [
@@ -869,17 +869,17 @@ function start() {
       svg.setAttribute('transform', 'translate(10, 20)');
       return waitForFrame();
     }).then(function() {
       assert_animation_property_state_equals(
         animation.effect.getProperties(),
         [ {
           property: 'transform',
           runningOnCompositor: false,
-          warning: 'AnimationWarningTransformSVG'
+          warning: 'CompositorAnimationWarningTransformSVG'
         } ]);
       svg.removeAttribute('transform');
       return waitForFrame();
     }).then(function() {
       assert_animation_property_state_equals(
         animation.effect.getProperties(),
         [ { property: 'transform', runningOnCompositor: true } ]);
     });
--- a/dom/locales/en-US/chrome/layout/layout_errors.properties
+++ b/dom/locales/en-US/chrome/layout/layout_errors.properties
@@ -6,32 +6,32 @@ 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(AnimationWarningContentTooSmall):
+## LOCALIZATION NOTE(CompositorAnimationWarningContentTooSmall):
 ## (%1$S, %2$S) is a pair of integer values of the frame size
-AnimationWarningContentTooSmall=Animation cannot be run on the compositor because frame size (%1$S, %2$S) is smaller than (16, 16)
-## LOCALIZATION NOTE(AnimationWarningContentTooLarge):
+CompositorAnimationWarningContentTooSmall=Animation cannot be run on the compositor because frame size (%1$S, %2$S) is smaller than (16, 16)
+## LOCALIZATION NOTE(CompositorAnimationWarningContentTooLarge):
 ## (%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 the viewport size
 ## (%5$S, %6$S) is a pair of integer values of the visual rectangle size
 ## (%7$S) is an integer value
-AnimationWarningContentTooLarge=Animation cannot be run on the compositor because the frame size (%1$S, %2$S) is bigger than the viewport (%3$S, %4$S) or the visual rectangle (%5$S, %6$S) is larger than the maximum allowed value (%7$S)
-## LOCALIZATION NOTE(AnimationWarningTransformBackfaceVisibilityHidde):
+CompositorAnimationWarningContentTooLarge=Animation cannot be run on the compositor because the frame size (%1$S, %2$S) is bigger than the viewport (%3$S, %4$S) or the visual rectangle (%5$S, %6$S) is larger than the maximum allowed value (%7$S)
+## LOCALIZATION NOTE(CompositorAnimationWarningTransformBackfaceVisibilityHidden):
 ## 'backface-visibility: hidden' is a CSS property, don't translate it.
-AnimationWarningTransformBackfaceVisibilityHidden=Animations of ‘backface-visibility: hidden’ transforms cannot be run on the compositor
-## LOCALIZATION NOTE(AnimationWarningTransformPreserve3D):
+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.
-AnimationWarningTransformPreserve3D=Animations of ‘transform-style: preserve-3d’ transforms cannot be run on the compositor
-## LOCALIZATION NOTE(AnimationWarningTransformSVG,
-##                   AnimationWarningTransformWithGeometricProperties,
-##                   AnimationWarningTransformFrameInactive,
-##                   AnimationWarningOpacityFrameInactive):
+CompositorAnimationWarningTransformPreserve3D=Animations of ‘transform-style: preserve-3d’ transforms cannot be run on the compositor
+## LOCALIZATION NOTE(CompositorAnimationWarningTransformSVG,
+##                   CompositorAnimationWarningTransformWithGeometricProperties,
+##                   CompositorAnimationWarningTransformFrameInactive,
+##                   CompositorAnimationWarningOpacityFrameInactive):
 ## 'transform' and 'opacity' mean CSS property names, don't translate it.
-AnimationWarningTransformSVG=Animations of ‘transform’ on elements with SVG transforms cannot be run on the compositor
-AnimationWarningTransformWithGeometricProperties=Animations of ‘transform’ cannot be run on the compositor when geometric properties are animated on the same element at the same time
-AnimationWarningTransformFrameInactive=Animation cannot be run on the compositor because the frame was not marked active for ‘transform’ animation
-AnimationWarningOpacityFrameInactive=Animation cannot be run on the compositor because the frame was not marked active for ‘opacity’ animation
+CompositorAnimationWarningTransformSVG=Animations of ‘transform’ on elements with SVG transforms cannot be run on the compositor
+CompositorAnimationWarningTransformWithGeometricProperties=Animations of ‘transform’ cannot be run on the compositor when geometric properties are animated on the same element at the same time
+CompositorAnimationWarningTransformFrameInactive=Animation cannot be run on the compositor because the frame was not marked active for ‘transform’ animation
+CompositorAnimationWarningOpacityFrameInactive=Animation cannot be run on the compositor because the frame was not marked active for ‘opacity’ animation