Bug 1303623 - Part1. Style const changes. r=heycam draft
authorEthan Lin <ethlin@mozilla.com>
Wed, 19 Oct 2016 15:45:05 +0800
changeset 445785 ed1478d2413a9e2492dc431193285b5872ae5406
parent 445717 a69583d2dbc6fdc18f63761a89cf539c356668be
child 445786 890d7deb7eeec8db6837dd605ab059b4696f5e62
push id37609
push userbmo:cku@mozilla.com
push dateWed, 30 Nov 2016 08:03:11 +0000
reviewersheycam
bugs1303623
milestone53.0a1
Bug 1303623 - Part1. Style const changes. r=heycam MozReview-Commit-ID: 7QfVXegiiqc
layout/style/nsCSSKeywordList.h
layout/style/nsStyleConsts.h
--- a/layout/style/nsCSSKeywordList.h
+++ b/layout/style/nsCSSKeywordList.h
@@ -399,16 +399,17 @@ CSS_KEY(mm, mm)
 CSS_KEY(monospace, monospace)
 CSS_KEY(move, move)
 CSS_KEY(ms, ms)
 CSS_KEY(multiply, multiply)
 CSS_KEY(n-resize, n_resize)
 CSS_KEY(narrower, narrower)
 CSS_KEY(ne-resize, ne_resize)
 CSS_KEY(nesw-resize, nesw_resize)
+CSS_KEY(no-clip, no_clip)
 CSS_KEY(no-close-quote, no_close_quote)
 CSS_KEY(no-common-ligatures, no_common_ligatures)
 CSS_KEY(no-contextual, no_contextual)
 CSS_KEY(no-discretionary-ligatures, no_discretionary_ligatures)
 CSS_KEY(no-drag, no_drag)
 CSS_KEY(no-drop, no_drop)
 CSS_KEY(no-historical-ligatures, no_historical_ligatures)
 CSS_KEY(no-open-quote, no_open_quote)
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -326,34 +326,45 @@ enum class FillMode : uint32_t;
 
 // See nsStyleImageLayers
 #define NS_STYLE_IMAGELAYER_ATTACHMENT_SCROLL        0
 #define NS_STYLE_IMAGELAYER_ATTACHMENT_FIXED         1
 #define NS_STYLE_IMAGELAYER_ATTACHMENT_LOCAL         2
 
 // See nsStyleImageLayers
 // Code depends on these constants having the same values as IMAGELAYER_ORIGIN_*
+// The *CLIP_FILL, *CLIP_STROKE, *CLIP_VIEW, *CLIP_NO_CLIP are only
+// supported by mask-clip, not background-clip.
 #define NS_STYLE_IMAGELAYER_CLIP_BORDER              0
 #define NS_STYLE_IMAGELAYER_CLIP_PADDING             1
 #define NS_STYLE_IMAGELAYER_CLIP_CONTENT             2
+#define NS_STYLE_IMAGELAYER_CLIP_FILL                3
+#define NS_STYLE_IMAGELAYER_CLIP_STROKE              4
+#define NS_STYLE_IMAGELAYER_CLIP_VIEW                5
+#define NS_STYLE_IMAGELAYER_CLIP_NO_CLIP             6
 // One extra constant which does not exist in IMAGELAYER_ORIGIN_*
-#define NS_STYLE_IMAGELAYER_CLIP_TEXT                3
+#define NS_STYLE_IMAGELAYER_CLIP_TEXT                7
 
 // A magic value that we use for our "pretend that background-clip is
 // 'padding' when we have a solid border" optimization.  This isn't
 // actually equal to NS_STYLE_IMAGELAYER_CLIP_PADDING because using that
 // causes antialiasing seams between the background and border.  This
 // is a backend-only value.
 #define NS_STYLE_IMAGELAYER_CLIP_MOZ_ALMOST_PADDING  127
 
 // See nsStyleImageLayers
 // Code depends on these constants having the same values as BG_CLIP_*
+// The *ORIGIN_FILL, *ORIGIN_STROKE, *ORIGIN_VIEW are only
+// supported by mask-clip, not background-clip.
 #define NS_STYLE_IMAGELAYER_ORIGIN_BORDER            0
 #define NS_STYLE_IMAGELAYER_ORIGIN_PADDING           1
 #define NS_STYLE_IMAGELAYER_ORIGIN_CONTENT           2
+#define NS_STYLE_IMAGELAYER_ORIGIN_FILL              3
+#define NS_STYLE_IMAGELAYER_ORIGIN_STROKE            4
+#define NS_STYLE_IMAGELAYER_ORIGIN_VIEW              5
 
 // See nsStyleImageLayers
 // The parser code depends on |ing these values together.
 #define NS_STYLE_IMAGELAYER_POSITION_CENTER          (1<<0)
 #define NS_STYLE_IMAGELAYER_POSITION_TOP             (1<<1)
 #define NS_STYLE_IMAGELAYER_POSITION_BOTTOM          (1<<2)
 #define NS_STYLE_IMAGELAYER_POSITION_LEFT            (1<<3)
 #define NS_STYLE_IMAGELAYER_POSITION_RIGHT           (1<<4)