Bug 1308963 - Part 2. Correct initial value of mask-repeat in property_database.js. r=xidorn
authorcku <cku@mozilla.com>
Thu, 13 Oct 2016 23:04:55 +0800
changeset 319785 7ecb34e2ed3a6219e8a7ea3d6ed762c18a73e0b9
parent 319784 82ea0e89d1930790ff88f7f9de180e11e86efb09
child 319786 ac12c1e5bea7821b4017316f2c79ce7bc8fc6ceb
push id20748
push userphilringnalda@gmail.com
push dateFri, 28 Oct 2016 03:39:55 +0000
treeherderfx-team@715360440695 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1308963
milestone52.0a1
Bug 1308963 - Part 2. Correct initial value of mask-repeat in property_database.js. r=xidorn MozReview-Commit-ID: KJOZppT48xS
layout/reftests/w3c-css/submitted/masking/mask-repeat-1-ref.html
layout/style/test/property_database.js
layout/style/test/test_computed_style.html
--- a/layout/reftests/w3c-css/submitted/masking/mask-repeat-1-ref.html
+++ b/layout/reftests/w3c-css/submitted/masking/mask-repeat-1-ref.html
@@ -29,19 +29,17 @@
 
       #repeat-y {
         position: absolute;
         width: 50px; height: 100%;
       }
     </style>
   </head>
   <body>
