Bug 1504618 - Remove a bunch of unused style consts. r=jwatt
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 05 Nov 2018 09:19:25 +0000
changeset 444391 a5cc88a8a6c3c551755268944937702f2b8318ae
parent 444390 7285bb78cbcf1e4521a3f0c27ea5275b4061b184
child 444392 6884ba750aa3c76c3e9979c5da8c2caa12e761f1
push id109582
push usercsabou@mozilla.com
push dateMon, 05 Nov 2018 16:21:20 +0000
treeherdermozilla-inbound@4115e3cf7ad0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1504618
milestone65.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 1504618 - Remove a bunch of unused style consts. r=jwatt Differential Revision: https://phabricator.services.mozilla.com/D10871
layout/style/nsStyleConsts.h
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -277,71 +277,44 @@ enum class StyleOrient : uint8_t {
 
 // See AnimationEffect.webidl
 // and mozilla/dom/AnimationEffectBinding.h
 namespace dom {
 enum class PlaybackDirection : uint8_t;
 enum class FillMode : uint8_t;
 }
 
-// See nsStyleDisplay
-#define NS_STYLE_ANIMATION_ITERATION_COUNT_INFINITE 0
-
 // Animation play state
 enum class StyleAnimationPlayState : uint8_t {
     Running,
     Paused
 };
 
 // See nsStyleImageLayers
 enum class StyleImageLayerAttachment : uint8_t {
     Scroll,
     Fixed,
     Local
 };
 
-// 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
-// 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)
-
 // See nsStyleImageLayers
 enum class StyleImageLayerRepeat : uint8_t {
   NoRepeat = 0x00,
   RepeatX,
   RepeatY,
   Repeat,
   Space,
   Round
 };
 
-// See nsStyleImageLayers
-#define NS_STYLE_IMAGELAYER_SIZE_CONTAIN             0
-#define NS_STYLE_IMAGELAYER_SIZE_COVER               1
-
 // Mask mode
 #define NS_STYLE_MASK_MODE_ALPHA                0
 #define NS_STYLE_MASK_MODE_LUMINANCE            1
 #define NS_STYLE_MASK_MODE_MATCH_SOURCE         2
 
-// See nsStyleBackground
-#define NS_STYLE_BG_INLINE_POLICY_EACH_BOX      0
-#define NS_STYLE_BG_INLINE_POLICY_CONTINUOUS    1
-#define NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX  2
-
 // See nsStyleTable
 #define NS_STYLE_BORDER_COLLAPSE                0
 #define NS_STYLE_BORDER_SEPARATE                1
 
 // Possible enumerated specified values of border-*-width, used by nsCSSMargin
 #define NS_STYLE_BORDER_WIDTH_THIN              0
 #define NS_STYLE_BORDER_WIDTH_MEDIUM            1
 #define NS_STYLE_BORDER_WIDTH_THICK             2
@@ -521,79 +494,43 @@ enum class StyleContent : uint8_t {
 #define NS_STYLE_FLEX_WRAP_WRAP                 1
 #define NS_STYLE_FLEX_WRAP_WRAP_REVERSE         2
 
 // See nsStylePosition
 // NOTE: This is the initial value of the integer-valued 'order' property
 // (rather than an internal numerical representation of some keyword).
 #define NS_STYLE_ORDER_INITIAL                  0
 
-// XXX remove in a later patch after updating flexbox code with the new names
-#define NS_STYLE_JUSTIFY_CONTENT_FLEX_START     NS_STYLE_JUSTIFY_FLEX_START
-#define NS_STYLE_JUSTIFY_CONTENT_FLEX_END       NS_STYLE_JUSTIFY_FLEX_END
-#define NS_STYLE_JUSTIFY_CONTENT_CENTER         NS_STYLE_JUSTIFY_CENTER
-#define NS_STYLE_JUSTIFY_CONTENT_SPACE_BETWEEN  NS_STYLE_JUSTIFY_SPACE_BETWEEN
-#define NS_STYLE_JUSTIFY_CONTENT_SPACE_AROUND   NS_STYLE_JUSTIFY_SPACE_AROUND
-
 // See nsStyleFilter
 #define NS_STYLE_FILTER_NONE                    0
 #define NS_STYLE_FILTER_URL                     1
 #define NS_STYLE_FILTER_BLUR                    2
 #define NS_STYLE_FILTER_BRIGHTNESS              3
 #define NS_STYLE_FILTER_CONTRAST                4
 #define NS_STYLE_FILTER_GRAYSCALE               5
 #define NS_STYLE_FILTER_INVERT                  6
 #define NS_STYLE_FILTER_OPACITY                 7
 #define NS_STYLE_FILTER_SATURATE                8
 #define NS_STYLE_FILTER_SEPIA                   9
 #define NS_STYLE_FILTER_HUE_ROTATE              10
 #define NS_STYLE_FILTER_DROP_SHADOW             11
 
 // See nsStyleFont
-// We should eventually stop using the NS_STYLE_* variants here.
-#define NS_STYLE_FONT_STYLE_NORMAL              NS_FONT_STYLE_NORMAL
-#define NS_STYLE_FONT_STYLE_ITALIC              NS_FONT_STYLE_ITALIC
-#define NS_STYLE_FONT_STYLE_OBLIQUE             NS_FONT_STYLE_OBLIQUE
-
-// See nsStyleFont
-// The constants below appear only in style sheets and not computed style.
-#define NS_STYLE_FONT_WEIGHT_BOLDER             (-1)
-#define NS_STYLE_FONT_WEIGHT_LIGHTER            (-2)
-
-// See nsStyleFont
 #define NS_STYLE_FONT_SIZE_XXSMALL              0
 #define NS_STYLE_FONT_SIZE_XSMALL               1
 #define NS_STYLE_FONT_SIZE_SMALL                2
 #define NS_STYLE_FONT_SIZE_MEDIUM               3
 #define NS_STYLE_FONT_SIZE_LARGE                4
 #define NS_STYLE_FONT_SIZE_XLARGE               5
 #define NS_STYLE_FONT_SIZE_XXLARGE              6
 #define NS_STYLE_FONT_SIZE_XXXLARGE             7  // Only used by <font size="7">. Not specifiable in CSS.
 #define NS_STYLE_FONT_SIZE_LARGER               8
 #define NS_STYLE_FONT_SIZE_SMALLER              9
 #define NS_STYLE_FONT_SIZE_NO_KEYWORD          10 // Used by Servo to track the "no keyword" case
 
-// See nsStyleFont - system fonts
-#define NS_STYLE_FONT_CAPTION                   1   // css2
-#define NS_STYLE_FONT_ICON                      2
-#define NS_STYLE_FONT_MENU                      3
-#define NS_STYLE_FONT_MESSAGE_BOX               4
-#define NS_STYLE_FONT_SMALL_CAPTION             5
-#define NS_STYLE_FONT_STATUS_BAR                6
-#define NS_STYLE_FONT_WINDOW                    7   // css3
-#define NS_STYLE_FONT_DOCUMENT                  8
-#define NS_STYLE_FONT_WORKSPACE                 9
-#define NS_STYLE_FONT_DESKTOP                   10
-#define NS_STYLE_FONT_INFO                      11
-#define NS_STYLE_FONT_DIALOG                    12
-#define NS_STYLE_FONT_BUTTON                    13
-#define NS_STYLE_FONT_PULL_DOWN_MENU            14
-#define NS_STYLE_FONT_LIST                      15
-#define NS_STYLE_FONT_FIELD                     16
-
 // grid-auto-flow keywords
 #define NS_STYLE_GRID_AUTO_FLOW_ROW             (1 << 0)
 #define NS_STYLE_GRID_AUTO_FLOW_COLUMN          (1 << 1)
 #define NS_STYLE_GRID_AUTO_FLOW_DENSE           (1 << 2)
 
 // 'subgrid' keyword in grid-template-{columns,rows}
 #define NS_STYLE_GRID_TEMPLATE_SUBGRID          0
 
@@ -716,19 +653,16 @@ enum class StyleGridTrackBreadth : uint8
 #define NS_STYLE_LIST_STYLE_UPPER_ROMAN           101
 #define NS_STYLE_LIST_STYLE_LOWER_ALPHA           102
 #define NS_STYLE_LIST_STYLE_UPPER_ALPHA           103
 
 // See nsStyleList
 #define NS_STYLE_LIST_STYLE_POSITION_INSIDE     0
 #define NS_STYLE_LIST_STYLE_POSITION_OUTSIDE    1
 
-// See nsStyleMargin
-#define NS_STYLE_MARGIN_SIZE_AUTO               0
-
 // See nsStyleVisibility
 #define NS_STYLE_POINTER_EVENTS_NONE            0
 #define NS_STYLE_POINTER_EVENTS_VISIBLEPAINTED  1
 #define NS_STYLE_POINTER_EVENTS_VISIBLEFILL     2
 #define NS_STYLE_POINTER_EVENTS_VISIBLESTROKE   3
 #define NS_STYLE_POINTER_EVENTS_VISIBLE         4
 #define NS_STYLE_POINTER_EVENTS_PAINTED         5
 #define NS_STYLE_POINTER_EVENTS_FILL            6