Bug 1417200: Make -moz-border-colors chrome only. r?heycam draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 28 Nov 2017 13:14:40 +0100
changeset 704649 c8f397287671617cb3c8495e88b103c5c8d4ccc1
parent 704646 c7eecc1ab214ffebc9fdab0a54e50ab1ba55c074
child 742102 38751e9dfbce1ff909e407e780fa718abc5493b5
push id91184
push userbmo:emilio@crisal.io
push dateTue, 28 Nov 2017 18:03:20 +0000
reviewersheycam
bugs1417200
milestone59.0a1
Bug 1417200: Make -moz-border-colors chrome only. r?heycam MozReview-Commit-ID: KNais1e5FnE
devtools/shared/css/generated/properties-db.js
dom/animation/test/mozilla/file_discrete-animations.html
layout/reftests/forms/progress/bar-pseudo-element-ref.html
layout/reftests/forms/progress/bar-pseudo-element-rtl-ref.html
layout/reftests/forms/progress/bar-pseudo-element-vertical-ref.html
layout/reftests/forms/progress/bar-pseudo-element-vertical-rtl-ref.html
layout/reftests/forms/progress/block-invalidate-ref.html
layout/reftests/forms/progress/in-cells-ref.html
layout/reftests/forms/progress/indeterminate-style-height-ref.html
layout/reftests/forms/progress/indeterminate-style-width-ref.html
layout/reftests/forms/progress/margin-padding-ref.html
layout/reftests/forms/progress/margin-padding-rtl-ref.html
layout/reftests/forms/progress/margin-padding-vertical-ref.html
layout/reftests/forms/progress/margin-padding-vertical-rtl-ref.html
layout/reftests/forms/progress/transformations-ref.html
layout/reftests/forms/progress/values-ref.html
layout/reftests/forms/progress/values-rtl-ref.html
layout/reftests/forms/progress/values-vertical-ref.html
layout/reftests/forms/progress/values-vertical-rtl-ref.html
layout/style/nsCSSParser.cpp
layout/style/nsCSSPropList.h
layout/style/nsCSSProps.cpp
layout/style/test/property_database.js
layout/tools/reftest/jar.mn
servo/components/style/properties/longhand/border.mako.rs
servo/components/style/properties/shorthand/border.mako.rs
widget/reftests/progressbar-fallback-default-style-ref.html
--- a/devtools/shared/css/generated/properties-db.js
+++ b/devtools/shared/css/generated/properties-db.js
@@ -345,30 +345,16 @@ exports.CSS_PROPERTIES = {
     "values": [
       "inherit",
       "initial",
       "none",
       "unset",
       "url"
     ]
   },
