blob: 57155d55bf78ea876326f636451a8d910b3747e6 [file] [log] [blame]
// This file specifies all the CSS properties we support and the necessary
// information for our code generation. The various supported arguments
// are described below with example usage
// - alias_for=other-property
// Properties specifying alias_for do not get their own enum and instead map
// directly onto the CSSPropertyID they alias. Currently this means that the
// UseCounter will not pick up on these (crbug.com/304855)
// - runtime_flag=CSSGridLayout
// The flag on RuntimeEnabledFeatures conditionally enables the property
// - longhands=property;other-property
// The property is a shorthand for several other properties.
// Flags which go into CSSPropertyMetadata:
// - animatable
// The animatable flag indicates whether a property can be animated by CSS
// animations and transitions. If this flag is set, the property should also be
// added to the switch statements in AnimatedStyleBuilder, CSSPropertyEquality,
// and CSSAnimatableValueFactory.
// - inherited
// The property will inherit by default if no value is specified, typically
// mentioned in specifications as "Inherited: yes"
// The remaining arguments are used for the StyleBuilder and allow us to
// succinctly describe how to apply properties. When default handlers are not
// sufficient, we should prefer to use converter, and failing that define
// custom property handlers in StyleBuilderCustom.cpp. We only should use
// StyleBuilderFunctions.cpp.tmpl to define handlers when there are multiple
// properties requiring the same handling, but converter doesn't suffice.
// - font
// The default property handlers call into the FontBuilder instead of setting
// values directly onto the RenderStyle
// - name_for_methods=BlendMode
// Tweaks how we choose defaults for getter, setter, initial and type_name.
// For example, setting this to BlendMode will make us use a setter of setBlendMode
// - initial
// The initial value accessor on the RenderStyle, defaults to e.g. initialBoxShadow
// - getter
// The RenderStyle getter, defaults to e.g. borderBottomLeft
// - setter
// The RenderStyle setter, defaults to e.g. setBorderBottomLeft
// - type_name
// The computed type for the property. Only required for the default value
// application, defaults to e.g. EDisplay
// - converter=convertRadius
// The StyleBuilder will call the specified function on StyleBuilderConverter
// to convert a CSSValue to an appropriate platform value
// - custom_initial
// - custom_inherit
// - custom_value
// - custom_all
// Handlers of the given types will be declared but not defined. Setting
// custom_all is equivalent to setting the other three flags
// - use_handlers_for=CSSPropertyTransform
// Use handlers for the specified property instead of defining new ones
// - builder_skip
// Ignore this property in the StyleBuilder
// - direction_aware
// This property resolves to a different property based on the current direction
// and writing mode.
// Properties with StyleBuilder handling
// High Priority and all other font properties.
// Other properties can depend upon high priority properties (e.g. font-size / ems)
color animatable, inherited, custom_all
direction inherited, custom_value
// FIXME: This is a mess due to crbug.com/353932. Shorthands shouldn't have
// any StyleBuilder handling!
font custom_all, longhands=font-family;font-size;font-style;font-variant;font-weight;font-stretch;line-height
font-family inherited, custom_all
font-kerning inherited, font, type_name=FontDescription::Kerning, name_for_methods=Kerning
font-size animatable, inherited, custom_all
font-stretch inherited, font, type_name=FontStretch, name_for_methods=Stretch
font-style inherited, font, type_name=FontStyle, name_for_methods=Style
font-variant inherited, font, type_name=FontVariant, name_for_methods=Variant
font-variant-ligatures inherited, font, name_for_methods=VariantLigatures, converter=convertFontVariantLigatures
font-weight animatable, inherited, font, type_name=FontWeight, name_for_methods=Weight, converter=convertFontWeight
-webkit-font-feature-settings inherited, font, name_for_methods=FeatureSettings, converter=convertFontFeatureSettings
-webkit-font-smoothing inherited, font, type_name=FontSmoothingMode
-webkit-locale inherited, custom_value
-webkit-text-orientation inherited, custom_value
-webkit-writing-mode inherited, custom_value
text-rendering inherited, font, type_name=TextRenderingMode
zoom animatable, custom_all
line-height animatable, inherited, getter=specifiedLineHeight, custom_value
align-content
align-items custom_all
align-self custom_all
backface-visibility
background-attachment custom_all
background-blend-mode custom_all
background-clip custom_all
background-color animatable, custom_all
background-image animatable, custom_all
background-origin custom_all
background-position-x animatable, custom_all
background-position-y animatable, custom_all
background-repeat-x custom_all
background-repeat-y custom_all
background-size animatable, custom_all
border-bottom-color animatable, custom_all
border-bottom-left-radius animatable, initial=initialBorderRadius, converter=convertRadius
border-bottom-right-radius animatable, initial=initialBorderRadius, converter=convertRadius
border-bottom-style type_name=EBorderStyle, initial=initialBorderStyle
border-bottom-width animatable, initial=initialBorderWidth, converter=convertLineWidth<unsigned>
border-collapse inherited
border-image-outset animatable, custom_all
border-image-repeat custom_all
border-image-slice animatable, custom_all
border-image-source animatable, custom_value
border-image-width animatable, custom_all
border-left-color animatable, custom_all
border-left-style type_name=EBorderStyle, initial=initialBorderStyle
border-left-width animatable, initial=initialBorderWidth, converter=convertLineWidth<unsigned>
border-right-color animatable, custom_all
border-right-style type_name=EBorderStyle, initial=initialBorderStyle
border-right-width animatable, initial=initialBorderWidth, converter=convertLineWidth<unsigned>
border-top-color animatable, custom_all
border-top-left-radius animatable, initial=initialBorderRadius, converter=convertRadius
border-top-right-radius animatable, initial=initialBorderRadius, converter=convertRadius
border-top-style type_name=EBorderStyle, initial=initialBorderStyle
border-top-width animatable, initial=initialBorderWidth, converter=convertLineWidth<unsigned>
bottom animatable, initial=initialOffset, converter=convertLengthOrAuto
box-shadow animatable, converter=convertShadow
box-sizing
caption-side inherited
clear
clip animatable, converter=convertClip, custom_all
content custom_all
cursor inherited, custom_all
display
empty-cells inherited, type_name=EEmptyCell
flex-basis animatable, converter=convertLengthOrAuto
flex-direction
flex-grow animatable, type_name=float
flex-shrink animatable, type_name=float
flex-wrap
float type_name=EFloat, name_for_methods=Floating
grid-auto-columns runtime_flag=CSSGridLayout, converter=convertGridTrackSize
grid-auto-flow runtime_flag=CSSGridLayout, custom_value
grid-auto-rows runtime_flag=CSSGridLayout, converter=convertGridTrackSize
grid-column-end runtime_flag=CSSGridLayout, converter=convertGridPosition
grid-column-start runtime_flag=CSSGridLayout, converter=convertGridPosition
grid-row-end runtime_flag=CSSGridLayout, converter=convertGridPosition
grid-row-start runtime_flag=CSSGridLayout, converter=convertGridPosition
grid-template-areas runtime_flag=CSSGridLayout, custom_all
grid-template-columns runtime_flag=CSSGridLayout, custom_all
grid-template-rows runtime_flag=CSSGridLayout, custom_all
height animatable, initial=initialSize, converter=convertLengthSizing
image-rendering inherited
isolation runtime_flag=CSSCompositing
justify-content
justify-items runtime_flag=CSSGridLayout, custom_all
justify-self runtime_flag=CSSGridLayout, custom_all
left animatable, initial=initialOffset, converter=convertLengthOrAuto
letter-spacing animatable, inherited, initial=initialLetterWordSpacing, converter=convertSpacing
list-style-image animatable, inherited, custom_value
list-style-position inherited
list-style-type inherited
margin-bottom animatable, initial=initialMargin, converter=convertLengthOrAuto
margin-left animatable, initial=initialMargin, converter=convertLengthOrAuto
margin-right animatable, initial=initialMargin, converter=convertLengthOrAuto
margin-top animatable, initial=initialMargin, converter=convertLengthOrAuto
mask-source-type runtime_flag=CSSMaskSourceType, custom_all
max-height animatable, initial=initialMaxSize, converter=convertLengthMaxSizing
max-width animatable, initial=initialMaxSize, converter=convertLengthMaxSizing
min-height animatable, initial=initialMinSize, converter=convertLengthSizing
min-width animatable, initial=initialMinSize, converter=convertLengthSizing
mix-blend-mode runtime_flag=CSSCompositing, type_name=blink::WebBlendMode, name_for_methods=BlendMode
object-fit runtime_flag=ObjectFitPosition, type_name=ObjectFit
object-position runtime_flag=ObjectFitPosition, animatable, converter=convertLengthPoint
opacity animatable, type_name=float
order type_name=int
orphans animatable, inherited, type_name=short, custom_all
outline-color animatable, custom_all
outline-offset animatable, converter=convertComputedLength<int>
outline-style custom_all
outline-width animatable, converter=convertLineWidth<unsigned short>
overflow-wrap inherited
overflow-x type_name=EOverflow
overflow-y type_name=EOverflow
padding-bottom animatable, initial=initialPadding, converter=convertLength
padding-left animatable, initial=initialPadding, converter=convertLength
padding-right animatable, initial=initialPadding, converter=convertLength
padding-top animatable, initial=initialPadding, converter=convertLength
page-break-after type_name=EPageBreak, initial=initialPageBreak
page-break-before type_name=EPageBreak, initial=initialPageBreak
page-break-inside type_name=EPageBreak, initial=initialPageBreak
perspective animatable, custom_value
perspective-origin animatable, custom_all
pointer-events inherited
position
quotes inherited, converter=convertQuotes
// FIXME: This shouldn't be inherited, as per css-ui
resize inherited, custom_value
right animatable, initial=initialOffset, converter=convertLengthOrAuto
scroll-behavior runtime_flag=CSSOMSmoothScroll, type_name=ScrollBehavior
shape-image-threshold animatable, type_name=float
shape-margin animatable, converter=convertLength
shape-outside animatable, custom_value
size custom_all
speak inherited
table-layout
tab-size inherited, type_name=unsigned
text-align inherited, custom_value
text-align-last runtime_flag=CSS3Text, inherited, type_name=TextAlignLast
// FIXME: We shouldn't switch between shorthand/not shorthand based on a runtime flag
text-decoration use_handlers_for=CSSPropertyTextDecorationLine, longhands=text-decoration-line;text-decoration-style;text-decoration-color
text-decoration-color runtime_flag=CSS3TextDecorations, animatable, custom_all
text-decoration-line runtime_flag=CSS3TextDecorations, name_for_methods=TextDecoration, converter=convertFlags<TextDecoration>
text-decoration-style runtime_flag=CSS3TextDecorations, type_name=TextDecorationStyle
text-indent animatable, inherited, custom_all
text-justify runtime_flag=CSS3Text, inherited, type_name=TextJustify
text-overflow type_name=TextOverflow
text-shadow animatable, inherited, converter=convertShadow
text-underline-position runtime_flag=CSS3TextDecorations, inherited, type_name=TextUnderlinePosition
top animatable, initial=initialOffset, converter=convertLengthOrAuto
touch-action converter=convertFlags<TouchAction>
touch-action-delay runtime_flag=CSSTouchActionDelay, inherited, type_name=TouchActionDelay
transform animatable, custom_value
transform-origin animatable, custom_all
transform-style name_for_methods=TransformStyle3D
unicode-bidi
vertical-align animatable, custom_inherit, custom_value
-webkit-animation-delay custom_all
-webkit-animation-direction custom_all
-webkit-animation-duration custom_all
-webkit-animation-fill-mode custom_all
-webkit-animation-iteration-count custom_all
-webkit-animation-name custom_all
-webkit-animation-play-state custom_all
-webkit-animation-timing-function custom_all
-webkit-aspect-ratio inherited, custom_all
-webkit-backface-visibility use_handlers_for=CSSPropertyBackfaceVisibility
-webkit-background-clip use_handlers_for=CSSPropertyBackgroundClip
-webkit-background-composite custom_all
-webkit-background-origin use_handlers_for=CSSPropertyBackgroundOrigin
-webkit-background-size animatable, use_handlers_for=CSSPropertyBackgroundSize
-webkit-border-fit
-webkit-border-horizontal-spacing animatable, inherited, name_for_methods=HorizontalBorderSpacing, converter=convertComputedLength<short>
-webkit-border-image initial=initialNinePieceImage, custom_value
-webkit-border-vertical-spacing animatable, inherited, name_for_methods=VerticalBorderSpacing, converter=convertComputedLength<short>
-webkit-box-decoration-break
-webkit-box-shadow animatable, use_handlers_for=CSSPropertyBoxShadow
-webkit-clip-path animatable, custom_value
-webkit-filter animatable, custom_value
-webkit-highlight inherited, converter=convertString<CSSValueNone>
-webkit-hyphenate-character inherited, name_for_methods=HyphenationString, converter=convertString<CSSValueAuto>
-webkit-line-box-contain inherited, converter=convertLineBoxContain
-webkit-line-break inherited, type_name=LineBreak
-webkit-line-clamp type_name=LineClampValue
-webkit-margin-after-collapse type_name=EMarginCollapse
-webkit-margin-before-collapse type_name=EMarginCollapse
-webkit-margin-bottom-collapse type_name=EMarginCollapse, name_for_methods=MarginAfterCollapse
-webkit-margin-top-collapse type_name=EMarginCollapse, name_for_methods=MarginBeforeCollapse
-webkit-mask-box-image-outset animatable, custom_all
-webkit-mask-box-image-repeat custom_all
-webkit-mask-box-image-slice animatable, custom_all
-webkit-mask-box-image-source animatable, custom_value
-webkit-mask-box-image-width animatable, custom_all
-webkit-mask-clip custom_all
-webkit-mask-composite custom_all
-webkit-mask-image animatable, custom_all
-webkit-mask-origin custom_all
-webkit-mask-position-x animatable, custom_all
-webkit-mask-position-y animatable, custom_all
-webkit-mask-repeat-x custom_all
-webkit-mask-repeat-y custom_all
-webkit-mask-size animatable, custom_all
-webkit-perspective custom_all
-webkit-perspective-origin custom_all
-webkit-perspective-origin-x converter=convertLength
-webkit-perspective-origin-y converter=convertLength
-webkit-print-color-adjust inherited, type_name=PrintColorAdjust
-webkit-rtl-ordering inherited, type_name=Order, setter=setRTLOrdering, initial=initialRTLOrdering
-webkit-tap-highlight-color inherited, converter=convertColor
-webkit-text-combine inherited, type_name=TextCombine
-webkit-text-emphasis-color inherited, custom_all
-webkit-text-emphasis-position inherited, type_name=TextEmphasisPosition
-webkit-text-emphasis-style inherited, custom_all
-webkit-text-fill-color inherited, custom_all
-webkit-text-stroke-color animatable, inherited, custom_all
-webkit-text-stroke-width inherited, converter=convertTextStrokeWidth
-webkit-transform use_handlers_for=CSSPropertyTransform
-webkit-transform-origin-x converter=convertLength
-webkit-transform-origin-y converter=convertLength
-webkit-transform-origin-z converter=convertComputedLength<float>
-webkit-transform-style name_for_methods=TransformStyle3D
-webkit-transition-delay custom_all
-webkit-transition-duration custom_all
-webkit-transition-property custom_all
-webkit-transition-timing-function custom_all
-webkit-user-drag
-webkit-user-modify inherited
-webkit-user-select inherited
white-space inherited
widows animatable, inherited, type_name=short, custom_all
width animatable, initial=initialSize, converter=convertLengthSizing
will-change custom_all
word-break inherited
word-spacing animatable, inherited, initial=initialLetterWordSpacing, converter=convertSpacing
// UAs must treat 'word-wrap' as an alternate name for the 'overflow-wrap' property. So using the same handlers.
word-wrap inherited, name_for_methods=OverflowWrap
z-index animatable, type_name=int, custom_all
// Non-standard direction aware properties
-webkit-border-end-color direction_aware
-webkit-border-end-style direction_aware
-webkit-border-end-width direction_aware
-webkit-border-start-color direction_aware
-webkit-border-start-style direction_aware
-webkit-border-start-width direction_aware
-webkit-border-before-color direction_aware
-webkit-border-before-style direction_aware
-webkit-border-before-width direction_aware
-webkit-border-after-color direction_aware
-webkit-border-after-style direction_aware
-webkit-border-after-width direction_aware
-webkit-margin-end direction_aware
-webkit-margin-start direction_aware
-webkit-margin-before direction_aware
-webkit-margin-after direction_aware
-webkit-padding-end direction_aware
-webkit-padding-start direction_aware
-webkit-padding-before direction_aware
-webkit-padding-after direction_aware
-webkit-logical-width direction_aware
-webkit-logical-height direction_aware
-webkit-min-logical-width direction_aware
-webkit-min-logical-height direction_aware
-webkit-max-logical-width direction_aware
-webkit-max-logical-height direction_aware
// Properties that we ignore in the StyleBuilder. Note that unprefixed animation
// and transition properties are here due to the way they have been unprefixed
// FIXME: We should see if any of these should actually be unreachable
all builder_skip
animation-delay runtime_flag=CSSAnimationUnprefixed, builder_skip
animation-direction runtime_flag=CSSAnimationUnprefixed, builder_skip
animation-duration runtime_flag=CSSAnimationUnprefixed, builder_skip
animation-fill-mode runtime_flag=CSSAnimationUnprefixed, builder_skip
animation-iteration-count runtime_flag=CSSAnimationUnprefixed, builder_skip
animation-name runtime_flag=CSSAnimationUnprefixed, builder_skip
animation-play-state runtime_flag=CSSAnimationUnprefixed, builder_skip
animation-timing-function runtime_flag=CSSAnimationUnprefixed, builder_skip
max-zoom builder_skip
min-zoom builder_skip
orientation builder_skip
page builder_skip
src builder_skip
transition-delay builder_skip
transition-duration builder_skip
transition-property builder_skip
transition-timing-function builder_skip
unicode-range builder_skip
user-zoom builder_skip
-webkit-font-size-delta builder_skip
-webkit-text-decorations-in-effect inherited, builder_skip
// Shorthands
animation runtime_flag=CSSAnimationUnprefixed, longhands=animation-name;animation-duration;animation-timing-function;animation-delay;animation-iteration-count;animation-direction;animation-fill-mode;animation-play-state
background longhands=background-image;background-position-x;background-position-y;background-size;background-repeat-x;background-repeat-y;background-attachment;background-origin;background-clip;background-color
background-position longhands=background-position-x;background-position-y
background-repeat longhands=background-repeat-x;background-repeat-y
border longhands=border-top-color;border-top-style;border-top-width;border-right-color;border-right-style;border-right-width;border-bottom-color;border-bottom-style;border-bottom-width;border-left-color;border-left-style;border-left-width
border-bottom longhands=border-bottom-width;border-bottom-style;border-bottom-color
border-color longhands=border-top-color;border-right-color;border-bottom-color;border-left-color
border-image longhands=border-image-source;border-image-slice;border-image-width;border-image-outset;border-image-repeat
border-left longhands=border-left-width;border-left-style;border-left-color
border-radius longhands=border-top-left-radius;border-top-right-radius;border-bottom-right-radius;border-bottom-left-radius
border-right longhands=border-right-width;border-right-style;border-right-color
border-spacing longhands=-webkit-border-horizontal-spacing;-webkit-border-vertical-spacing
border-style longhands=border-top-style;border-right-style;border-bottom-style;border-left-style
border-top longhands=border-top-width;border-top-style;border-top-color
border-width longhands=border-top-width;border-right-width;border-bottom-width;border-left-width
flex longhands=flex-grow;flex-shrink;flex-basis
flex-flow longhands=flex-direction;flex-wrap
grid runtime_flag=CSSGridLayout, longhands=grid-template;grid-auto-flow;grid-auto-columns;grid-auto-rows
grid-area runtime_flag=CSSGridLayout, longhands=grid-row-start;grid-column-start;grid-row-end;grid-column-end
grid-column runtime_flag=CSSGridLayout, longhands=grid-column-start;grid-column-end
grid-row runtime_flag=CSSGridLayout, longhands=grid-row-start;grid-row-end
grid-template runtime_flag=CSSGridLayout, longhands=grid-template-columns;grid-template-rows;grid-template-areas
list-style longhands=list-style-type;list-style-position;list-style-image
margin longhands=margin-top;margin-right;margin-bottom;margin-left
outline longhands=outline-color;outline-style;outline-width
overflow longhands=overflow-x;overflow-y
padding longhands=padding-top;padding-right;padding-bottom;padding-left
transition longhands=transition-property;transition-duration;transition-timing-function;transition-delay
-webkit-animation longhands=-webkit-animation-name;-webkit-animation-duration;-webkit-animation-timing-function;-webkit-animation-delay;-webkit-animation-iteration-count;-webkit-animation-direction;-webkit-animation-fill-mode;-webkit-animation-play-state
-webkit-border-after longhands=-webkit-border-after-width;-webkit-border-after-style;-webkit-border-after-color
-webkit-border-before longhands=-webkit-border-before-width;-webkit-border-before-style;-webkit-border-before-color
-webkit-border-end longhands=-webkit-border-end-width;-webkit-border-end-style;-webkit-border-end-color
// "-webkit-border-radius: 1px 2px" behaves as "border-radius: 1px / 2px"
-webkit-border-radius longhands=border-top-left-radius;border-top-right-radius;border-bottom-right-radius;border-bottom-left-radius
-webkit-border-start longhands=-webkit-border-start-width;-webkit-border-start-style;-webkit-border-start-color
-webkit-margin-collapse longhands=-webkit-margin-before-collapse;-webkit-margin-after-collapse
-webkit-mask longhands=-webkit-mask-image;-webkit-mask-position-x;-webkit-mask-position-y;-webkit-mask-size;-webkit-mask-repeat-x;-webkit-mask-repeat-y;-webkit-mask-origin;-webkit-mask-clip
-webkit-mask-box-image longhands=-webkit-mask-box-image-source;-webkit-mask-box-image-slice;-webkit-mask-box-image-width;-webkit-mask-box-image-outset;-webkit-mask-box-image-repeat
-webkit-mask-position longhands=-webkit-mask-position-x;-webkit-mask-position-y
-webkit-mask-repeat longhands=-webkit-mask-repeat-x;-webkit-mask-repeat-y
-webkit-text-emphasis longhands=-webkit-text-emphasis-style;-webkit-text-emphasis-color
-webkit-text-stroke longhands=-webkit-text-stroke-width;-webkit-text-stroke-color
-webkit-transform-origin longhands=-webkit-transform-origin-x;-webkit-transform-origin-y;-webkit-transform-origin-z
-webkit-transition longhands=-webkit-transition-property;-webkit-transition-duration;-webkit-transition-timing-function;-webkit-transition-delay
// Aliases; these map to the same CSSPropertyID
-epub-caption-side alias_for=caption-side
-epub-text-combine alias_for=-webkit-text-combine
-epub-text-emphasis alias_for=-webkit-text-emphasis
-epub-text-emphasis-color alias_for=-webkit-text-emphasis-color
-epub-text-emphasis-style alias_for=-webkit-text-emphasis-style
-epub-text-orientation alias_for=-webkit-text-orientation
-epub-word-break alias_for=word-break
-epub-writing-mode alias_for=-webkit-writing-mode
-webkit-align-content alias_for=align-content
-webkit-align-items alias_for=align-items
-webkit-align-self alias_for=align-self
-webkit-border-bottom-left-radius alias_for=border-bottom-left-radius
-webkit-border-bottom-right-radius alias_for=border-bottom-right-radius
-webkit-border-top-left-radius alias_for=border-top-left-radius
-webkit-border-top-right-radius alias_for=border-top-right-radius
-webkit-box-sizing alias_for=box-sizing
-webkit-flex alias_for=flex
-webkit-flex-basis alias_for=flex-basis
-webkit-flex-direction alias_for=flex-direction
-webkit-flex-flow alias_for=flex-flow
-webkit-flex-grow alias_for=flex-grow
-webkit-flex-shrink alias_for=flex-shrink
-webkit-flex-wrap alias_for=flex-wrap
-webkit-justify-content alias_for=justify-content
-webkit-opacity alias_for=opacity
-webkit-order alias_for=order
-webkit-shape-image-threshold alias_for=shape-image-threshold
-webkit-shape-margin alias_for=shape-margin
-webkit-shape-outside alias_for=shape-outside