Bug 720531 - Part 1. Implement space of border-image-repeat CSS property. r=dbaron
authorEthan Lin <ethlin@mozilla.com>
Tue, 12 Jul 2016 21:50:00 +0200
changeset 346705 9760f28f2343f558032fc073607d18588a2f9187
parent 346704 2544cbe88839da4d80aee7d1df8cf1f923000a9e
child 346706 d2b5441aa9fe80d6e74d8f64d87960073c3a0adc
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs720531
milestone50.0a1
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
Bug 720531 - Part 1. Implement space of border-image-repeat CSS property. r=dbaron
layout/style/nsCSSProps.cpp
layout/style/nsStyleConsts.h
layout/style/test/property_database.js
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -999,16 +999,17 @@ const KTableEntry nsCSSProps::kBorderCol
   { eCSSKeyword__moz_use_text_color, NS_STYLE_COLOR_MOZ_USE_TEXT_COLOR },
   { eCSSKeyword_UNKNOWN, -1 }
 };
 
 const KTableEntry nsCSSProps::kBorderImageRepeatKTable[] = {
   { eCSSKeyword_stretch, NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH },
   { eCSSKeyword_repeat, NS_STYLE_BORDER_IMAGE_REPEAT_REPEAT },
   { eCSSKeyword_round, NS_STYLE_BORDER_IMAGE_REPEAT_ROUND },
+  { eCSSKeyword_space, NS_STYLE_BORDER_IMAGE_REPEAT_SPACE },
   { eCSSKeyword_UNKNOWN, -1 }
 };
 
 const KTableEntry nsCSSProps::kBorderImageSliceKTable[] = {
   { eCSSKeyword_fill, NS_STYLE_BORDER_IMAGE_SLICE_FILL },
   { eCSSKeyword_UNKNOWN, -1 }
 };
 
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -357,16 +357,17 @@ enum class FillMode : uint32_t;
 #define NS_STYLE_BORDER_STYLE_OUTSET            8
 #define NS_STYLE_BORDER_STYLE_HIDDEN            9
 #define NS_STYLE_BORDER_STYLE_AUTO              10 // for outline-style only
 
 // See nsStyleBorder mBorderImage
 #define NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH    0
 #define NS_STYLE_BORDER_IMAGE_REPEAT_REPEAT     1
 #define NS_STYLE_BORDER_IMAGE_REPEAT_ROUND      2
+#define NS_STYLE_BORDER_IMAGE_REPEAT_SPACE      3
 
 #define NS_STYLE_BORDER_IMAGE_SLICE_NOFILL      0
 #define NS_STYLE_BORDER_IMAGE_SLICE_FILL        1
 
 // See nsStyleDisplay
 #define NS_STYLE_CLEAR_NONE                     0
 #define NS_STYLE_CLEAR_LEFT                     1
 #define NS_STYLE_CLEAR_RIGHT                    2
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -1058,16 +1058,17 @@ var gCSSProperties = {
     other_values: [ "url('border.png') 27 27 27 27",
             "url('border.png') 27",
             "stretch url('border.png')",
             "url('border.png') 27 fill",
             "url('border.png') 27 27 27 27 repeat",
             "repeat url('border.png') 27 27 27 27",
             "url('border.png') repeat 27 27 27 27",
             "url('border.png') fill 27 27 27 27 repeat",
+            "url('border.png') fill 27 27 27 27 repeat space",
             "url('border.png') 27 27 27 27 / 1em",
             "27 27 27 27 / 1em url('border.png') ",
             "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat",
             "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')",
             "url('border.png') 27 27 27 27 / / 10 10 1em",
             "fill 27 27 27 27 / / 10 10 1em url('border.png')",
             "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat",
             "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ],
@@ -1125,17 +1126,18 @@ var gCSSProperties = {
     invalid_values: [ "-10", "-10px", "-10%", "10%", "10 10 10 10 10", "10px calc(nonsense)", "1px red" ],
     unbalanced_values: [ "10px calc(" ]
   },
   "border-image-repeat": {
     domProp: "borderImageRepeat",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "stretch", "stretch stretch" ],
-    other_values: [ "round", "repeat", "stretch round", "repeat round", "stretch repeat", "round round", "repeat repeat" ],
+    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,
     initial_values: [ "none" ],
     other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],