-  "-moz-border-bottom-colors": {
-    "isInherited": false,
-    "subproperties": [
-      "-moz-border-bottom-colors"
-    ],
-    "supports": [
-      2
-    ],
-    "values": [
-      "inherit",
-      "initial",
-      "unset"
-    ]
-  },
   "-moz-border-end": {
     "isInherited": false,
     "subproperties": [
       "border-inline-end-width",
       "border-inline-end-style",
       "border-inline-end-color"
     ],
     "supports": [
@@ -498,44 +484,16 @@ exports.CSS_PROPERTIES = {
       "repeating-radial-gradient",
       "round",
       "space",
       "stretch",
       "unset",
       "url"
     ]
   },
-  "-moz-border-left-colors": {
-    "isInherited": false,
-    "subproperties": [
-      "-moz-border-left-colors"
-    ],
-    "supports": [
-      2
-    ],
-    "values": [
-      "inherit",
-      "initial",
-      "unset"
-    ]
-  },
-  "-moz-border-right-colors": {
-    "isInherited": false,
-    "subproperties": [
-      "-moz-border-right-colors"
-    ],
-    "supports": [
-      2
-    ],
-    "values": [
-      "inherit",
-      "initial",
-      "unset"
-    ]
-  },
   "-moz-border-start": {
     "isInherited": false,
     "subproperties": [
       "border-inline-start-width",
       "border-inline-start-style",
       "border-inline-start-color"
     ],
     "supports": [
@@ -625,30 +583,16 @@ exports.CSS_PROPERTIES = {
       "inherit",
       "initial",
       "medium",
       "thick",
       "thin",
       "unset"
     ]
   },
-  "-moz-border-top-colors": {
-    "isInherited": false,
-    "subproperties": [
-      "-moz-border-top-colors"
-    ],
-    "supports": [
-      2
-    ],
-    "values": [
-      "inherit",
-      "initial",
-      "unset"
-    ]
-  },
   "-moz-box-align": {
     "isInherited": false,
     "subproperties": [
       "-moz-box-align"
     ],
     "supports": [],
     "values": [
       "baseline",
@@ -4270,20 +4214,16 @@ exports.CSS_PROPERTIES = {
       "border-top-style",
       "border-right-style",
       "border-bottom-style",
       "border-left-style",
       "border-top-color",
       "border-right-color",
       "border-bottom-color",
       "border-left-color",
-      "-moz-border-top-colors",
-      "-moz-border-right-colors",
-      "-moz-border-bottom-colors",
-      "-moz-border-left-colors",
       "border-image-source",
       "border-image-slice",
       "border-image-width",
       "border-image-outset",
       "border-image-repeat"
     ],
     "supports": [
       2,
--- a/dom/animation/test/mozilla/file_discrete-animations.html
+++ b/dom/animation/test/mozilla/file_discrete-animations.html
@@ -9,32 +9,16 @@
 "use strict";
 
 const gMozillaSpecificProperties = {
   "-moz-appearance": {
     // https://drafts.csswg.org/css-align/#propdef-align-content
     from: "button",
     to: "none"
   },
-  "-moz-border-bottom-colors": {
-    from: "rgb(255, 0, 0) rgb(255, 0, 0) rgb(255, 0, 0) rgb(255, 0, 0)",
-    to: "rgb(0, 255, 0) rgb(0, 255, 0) rgb(0, 255, 0) rgb(0, 255, 0)"
-  },
-  "-moz-border-left-colors": {
-    from: "rgb(255, 0, 0) rgb(255, 0, 0) rgb(255, 0, 0) rgb(255, 0, 0)",
-    to: "rgb(0, 255, 0) rgb(0, 255, 0) rgb(0, 255, 0) rgb(0, 255, 0)"
-  },
-  "-moz-border-right-colors": {
-    from: "rgb(255, 0, 0) rgb(255, 0, 0) rgb(255, 0, 0) rgb(255, 0, 0)",
-    to: "rgb(0, 255, 0) rgb(0, 255, 0) rgb(0, 255, 0) rgb(0, 255, 0)"
-  },
-  "-moz-border-top-colors": {
-    from: "rgb(255, 0, 0) rgb(255, 0, 0) rgb(255, 0, 0) rgb(255, 0, 0)",
-    to: "rgb(0, 255, 0) rgb(0, 255, 0) rgb(0, 255, 0) rgb(0, 255, 0)"
-  },
   "-moz-box-align": {
     // https://developer.mozilla.org/en/docs/Web/CSS/box-align
     from: "center",
     to: "stretch"
   },
   "-moz-box-direction": {
     // https://developer.mozilla.org/en/docs/Web/CSS/box-direction
     from: "reverse",
--- a/layout/reftests/forms/progress/bar-pseudo-element-ref.html
+++ b/layout/reftests/forms/progress/bar-pseudo-element-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     body > div:nth-child(1) > .progress-bar { margin: 10px; padding: 0px; }
     body > div:nth-child(2) > .progress-bar { margin: 0px; padding: 10px; }
     body > div:nth-child(3) > .progress-bar { margin: 10px; padding: 10px; }
     body > div:nth-child(4) > .progress-bar { margin: 5px; padding: 5px; }
     body > div:nth-child(5) > .progress-bar { margin: 50px; padding: 50px; }
     body > div:nth-child(6) > .progress-bar { margin: 100px; padding: 100px; }
     body > div:nth-child(7) > .progress-bar { margin: 10px 0px 0px 0px; padding: 0px; }
--- a/layout/reftests/forms/progress/bar-pseudo-element-rtl-ref.html
+++ b/layout/reftests/forms/progress/bar-pseudo-element-rtl-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     body > div:nth-child(1) > .progress-bar { margin: 0px 10px 0px 0px; padding: 0px; }
     body > div:nth-child(2) > .progress-bar { margin: 0px 0px 0px 10px; padding: 0px; }
     body > div:nth-child(3) > .progress-bar { margin: 0px; padding: 0px 10px 0px 0px; }
     body > div:nth-child(4) > .progress-bar { margin: 0px; padding: 0px 0px 0px 10px; }
     /* 15 - 18 should have 100% width, no need to specify. */
   </style>
   <body dir='rtl'>
--- a/layout/reftests/forms/progress/bar-pseudo-element-vertical-ref.html
+++ b/layout/reftests/forms/progress/bar-pseudo-element-vertical-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     .progress-element { margin: 10px; }
     body > div:nth-child(1) > .progress-bar { position: relative; top: 4px; left: 4px;
                                               height: calc(100% - 8px); }
     body > div:nth-child(2) > .progress-bar { }
     body > div:nth-child(3) > .progress-bar { position: relative; top: 4px; left: 4px;
                                               height: calc(100% - 8px); }
     body > div:nth-child(4) > .progress-bar { position: relative; top: 10px; height: calc(100% - 10px); }
--- a/layout/reftests/forms/progress/bar-pseudo-element-vertical-rtl-ref.html
+++ b/layout/reftests/forms/progress/bar-pseudo-element-vertical-rtl-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     .progress-element { margin: 10px; }
     body > div:nth-child(1) > .progress-bar { position: relative; top: 4px; left: 4px;
                                               height: calc(100% - 8px); }
     body > div:nth-child(2) > .progress-bar { }
     body > div:nth-child(3) > .progress-bar { position: relative; top: 4px; left: 4px;
                                               height: calc(100% - 8px); }
     body > div:nth-child(4) > .progress-bar { position: relative; top: 10px; height: calc(100% - 10px); }
--- a/layout/reftests/forms/progress/block-invalidate-ref.html
+++ b/layout/reftests/forms/progress/block-invalidate-ref.html
@@ -1,10 +1,10 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     progress { display: block; }
   </style>
   <body>
     <progress value='0.5'></progress>
   </body>
 </html>
--- a/layout/reftests/forms/progress/in-cells-ref.html
+++ b/layout/reftests/forms/progress/in-cells-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     progress { width: 10em; height: 1em; }
     progress.vertical { -moz-orient: vertical; width: 1em; height: 10em; }
   </style>
   <body>
     <table>
       <tr>
         <td>foo</td>
--- a/layout/reftests/forms/progress/indeterminate-style-height-ref.html
+++ b/layout/reftests/forms/progress/indeterminate-style-height-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     div.progress-element {
       height: 12em;
       width: 2em;
     }
     div.progress-bar {
       height: 100%;
     }
--- a/layout/reftests/forms/progress/indeterminate-style-width-ref.html
+++ b/layout/reftests/forms/progress/indeterminate-style-width-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     div.progress-bar {
       width:100%;
     }
     body > div:nth-child(1) > .progress-bar { width: 20px; }
     body > div:nth-child(2) > .progress-bar { width: 0px; }
     body > div:nth-child(3) > .progress-bar { width: 50%; }
     body > div:nth-child(4) > .progress-bar { width: 1em; }
--- a/layout/reftests/forms/progress/margin-padding-ref.html
+++ b/layout/reftests/forms/progress/margin-padding-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     body > div:nth-child(1) { margin: 10px; padding: 0px; }
     body > div:nth-child(2) { margin: 0px; padding: 10px; }
     body > div:nth-child(3) { margin: 10px; padding: 10px; }
     body > div:nth-child(4) { margin: 5px; padding: 5px; }
     body > div:nth-child(5) { margin: 50px; padding: 50px; }
     body > div:nth-child(6) { margin: 100px; padding: 100px; }
     body > div:nth-child(7) { margin: 10px 0px 0px 0px; padding: 0px; }
--- a/layout/reftests/forms/progress/margin-padding-rtl-ref.html
+++ b/layout/reftests/forms/progress/margin-padding-rtl-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     body > div:nth-child(1) { margin: 10px; padding: 0px; }
     body > div:nth-child(2) { margin: 0px; padding: 10px; }
     body > div:nth-child(3) { margin: 10px; padding: 10px; }
     body > div:nth-child(4) { margin: 5px; padding: 5px; }
     body > div:nth-child(5) { margin: 50px; padding: 50px; }
     body > div:nth-child(6) { margin: 100px; padding: 100px; }
     body > div:nth-child(7) { margin: 10px 0px 0px 0px; padding: 0px; }
--- a/layout/reftests/forms/progress/margin-padding-vertical-ref.html
+++ b/layout/reftests/forms/progress/margin-padding-vertical-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     body > div:nth-child(1) { margin: 10px; padding: 0px; }
     body > div:nth-child(2) { margin: 0px; padding: 10px; }
     body > div:nth-child(3) { margin: 10px; padding: 10px; }
     body > div:nth-child(4) { margin: 5px; padding: 5px; }
     body > div:nth-child(5) { margin: 50px; padding: 50px; }
     body > div:nth-child(6) { margin: 100px; padding: 100px; }
     body > div:nth-child(7) { margin: 10px 0px 0px 0px; padding: 0px; }
--- a/layout/reftests/forms/progress/margin-padding-vertical-rtl-ref.html
+++ b/layout/reftests/forms/progress/margin-padding-vertical-rtl-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     body > div:nth-child(1) { margin: 10px; padding: 0px; }
     body > div:nth-child(2) { margin: 0px; padding: 10px; }
     body > div:nth-child(3) { margin: 10px; padding: 10px; }
     body > div:nth-child(4) { margin: 5px; padding: 5px; }
     body > div:nth-child(5) { margin: 50px; padding: 50px; }
     body > div:nth-child(6) { margin: 100px; padding: 100px; }
     body > div:nth-child(7) { margin: 10px 0px 0px 0px; padding: 0px; }
--- a/layout/reftests/forms/progress/transformations-ref.html
+++ b/layout/reftests/forms/progress/transformations-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     body > div:nth-child(1) { -moz-transform: matrix(1, -0.2, 0, 1, 0, 0); }
     body > div:nth-child(2) { -moz-transform: translateX(15em) matrix(1, 0, 0.6, 1, 0, 0); }
     body > div:nth-child(3) { -moz-transform: rotate(30deg); }
     body > div:nth-child(4) { -moz-transform: scale(2, 4); }
     body > div:nth-child(5) { -moz-transform: scale(0.1, 0.4); }
     body > div:nth-child(6) { -moz-transform: scale(1, 0.4); }
     body > div:nth-child(7) { -moz-transform: scale(0.1, 1); }
--- a/layout/reftests/forms/progress/values-ref.html
+++ b/layout/reftests/forms/progress/values-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     div:nth-child(1) > .progress-bar { width: 100%; }
     div:nth-child(2) > .progress-bar { width: 0%; }
     div:nth-child(3) > .progress-bar { width: 10%; }
     div:nth-child(4) > .progress-bar { width: 50%; }
     div:nth-child(5) > .progress-bar { width: 0%; }
     div:nth-child(6) > .progress-bar { width: 100%; }
     div:nth-child(7) > .progress-bar { width: 42%; }
--- a/layout/reftests/forms/progress/values-rtl-ref.html
+++ b/layout/reftests/forms/progress/values-rtl-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     div:nth-child(1) > .progress-bar { width: 100%; }
     div:nth-child(2) > .progress-bar { width: 0%; }
     div:nth-child(3) > .progress-bar { width: 10%; }
     div:nth-child(4) > .progress-bar { width: 50%; }
     div:nth-child(5) > .progress-bar { width: 0%; }
     div:nth-child(6) > .progress-bar { width: 100%; }
     div:nth-child(7) > .progress-bar { width: 42%; }
--- a/layout/reftests/forms/progress/values-vertical-ref.html
+++ b/layout/reftests/forms/progress/values-vertical-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     div:nth-child(1) > .progress-bar { position: relative; top: 0%; height: 100%; }
     div:nth-child(2) > .progress-bar { position: relative; top: 100%; height: 0%; }
     div:nth-child(3) > .progress-bar { position: relative; top: 90%; height: 10%; }
     div:nth-child(4) > .progress-bar { position: relative; top: 50%; height: 50%; }
     div:nth-child(5) > .progress-bar { position: relative; top: 100%; height: 0%; }
     div:nth-child(6) > .progress-bar { position: relative; top: 0%; height: 100%; }
     div:nth-child(7) > .progress-bar { position: relative; top: 58%; height: 42%; }
--- a/layout/reftests/forms/progress/values-vertical-rtl-ref.html
+++ b/layout/reftests/forms/progress/values-vertical-rtl-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
-  <link rel='stylesheet' type='text/css' href='style.css'>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
     div:nth-child(1) > .progress-bar { position: relative; top: 0%; height: 100%; }
     div:nth-child(2) > .progress-bar { position: relative; top: 100%; height: 0%; }
     div:nth-child(3) > .progress-bar { position: relative; top: 90%; height: 10%; }
     div:nth-child(4) > .progress-bar { position: relative; top: 50%; height: 50%; }
     div:nth-child(5) > .progress-bar { position: relative; top: 100%; height: 0%; }
     div:nth-child(6) > .progress-bar { position: relative; top: 0%; height: 100%; }
     div:nth-child(7) > .progress-bar { position: relative; top: 58%; height: 42%; }
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -13439,23 +13439,16 @@ CSSParserImpl::ParseBorderSide(const nsC
     // Parsing "border" shorthand; set all four sides to the same thing
     for (int32_t index = 0; index < 4; index++) {
       NS_ASSERTION(numProps == 3, "This code needs updating");
       AppendValue(kBorderWidthIDs[index], values[0]);
       AppendValue(kBorderStyleIDs[index], values[1]);
       AppendValue(kBorderColorIDs[index], values[2]);
     }
 
-    static const nsCSSPropertyID kBorderColorsProps[] = {
-      eCSSProperty__moz_border_top_colors,
-      eCSSProperty__moz_border_right_colors,
-      eCSSProperty__moz_border_bottom_colors,
-      eCSSProperty__moz_border_left_colors
-    };
-
     // Set the other properties that the border shorthand sets to their
     // initial values.
     nsCSSValue extraValue;
     switch (values[0].GetUnit()) {
     case eCSSUnit_Inherit:
     case eCSSUnit_Initial:
     case eCSSUnit_Unset:
       extraValue = values[0];
@@ -13466,19 +13459,16 @@ CSSParserImpl::ParseBorderSide(const nsC
       AppendValue(eCSSProperty_border_image_outset, extraValue);
       AppendValue(eCSSProperty_border_image_repeat, extraValue);
       break;
     default:
       extraValue.SetNoneValue();
       SetBorderImageInitialValues();
       break;
     }
-    NS_FOR_CSS_SIDES(side) {
-      AppendValue(kBorderColorsProps[side], extraValue);
-    }
   }
   else {
     // Just set our one side
     for (int32_t index = 0; index < numProps; index++) {
       AppendValue(aPropIDs[index], values[index]);
     }
   }
   return true;
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -788,28 +788,32 @@ CSS_PROP_BORDER(
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED |
         CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
     "",
     VARIANT_HC,
     nullptr,
     offsetof(nsStyleBorder, mBorderBottomColor),
     eStyleAnimType_ComplexColor)
+#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
 CSS_PROP_BORDER(
     -moz-border-bottom-colors,
     _moz_border_bottom_colors,
     CSS_PROP_DOMPROP_PREFIXED(BorderBottomColors),
     CSS_PROPERTY_PARSE_FUNCTION |
+        CSS_PROPERTY_INTERNAL |
+        CSS_PROPERTY_ENABLED_IN_UA_SHEETS_AND_CHROME |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
     "",
     0,
     nullptr,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_Discrete)
+#endif
 CSS_PROP_BORDER(
     border-bottom-left-radius,
     border_bottom_left_radius,
     BorderBottomLeftRadius,
     CSS_PROPERTY_PARSE_FUNCTION |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_STORES_CALC,
@@ -1052,28 +1056,32 @@ CSS_PROP_BORDER(
         CSS_PROPERTY_HASHLESS_COLOR_QUIRK |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
     "",
     VARIANT_HC,
     nullptr,
     offsetof(nsStyleBorder, mBorderLeftColor),
     eStyleAnimType_ComplexColor)
+#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
 CSS_PROP_BORDER(
     -moz-border-left-colors,
     _moz_border_left_colors,
     CSS_PROP_DOMPROP_PREFIXED(BorderLeftColors),
     CSS_PROPERTY_PARSE_FUNCTION |
+        CSS_PROPERTY_INTERNAL |
+        CSS_PROPERTY_ENABLED_IN_UA_SHEETS_AND_CHROME |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
     "",
     0,
     nullptr,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_Discrete)
+#endif
 CSS_PROP_BORDER(
     border-left-style,
     border_left_style,
     BorderLeftStyle,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
     "",
     VARIANT_HK,
@@ -1114,28 +1122,32 @@ CSS_PROP_BORDER(
         CSS_PROPERTY_HASHLESS_COLOR_QUIRK |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
     "",
     VARIANT_HC,
     nullptr,
     offsetof(nsStyleBorder, mBorderRightColor),
     eStyleAnimType_ComplexColor)
+#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
 CSS_PROP_BORDER(
     -moz-border-right-colors,
     _moz_border_right_colors,
     CSS_PROP_DOMPROP_PREFIXED(BorderRightColors),
     CSS_PROPERTY_PARSE_FUNCTION |
+        CSS_PROPERTY_INTERNAL |
+        CSS_PROPERTY_ENABLED_IN_UA_SHEETS_AND_CHROME |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
     "",
     0,
     nullptr,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_Discrete)
+#endif
 CSS_PROP_BORDER(
     border-right-style,
     border_right_style,
     BorderRightStyle,
     CSS_PROPERTY_PARSE_VALUE |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
     "",
     VARIANT_HK,
@@ -1188,28 +1200,32 @@ CSS_PROP_BORDER(
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED |
         CSS_PROPERTY_HASHLESS_COLOR_QUIRK,
     "",
     VARIANT_HC,
     nullptr,
     offsetof(nsStyleBorder, mBorderTopColor),
     eStyleAnimType_ComplexColor)
+#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL
 CSS_PROP_BORDER(
     -moz-border-top-colors,
     _moz_border_top_colors,
     CSS_PROP_DOMPROP_PREFIXED(BorderTopColors),
     CSS_PROPERTY_PARSE_FUNCTION |
+        CSS_PROPERTY_INTERNAL |
+        CSS_PROPERTY_ENABLED_IN_UA_SHEETS_AND_CHROME |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
     "",
     0,
     nullptr,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_Discrete)
+#endif
 CSS_PROP_BORDER(
     border-top-left-radius,
     border_top_left_radius,
     BorderTopLeftRadius,
     CSS_PROPERTY_PARSE_FUNCTION |
         CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_VALUE_NONNEGATIVE |
         CSS_PROPERTY_STORES_CALC,
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -2679,20 +2679,16 @@ static const nsCSSPropertyID gBorderSubp
   eCSSProperty_border_top_style,
   eCSSProperty_border_right_style,
   eCSSProperty_border_bottom_style,
   eCSSProperty_border_left_style,
   eCSSProperty_border_top_color,
   eCSSProperty_border_right_color,
   eCSSProperty_border_bottom_color,
   eCSSProperty_border_left_color,
-  eCSSProperty__moz_border_top_colors,
-  eCSSProperty__moz_border_right_colors,
-  eCSSProperty__moz_border_bottom_colors,
-  eCSSProperty__moz_border_left_colors,
   eCSSProperty_border_image_source,
   eCSSProperty_border_image_slice,
   eCSSProperty_border_image_width,
   eCSSProperty_border_image_outset,
   eCSSProperty_border_image_repeat,
   eCSSProperty_UNKNOWN
 };
 
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -1277,25 +1277,16 @@ var gCSSProperties = {
   "-moz-binding": {
     domProp: "MozBinding",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "none" ],
     other_values: [ "url(foo.xml)" ],
     invalid_values: []
   },
-  "-moz-border-bottom-colors": {
-    domProp: "MozBorderBottomColors",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    applies_to_first_letter: true,
-    initial_values: [ "none" ],
-    other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
-    invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
-  },
   "border-inline-end": {
     domProp: "borderInlineEnd",
     inherited: false,
     type: CSS_TYPE_TRUE_SHORTHAND,
     subproperties: [ "border-inline-end-color", "border-inline-end-style", "border-inline-end-width" ],
     initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
     other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
     invalid_values: [ "5%", "5", "5 green none" ]
@@ -1430,25 +1421,16 @@ var gCSSProperties = {
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     applies_to_first_letter: true,
     initial_values: [ "stretch", "stretch stretch" ],
     other_values: [ "round", "repeat", "stretch round", "repeat round", "stretch repeat", "round round", "repeat repeat",
                     "space", "stretch space", "repeat space", "round space", "space space" ],
     invalid_values: [ "none", "stretch stretch stretch", "0", "10", "0%", "0px" ]
   },
-  "-moz-border-left-colors": {
-    domProp: "MozBorderLeftColors",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    applies_to_first_letter: true,
-    initial_values: [ "none" ],
-    other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
-    invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
-  },
   "border-radius": {
     domProp: "borderRadius",
     inherited: false,
     type: CSS_TYPE_TRUE_SHORTHAND,
     prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
     subproperties: [ "border-bottom-left-radius", "border-bottom-right-radius", "border-top-left-radius", "border-top-right-radius" ],
     initial_values: [ "0", "0px", "0px 0 0 0px", "calc(-2px)", "calc(0px) calc(0pt)", "calc(0px) calc(0pt) calc(0px) calc(0em)" ],
     other_values: [ "0%", "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular
@@ -1546,25 +1528,16 @@ var gCSSProperties = {
       "calc(3*25px) 5px",
       "5px calc(3*25px)",
       "calc(20%) calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
             ],
     invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px", "2px calc(0px + rubbish)" ]
   },
-  "-moz-border-right-colors": {
-    domProp: "MozBorderRightColors",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    applies_to_first_letter: true,
-    initial_values: [ "none" ],
-    other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
-    invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
-  },
   "border-inline-start": {
     domProp: "borderInlineStart",
     inherited: false,
     type: CSS_TYPE_TRUE_SHORTHAND,
     subproperties: [ "border-inline-start-color", "border-inline-start-style", "border-inline-start-width" ],
     initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
     other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
     invalid_values: [ "5%", "5", "5 green solid" ]
@@ -1608,25 +1581,16 @@ var gCSSProperties = {
       "calc(0px)",
       "calc(5em)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 5em)",
     ],
     invalid_values: [ "5%", "5" ]
   },
-  "-moz-border-top-colors": {
-    domProp: "MozBorderTopColors",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    applies_to_first_letter: true,
-    initial_values: [ "none" ],
-    other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
-    invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
-  },
   "-moz-box-align": {
     domProp: "MozBoxAlign",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "stretch" ],
     other_values: [ "start", "center", "baseline", "end" ],
     invalid_values: []
   },
@@ -3025,17 +2989,17 @@ var gCSSProperties = {
       "calc(-20%) calc(-50%)"
     ],
     invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto", "5 3", "10px calc(10px + rubbish)" ]
   },
   "border": {
     domProp: "border",
     inherited: false,
     type: CSS_TYPE_TRUE_SHORTHAND,
-    subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width", "border-left-color", "border-left-style", "border-left-width", "border-right-color", "border-right-style", "border-right-width", "border-top-color", "border-top-style", "border-top-width", "-moz-border-top-colors", "-moz-border-right-colors", "-moz-border-bottom-colors", "-moz-border-left-colors", "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ],
+    subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width", "border-left-color", "border-left-style", "border-left-width", "border-right-color", "border-right-style", "border-right-width", "border-top-color", "border-top-style", "border-top-width", "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ],
     initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor", "calc(4px - 1px) none" ],
     other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid", "calc(2px) solid blue" ],
     invalid_values: [ "5%", "medium solid ff00ff", "5 solid green" ]
   },
   "border-bottom": {
     domProp: "borderBottom",
     inherited: false,
     type: CSS_TYPE_TRUE_SHORTHAND,
@@ -8317,9 +8281,49 @@ if (false) {
   gCSSProperties["-moz-font-smoothing-background-color"] = {
     // domProp: "MozFontSmoothingBackgroundColor",
     inherited: true,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "transparent" ],
     other_values: [ "green", "#fc3" ],
     invalid_values: [ "000000", "ff00ff" ]
   };
+
+  gCSSProperties["-moz-border-bottom-colors"] = {
+    domProp: "MozBorderBottomColors",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    applies_to_first_letter: true,
+    initial_values: [ "none" ],
+    other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
+    invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
+  };
+
+  gCSSProperties["-moz-border-left-colors"] = {
+    domProp: "MozBorderLeftColors",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    applies_to_first_letter: true,
+    initial_values: [ "none" ],
+    other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
+    invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
+  };
+
+  gCSSProperties["-moz-border-right-colors"] = {
+    domProp: "MozBorderRightColors",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    applies_to_first_letter: true,
+    initial_values: [ "none" ],
+    other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
+    invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
+  };
+
+  gCSSProperties["-moz-border-top-colors"] = {
+    domProp: "MozBorderTopColors",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    applies_to_first_letter: true,
+    initial_values: [ "none" ],
+    other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
+    invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
+  };
 }
--- a/layout/tools/reftest/jar.mn
+++ b/layout/tools/reftest/jar.mn
@@ -1,11 +1,12 @@
 reftest.jar:
 % content reftest %content/ contentaccessible=yes
   content/globals.jsm (globals.jsm)
   content/reftest-content.js (reftest-content.js)
   content/AsyncSpellCheckTestHelper.jsm (../../../editor/AsyncSpellCheckTestHelper.jsm)
   content/httpd.jsm (../../../netwerk/test/httpserver/httpd.js)
   content/StructuredLog.jsm (../../../testing/modules/StructuredLog.jsm)
   content/input.css (../../../editor/reftests/xul/input.css)
+  content/progress.css (../../../layout/reftests/forms/progress/style.css)
 *  content/manifest.jsm (manifest.jsm)
 *  content/reftest.jsm (reftest.jsm)
   content/reftest.xul (reftest.xul)
--- a/servo/components/style/properties/longhand/border.mako.rs
+++ b/servo/components/style/properties/longhand/border.mako.rs
@@ -69,16 +69,17 @@
 
 /// -moz-border-*-colors: color, string, enum, none, inherit/initial
 /// These non-spec properties are just for Gecko (Stylo) internal use.
 % for side in PHYSICAL_SIDES:
     <%helpers:longhand name="-moz-border-${side}-colors" animation_value_type="discrete"
                        spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-border-*-colors)"
                        products="gecko"
                        flags="APPLIES_TO_FIRST_LETTER"
+                       enabled_in="chrome"
                        ignored_when_colors_disabled="True">
         use std::fmt;
         use style_traits::ToCss;
         use values::specified::RGBAColor;
 
         pub mod computed_value {
             use cssparser::RGBA;
             #[derive(Clone, Debug, MallocSizeOf, PartialEq)]
--- a/servo/components/style/properties/shorthand/border.mako.rs
+++ b/servo/components/style/properties/shorthand/border.mako.rs
@@ -126,40 +126,30 @@ pub fn parse_border<'i, 't>(context: &Pa
     </%helpers:shorthand>
 % endfor
 
 <%helpers:shorthand name="border"
     sub_properties="${' '.join('border-%s-%s' % (side, prop)
         for side in PHYSICAL_SIDES
         for prop in ['color', 'style', 'width'])}
         ${' '.join('border-image-%s' % name
-        for name in ['outset', 'repeat', 'slice', 'source', 'width'])}
-        ${' '.join('-moz-border-%s-colors' % side
-        for side in PHYSICAL_SIDES) if product == 'gecko' else ''}"
+        for name in ['outset', 'repeat', 'slice', 'source', 'width'])}"
     spec="https://drafts.csswg.org/css-backgrounds/#border">
 
-    % if product == "gecko":
-        use properties::longhands::{_moz_border_top_colors, _moz_border_right_colors,
-                                    _moz_border_bottom_colors, _moz_border_left_colors};
-    % endif
-
     pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                -> Result<Longhands, ParseError<'i>> {
         use properties::longhands::{border_image_outset, border_image_repeat, border_image_slice};
         use properties::longhands::{border_image_source, border_image_width};
 
         let (color, style, width) = super::parse_border(context, input)?;
         Ok(expanded! {
             % for side in PHYSICAL_SIDES:
                 border_${side}_color: color.clone(),
                 border_${side}_style: style,
                 border_${side}_width: width.clone(),
-                % if product == "gecko":
-                    _moz_border_${side}_colors: _moz_border_${side}_colors::get_initial_specified_value(),
-                % endif
             % endfor
 
             // The ‘border’ shorthand resets ‘border-image’ to its initial value.
             // See https://drafts.csswg.org/css-backgrounds-3/#the-border-shorthands
             % for name in "outset repeat slice source width".split():
                 border_image_${name}: border_image_${name}::get_initial_specified_value(),
             % endfor
         })
--- a/widget/reftests/progressbar-fallback-default-style-ref.html
+++ b/widget/reftests/progressbar-fallback-default-style-ref.html
@@ -1,45 +1,12 @@
 <!DOCTYPE html>
 <html>
+  <link rel='stylesheet' href='chrome://reftest/content/progress.css'>
   <style>
-    div.progress-element {
-      /**
-       * The purpose of this test is to not show the native style.
-       * -moz-appearance: progressbar;
-       */
-      display: inline-block;
-      height: 1em;
-      width: 10em;
-      vertical-align: -0.2em;
-
-      /* Default style in case of there is -moz-appearance: none; */
-      border: 2px solid;
-      -moz-border-top-colors: ThreeDShadow #e6e6e6;
-      -moz-border-right-colors: ThreeDHighlight #e6e6e6;
-      -moz-border-bottom-colors: ThreeDHighlight #e6e6e6;
-      -moz-border-left-colors: ThreeDShadow #e6e6e6;
-      background-color: #e6e6e6;
-    }
-
-    div.progress-bar {
-      /**
-       * The purpose of this test is to not show the native style.
-       * -moz-appearance: progresschunk;
-       */
-
-      height: 100%;
-      width: 100%;
-
-      box-sizing: border-box;
-
-      /* Default style in case of there is -moz-appearance: none; */
-      background-color: #0064b4;
-    }
-
     div.progress-element { padding: 5px; }
     body > div:nth-child(1)  { -moz-appearance: none; }
     body > div:nth-child(2) > .progress-bar { -moz-appearance: none; }
     body > div:nth-child(3)  { background-color: red; }
     body > div:nth-child(4) > .progress-bar { background-color: red; }
     body > div:nth-child(5)  { border: 2px solid red; }
     body > div:nth-child(6) > .progress-bar { border: 5px solid red; }
   </style>