-    <div class="outer">
-      <div class="color" id="default"></div>
-    </div>
+    <div class="outer color"></div>
     <div class="outer">
       <div class="color" id="default"></div>
     </div>
     <div class="outer color"></div>
     <div class="outer">
       <div class="color" id="repeat-x"></div>
     </div>
     <div class="outer">
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -7016,54 +7016,54 @@ function SupportsMaskShorthand() {
 
 if (SupportsMaskShorthand()) {
   gCSSProperties["mask"] = {
     domProp: "mask",
     inherited: false,
     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
     /* FIXME: All mask-border-* should be added when we implement them. */
     subproperties: ["mask-clip", "mask-image", "mask-mode", "mask-origin", "mask-position-x", "mask-position-y", "mask-repeat", "mask-size" , "mask-composite"],
-    initial_values: [ "match-source", "none", "no-repeat", "add", "50% 50%", "center center", "50% 50% / auto", "center / auto", "center center / auto", "50% 50% / auto auto",
+    initial_values: [ "match-source", "none", "repeat", "add", "50% 50%", "center center", "50% 50% / auto", "center / auto", "center center / auto", "50% 50% / auto auto",
       "center none", "center center none", "none center", "none center center", "none 50% 50%", "center / auto none",
       "center center / auto auto none",
-      "match-source none no-repeat add center center", "center center no-repeat none add", "none no-repeat add center center / auto", "center center / auto no-repeat none add match-source", "none no-repeat add 50% 50% / auto auto match-source",
+      "match-source none repeat add center center", "center center repeat none add", "none repeat add center center / auto", "center center / auto repeat none add match-source", "none repeat add 50% 50% / auto auto match-source",
       "border-box", "border-box border-box" ],
     other_values: [
-      "none alpha no-repeat add center",
+      "none alpha repeat add center",
       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
       "no-repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') alpha center add",
       "repeat-x",
       "repeat-y",
-      "repeat",
+      "no-repeat",
       "none repeat-y alpha add 50% 50%",
       "subtract",
-      "50% center subtract alpha no-repeat none",
+      "50% center subtract alpha repeat none",
       "top",
       "left",
       "0% 0%",
       "top left",
       "center / 100px",
       "center / contain",
       "center / cover",
       "10px / 10%",
       "10em / calc(20px)",
       "center center / 100px 100px",
       "center center / 100px auto",
       "center center / 100px 10%",
       "center center / 100px calc(20px)",
-      "bottom right add none alpha no-repeat",
+      "bottom right add none alpha repeat",
       "0% alpha",
       "alpha 0%",
       "0%",
       "url(#mymask)",
-      "-moz-radial-gradient(10% bottom, #ffffff, black) add repeat",
-      "-moz-linear-gradient(10px 10px -45deg, red, blue) no-repeat",
-      "-moz-linear-gradient(10px 10px -0.125turn, red, blue) no-repeat",
-      "-moz-repeating-radial-gradient(10% bottom, #ffffff, black) add repeat",
-      "-moz-repeating-linear-gradient(10px 10px -45deg, red, blue) no-repeat",
+      "-moz-radial-gradient(10% bottom, #ffffff, black) add no-repeat",
+      "-moz-linear-gradient(10px 10px -45deg, red, blue) repeat",
+      "-moz-linear-gradient(10px 10px -0.125turn, red, blue) repeat",
+      "-moz-repeating-radial-gradient(10% bottom, #ffffff, black) add no-repeat",
+      "-moz-repeating-linear-gradient(10px 10px -45deg, red, blue) repeat",
       "-moz-element(#test) alpha",
       /* multiple mask-image */
       "url(404.png), url(404.png)",
       "repeat-x, subtract, none",
       "50% top url(404.png), url(404.png) 50% top",
       "subtract repeat-y top left url(404.png), repeat-x alpha",
       "url(404.png), -moz-linear-gradient(20px 20px -45deg, blue, green), -moz-element(#a) alpha",
       "top left / contain, bottom right / cover",
@@ -7074,20 +7074,20 @@ if (SupportsMaskShorthand()) {
       "url(404.png) alpha padding-box padding-box",
       "url(404.png) alpha padding-box border-box",
       "content-box border-box url(404.png)",
     ],
     invalid_values: [
       /* mixes with keywords have to be in correct order */
       "50% left", "top 50%",
       /* no quirks mode colors */
-      "-moz-radial-gradient(10% bottom, ffffff, black) add repeat",
+      "-moz-radial-gradient(10% bottom, ffffff, black) add no-repeat",
       /* no quirks mode lengths */
-      "-moz-linear-gradient(10 10px -45deg, red, blue) no-repeat",
-      "-moz-linear-gradient(10px 10 -45deg, red, blue) no-repeat",
+      "-moz-linear-gradient(10 10px -45deg, red, blue) repeat",
+      "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat",
       "linear-gradient(red -99, yellow, green, blue 120%)",
       /* bug 258080: don't accept background-position separated */
       "left url(404.png) top", "top url(404.png) left",
       "alpha padding-box url(404.png) border-box",
       "alpha padding-box url(404.png) padding-box",
       "-moz-element(#a rubbish)",
       "left top / match-source"
     ]
@@ -7238,25 +7238,26 @@ if (SupportsMaskShorthand()) {
                       "right 20px", "left 10%", "right 3em",
                       "left", "right", "left, left", "left, right", "right, left", "left, 0%", "left, left, left, left, left",
                       "calc(0px + rubbish)", "center 0%"],
   };
   gCSSProperties["mask-repeat"] = {
     domProp: "maskRepeat",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
-    initial_values: [ "no-repeat", "no-repeat no-repeat" ],
-    other_values: [ "repeat-x", "repeat-y", "repeat",
+    initial_values: [ "repeat", "repeat repeat" ],
+    other_values: [ "repeat-x", "repeat-y", "no-repeat",
       "repeat-x, repeat-x",
-      "no-repeat, repeat",
-      "repeat-y, repeat, repeat-y",
-      "no-repeat, no-repeat, no-repeat",
+      "repeat, no-repeat",
+      "repeat-y, no-repeat, repeat-y",
+      "repeat, repeat, repeat",
+      "repeat no-repeat",
       "no-repeat repeat",
+      "no-repeat no-repeat",
       "repeat no-repeat",
-      "repeat repeat",
       "no-repeat no-repeat, no-repeat no-repeat",
     ],
     invalid_values: [ "repeat repeat repeat",
                       "repeat-x repeat-y",
                       "repeat repeat-x",
                       "repeat repeat-y",
                       "repeat-x repeat",
                       "repeat-y repeat" ]
--- a/layout/style/test/test_computed_style.html
+++ b/layout/style/test/test_computed_style.html
@@ -277,19 +277,19 @@ var noframe_container = document.getElem
     "mask-mode": [
       "alpha", "luminance"
     ],
     // any mask-position value other then "50%" "50% 50%" "center"
     // "center center".
     "mask-position": [
       "left", "right", "top", "bottom", "0%", "100%"
     ],
-    // any mask-repeat value other then "no-repeat" "no-repeat no-repeat".
+    // any mask-repeat value other then "repeat" "repeat repeat".
     "mask-repeat": [
-      "repeat-x", "repeat-y", "repeat", "space", "round"
+      "repeat-x", "repeat-y", "no-repeat", "space", "round"
     ],
     // any mask-size value other then "auto" "auto auto".
     "mask-size": [
       "10px", "100%", "cover", "contain", "auto 5px"
     ],
   };
 
   // "masks" object contains initial mask longhand values.
@@ -308,17 +308,17 @@ var noframe_container = document.getElem
     ],
     "mask-mode": [
       "match-source"
     ],
     "mask-position": [
       "50%", "50% 50%", "center"
     ],
     "mask-repeat": [
-      "no-repeat", "no-repeat no-repeat"
+      "repeat", "repeat repeat"
     ],
     "mask-size": [
       "auto", "auto auto"
     ],
   };
 
   var p = document.createElement("p");
   var cs = getComputedStyle(p, "");