diff options
author | yami <34216515+kn-yami@users.noreply.github.com> | 2018-12-16 16:17:20 +0100 |
---|---|---|
committer | yami <34216515+kn-yami@users.noreply.github.com> | 2019-02-02 18:06:10 +0100 |
commit | b241a84d884293e1ce49a79c75e362c02c0899f9 (patch) | |
tree | 4d1df04790cc8c785141e8dd8ffea9e6da5a0c02 /layout/style/nsStyleConsts.h | |
parent | fa311a4cae5ea526e848adc4f49c6aa0b700702c (diff) | |
download | UXP-b241a84d884293e1ce49a79c75e362c02c0899f9.tar UXP-b241a84d884293e1ce49a79c75e362c02c0899f9.tar.gz UXP-b241a84d884293e1ce49a79c75e362c02c0899f9.tar.lz UXP-b241a84d884293e1ce49a79c75e362c02c0899f9.tar.xz UXP-b241a84d884293e1ce49a79c75e362c02c0899f9.zip |
issue #908 - implement missing parts of CSS mask
Diffstat (limited to 'layout/style/nsStyleConsts.h')
-rw-r--r-- | layout/style/nsStyleConsts.h | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h index be588113e..6d207aec9 100644 --- a/layout/style/nsStyleConsts.h +++ b/layout/style/nsStyleConsts.h @@ -134,16 +134,35 @@ enum class StyleClear : uint8_t { Max = 13 // Max = (Both | Line) }; -// clip-path geometry box -enum class StyleClipPathGeometryBox : uint8_t { - NoBox, +// Define geometry box for clip-path's reference-box, background-clip, +// background-origin, mask-clip and mask-origin. +enum class StyleGeometryBox : uint8_t { Content, Padding, Border, - Margin, - Fill, - Stroke, - View, + Margin, // XXX Bug 1260094 comment 9. + // Although margin-box is required by mask-origin and mask-clip, we + // do not implement that due to lack of support in other browsers. + // clip-path reference-box only. + Fill, // mask-clip, mask-origin and clip-path reference-box only. + Stroke, // mask-clip, mask-origin and clip-path reference-box only. + View, // mask-clip, mask-origin and clip-path reference-box only. + NoClip, // mask-clip only. + Text, // background-clip only. + NoBox, // Depending on which kind of element this style value applied on, + // the default value of a reference-box can be different. + // For an HTML element, the default value of reference-box is + // border-box; for an SVG element, the default value is fill-box. + // Since we can not determine the default value at parsing time, + // set it as NoBox so that we make a decision later. + // clip-path reference-box only. + MozAlmostPadding = 127 // 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 StyleGeometryBox::Padding because using that + // causes antialiasing seams between the background + // and border. + // background-clip only. }; // fill-rule @@ -359,14 +378,6 @@ enum class FillMode : uint32_t; #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_* -#define NS_STYLE_IMAGELAYER_CLIP_BORDER 0 -#define NS_STYLE_IMAGELAYER_CLIP_PADDING 1 -#define NS_STYLE_IMAGELAYER_CLIP_CONTENT 2 -// One extra constant which does not exist in IMAGELAYER_ORIGIN_* -#define NS_STYLE_IMAGELAYER_CLIP_TEXT 3 - // 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 @@ -375,12 +386,6 @@ enum class FillMode : uint32_t; #define NS_STYLE_IMAGELAYER_CLIP_MOZ_ALMOST_PADDING 127 // See nsStyleImageLayers -// Code depends on these constants having the same values as BG_CLIP_* -#define NS_STYLE_IMAGELAYER_ORIGIN_BORDER 0 -#define NS_STYLE_IMAGELAYER_ORIGIN_PADDING 1 -#define NS_STYLE_IMAGELAYER_ORIGIN_CONTENT 2 - -// 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) |