{
// This file specifies fields in ComputedStyle that we would like to
// generate, but are not CSS properties.
parameters: {
// If true, this field will be reset whenever we create a new ComputedStyle;
// it will not be (automatically) kept from any previous styles, but will be
// set to the initial value.
//
// NOTE: If such a field is in a subgroup (e.g. due to being rare),
// we will be doing more memory allocation (due to copy-on-write) than expected,
// so use this with care.
reset_on_new_style: {
default: false,
},
// If true, we do not include this field in ComputedStyleBase::InheritedEqual
// and ComputedStyleBase::NonInheritedEqual.
custom_compare: {
default: false,
},
// Controls whether the field has the "mutable" C++ keyword.
mutable: {
default: false,
},
// The rest is the same as css_properties.json5, but the only relevant ones in
// this file are:
// name, field_template, include_paths, default_value, type_name, keyword,
// inherited
},
data: [
{
name: "IsLink",
field_template: "monotonic_flag",
default_value: "false",
reset_on_new_style: true,
custom_compare: true,
},
{
name: "Display",
field_template: "keyword",
type_name: "EDisplay",
keywords: [
"inline", "block", "list-item", "inline-block", "table", "inline-table",
"table-row-group", "table-header-group", "table-footer-group",
"table-row", "table-column-group", "table-column", "table-cell",
"table-caption", "-webkit-box", "-webkit-inline-box", "flex",
"inline-flex", "grid", "inline-grid", "contents", "flow-root", "none",
"layout-custom", "inline-layout-custom", "math", "block math",
"inline list-item", "flow-root list-item", "inline flow-root list-item",
"ruby", "block ruby", "ruby-text",
// Available only if CSSMasonryLayout is enabled:
"masonry", "inline-masonry"
],
default_value: "inline",
},
{
name: "DisplayLayoutCustomName",
field_template: "external",
field_group: "*",
type_name: "AtomicString",
include_paths: ["third_party/blink/renderer/platform/wtf/text/atomic_string.h"],
default_value: "g_null_atom",
invalidate: ["layout", "paint"],
},
{
name: "DisplayLayoutCustomParentName",
field_template: "external",
field_group: "*",
type_name: "AtomicString",
include_paths: ["third_party/blink/renderer/platform/wtf/text/atomic_string.h"],
default_value: "g_null_atom",
},
{
name: "IsOriginalDisplayInlineType",
field_template: "primitive",
type_name: "bool",
default_value: "true",
invalidate: ["layout", "paint"],
},
{
name: "InsideLink",
field_template: "keyword",
default_value: "not-inside-link",
keywords: ["not-inside-link", "inside-unvisited-link", "inside-visited-link"],
inherited: true,
invalidate: ["border-visual", "paint"],
},
{
name: "InForcedColorsMode",
field_template: "primitive",
field_group: "inherited",
default_value: "false",
type_name: "bool",
inherited: true,
},
// Style has a property with attr() values.
{
name: "HasAttrFunction",
field_template: "monotonic_flag",
default_value: "false",
reset_on_new_style: true,
custom_compare: true,
},
// Whether this style is affected by these pseudo-classes.
{
name: "AffectedByFocusWithin",
field_template: "monotonic_flag",
default_value: "false",
reset_on_new_style: true,
custom_compare: true,
},
{
name: "AffectedByHover",
field_template: "monotonic_flag",
default_value: "false",
reset_on_new_style: true,
custom_compare: true,
},
{
name: "AffectedByActive",
field_template: "monotonic_flag",
default_value: "false",
reset_on_new_style: true,
custom_compare: true,
},
{
name: "AffectedByDrag",
field_template: "monotonic_flag",
default_value: "false",
reset_on_new_style: true,
custom_compare: true,
},
// A non-inherited property references a variable or @apply is used
{
name: "HasVariableReferenceFromNonInheritedProperty",
field_template: "monotonic_flag",
default_value: "false",
reset_on_new_style: true,
custom_compare: true,
},
// A property references a variable that needs to be resolved
{
name: "HasVariableReference",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
// A property which value consists of a custom property declaration.
{
name: "HasVariableDeclaration",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
// Set on parent style when a child explicitly inherits a
// non-inherited property
{
name: "ChildHasExplicitInheritance",
field_template: "monotonic_flag",
default_value: "false",
reset_on_new_style: true,
custom_compare: true,
mutable: true,
},
// Explicitly inherits a non-inherited property
{
name: "HasExplicitInheritance",
field_template: "monotonic_flag",
default_value: "false",
},
// These are set if we used viewport or rem units when resolving a length.
{
name: "ViewportUnitFlags",
field_template: "primitive",
field_size: 2,
default_value: "0",
type_name: "unsigned",
},
{
name: "HasRootFontRelativeUnits",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
{
name: "HasEmUnits",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
// Whether we used a length unit that must be resolved against the measure
// of a certain glyph in some font.
{
name: "HasGlyphRelativeUnits",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
{
name: "HasContainerRelativeUnits",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
{
name: "HasLineHeightRelativeUnits",
field_group: "*",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
{
name: "HasLogicalDirectionRelativeUnits",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
// True if this ComputedStyle is the result of CustomStyleForLayoutObject()
// that uses font metrics in its calculation.
{
name: "CustomStyleCallbackDependsOnFont",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
// These properties only have generated storage, and their methods are handwritten in ComputedStyle.
{
name: "StyleType",
field_template: "primitive",
field_size: 6,
default_value: "PseudoId::kPseudoIdNone",
type_name: "PseudoId",
reset_on_new_style: true,
custom_compare: true,
},
{
name: "PseudoElementStyles",
field_template: "primitive",
field_size: 17,
default_value: "kPseudoIdNone",
type_name: "unsigned",
reset_on_new_style: true,
custom_compare: true,
computed_style_custom_functions: ["getter"],
invalidate: ["scrollbar-style"],
},
// Whether any non-universal highlight selectors were found when collecting
// rules for the originating element. Stored in the *originating* style, and
// needs to be restored *non-monotonically* in ApplyMatchedCache.
{
name: "HasNonUniversalHighlightPseudoStyles",
field_template: "primitive",
field_group: "*",
default_value: "false",
type_name: "bool",
reset_on_new_style: true,
custom_compare: true,
},
// Whether any highlight pseudo selectors were found when collecting non-UA
// rules for the originating element. Stored in the *originating* style, and
// needs to be restored *non-monotonically* in ApplyMatchedCache.
{
name: "HasNonUaHighlightPseudoStyles",
field_template: "primitive",
field_group: "*",
default_value: "false",
type_name: "bool",
reset_on_new_style: true,
custom_compare: true,
},
// Whether any highlight pseudo selectors were found within container
// query blocks.
{
name: "HighlightsDependOnSizeContainerQueries",
field_template: "primitive",
field_group: "*",
default_value: "false",
type_name: "bool",
reset_on_new_style: true,
custom_compare: true,
},
// Used by ::highlight
{
name: "PseudoArgument",
field_template: "external",
field_group: "*",
type_name: "AtomicString",
include_paths: ["third_party/blink/renderer/platform/wtf/text/atomic_string.h"],
default_value: "g_null_atom",
},
{
name: "CustomHighlightNames",
field_template: "external",
field_group: "*",
include_paths: ["third_party/blink/renderer/platform/wtf/hash_set.h",
"third_party/blink/renderer/platform/wtf/text/atomic_string.h"],
type_name: "HashSet<AtomicString>",
wrapper_pointer_name: "std::unique_ptr",
default_value: "nullptr",
computed_style_custom_functions: ["setter", "getter"],
reset_on_new_style: true,
},
// FIXME: vertical align is actually a CSS property, but since we don't support union fields
// which can be either a keyword or Length, this is specified in this file for now. Remove this
// once we can support union fields.
{
name: "VerticalAlign",
field_template: "primitive",
field_size: 4,
type_name: "unsigned",
default_value: "static_cast<unsigned>(EVerticalAlign::kBaseline)",
computed_style_custom_functions: ["initial", "getter", "setter"],
invalidate: ["layout"],
},
{
name: "VerticalAlignLength",
field_template: "external",
default_value: "Length()",
include_paths: ["third_party/blink/renderer/platform/geometry/length.h"],
type_name: "Length",
field_group: "box",
getter: "GetVerticalAlignLength",
computed_style_custom_functions: ["setter"],
invalidate: ["layout"],
},
{
name: "border-image",
field_template: "external",
include_paths: ["third_party/blink/renderer/core/style/nine_piece_image.h"],
type_name: "NinePieceImage",
field_group: "surround",
default_value: "NinePieceImage()",
invalidate: ["border-image", "border-visual"],
},
{
name: "Background",
field_template: "external",
include_paths: ["third_party/blink/renderer/core/style/fill_layer.h"],
type_name: "FillLayer",
default_value: "FillLayer(EFillLayerType::kBackground, true)",
field_group: "background",
computed_style_custom_functions: ["initial", "getter", "setter"],
invalidate: ["background", "background-current-color"],
},
{
name: "HasClipPath",
field_template: "primitive",
type_name: "bool",
default_value: "false",
field_group: "visual",
},
{
name: "HasAutoClip",
field_template: "primitive",
type_name: "bool",
default_value: "true",
field_group: "visual",
computed_style_custom_functions: ["setter"],
invalidate: ["clip"],
},
{
name: "HasAutoZIndex",
field_template: "primitive",
type_name: "bool",
field_group: "box",
default_value: "true",
computed_style_custom_functions: ["setter"],
},
{
name: "HasAutoStandardLineClamp",
field_template: "primitive",
type_name: "bool",
field_group: "box",
default_value: "false",
computed_style_custom_functions: ["setter"],
invalidate: ["layout", "paint"],
},
{
name: "font",
field_template: "external",
include_paths: ["third_party/blink/renderer/platform/fonts/font.h"],
type_name: "Font",
field_group: "font",
inherited: true,
default_value: "Font()",
invalidate: ["reshape"],
},
{
name: "TextAutosizingMultiplier",
inherited: true,
field_template: "primitive",
type_name: "float",
field_group: "inherited",
default_value: "1.0",
computed_style_custom_functions: ["setter"],
invalidate: ["layout", "paint"],
},
{
name: "CursorData",
inherited: true,
field_template: "external",
type_name: "CursorList",
include_paths: ["third_party/blink/renderer/core/style/cursor_list.h"],
default_value: "nullptr",
wrapper_pointer_name: "Member",
field_group: "*",
computed_style_custom_functions: ["getter", "setter"],
},
{
name: "EffectiveZoom",
inherited: true,
field_template: "primitive",
type_name: "float",
default_value: "1.0f",
field_group: "*",
computed_style_custom_functions: ["setter"],
invalidate: ["layout", "paint"],
},
{
name: "TextEmphasisFill",
inherited: true,
field_template: "keyword",
type_name: "TextEmphasisFill",
default_value: "filled",
keywords: ["filled", "open"],
field_group: "*",
invalidate: ["layout", "paint"],
},
{
name: "TextEmphasisMark",
inherited: true,
field_template: "keyword",
type_name: "TextEmphasisMark",
default_value: "none",
keywords: ["none", "auto", "dot", "circle", "double-circle", "triangle", "sesame", "custom"],
field_group: "*",
computed_style_custom_functions: ["getter"],
invalidate: ["layout", "paint"],
},
{
name: "SubtreeWillChangeContents",
field_template: "primitive",
type_name: "bool",
default_value: "false",
field_group: "*",
invalidate: ["compositing"],
},
// Though position: sticky is not itself an inherited property, being a
// descendent of a sticky element changes some document lifecycle logic.
{
name: "SubtreeIsSticky",
inherited: true,
field_template: "primitive",
type_name: "bool",
default_value: "false",
field_group: "*",
},
{
name: "EffectiveTouchAction",
inherited: true,
field_template: "primitive",
include_paths: ["third_party/blink/renderer/platform/graphics/touch_action.h"],
type_name: "TouchAction",
field_size: 8,
default_value: "TouchAction::kAuto",
field_group: "*",
},
{
name: "EffectiveAppearance",
field_group: "*",
field_size: 5,
field_template: "primitive",
default_value: "kNoControlPart",
type_name: "ControlPart",
},
{
name: "TextEmphasisCustomMark",
inherited: true,
field_template: "external",
type_name: "AtomicString",
include_paths: ["third_party/blink/renderer/platform/wtf/text/atomic_string.h"],
default_value: "AtomicString()",
field_group: "*",
invalidate: ["layout", "paint"],
},
{
name: "BaseTextDecorationData",
field_template: "external",
type_name: "base::RefCountedData<Vector<AppliedTextDecoration, 1>>",
include_paths: ["third_party/blink/renderer/core/style/applied_text_decoration.h"],
default_value: "nullptr",
wrapper_pointer_name: "scoped_refptr",
field_group: "visual",
computed_style_custom_functions: ["getter"],
invalidate: ["text-decoration"],
},
{
name: "InheritedVariables",
inherited: true,
semi_independent_variable: true,
field_template: "external",
type_name: "StyleInheritedVariables",
include_paths: ["third_party/blink/renderer/core/style/style_inherited_variables.h"],
default_value: "nullptr",
wrapper_pointer_name: "Member",
field_group: "inherited",
computed_style_custom_functions: ["getter", "setter"],
},
{
name: "HighlightData",
inherited: true,
field_template: "external",
type_name: "StyleHighlightData",
include_paths: ["third_party/blink/renderer/core/style/style_highlight_data.h"],
default_value: "StyleHighlightData()",
field_group: "*->highlight-data",
computed_style_custom_functions: [],
},
{
name: "InitialData",
inherited: true,
field_template: "pointer",
type_name: "StyleInitialData",
include_paths: ["third_party/blink/renderer/core/style/style_initial_data.h"],
default_value: "nullptr",
wrapper_pointer_name: "Member",
field_group: "*",
},
{
name: "Mask",
field_template: "external",
type_name: "FillLayer",
field_group: "*",
default_value: "FillLayer(EFillLayerType::kMask, true)",
computed_style_custom_functions: ["initial", "getter", "setter"],
invalidate: ["mask", "paint"],
},
{
name: "CounterDirectives",
field_template: "external",
type_name: "CounterDirectiveMap",
field_group: "*",
default_value: "nullptr",
wrapper_pointer_name: "std::unique_ptr",
include_paths: ["third_party/blink/renderer/core/style/counter_directives.h"],
computed_style_custom_functions: ["getter", "setter"],
},
{
name: "Animations",
field_template: "external",
type_name: "CSSAnimationData",
field_group: "*",
default_value: "nullptr",
wrapper_pointer_name: "std::unique_ptr",
include_paths: ["third_party/blink/renderer/core/animation/css/css_animation_data.h"],
computed_style_custom_functions: ["getter", "setter"],
},
{
name: "Transitions",
field_template: "external",
type_name: "CSSTransitionData",
field_group: "*",
default_value: "nullptr",
wrapper_pointer_name: "std::unique_ptr",
include_paths: ["third_party/blink/renderer/core/animation/css/css_transition_data.h"],
computed_style_custom_functions: ["getter", "setter"],
},
{
name: "MaskBoxImage",
field_template: "external",
type_name: "NinePieceImage",
field_group: "*",
default_value: "NinePieceImage::MaskDefaults()",
include_paths: ["third_party/blink/renderer/core/style/nine_piece_image.h"],
computed_style_custom_functions: ["getter", "setter"],
invalidate: ["mask", "paint"],
},
{
name: "PageSize",
field_template: "external",
type_name: "gfx::SizeF",
field_group: "*",
default_value: "gfx::SizeF()",
include_paths: ["ui/gfx/geometry/size_f.h"],
},
{
name: "OutlineStyleIsAuto",
field_template: "primitive",
type_name: "bool",
default_value: "false",
field_group: "*",
invalidate: ["outline"],
},
{
name: "CallbackSelectors",
field_template: "external",
type_name: "Vector<String>",
field_group: "*",
default_value: "Vector<String>()",
include_paths: ["third_party/blink/renderer/platform/wtf/vector.h",
"third_party/blink/renderer/platform/wtf/text/wtf_string.h"],
computed_style_custom_functions: ["setter"],
},
{
name: "DocumentRulesSelectors",
field_template: "external",
type_name: "HeapHashSet<WeakMember<StyleRule>>",
wrapper_pointer_name: "Member",
field_group: "*",
default_value: "nullptr",
include_paths: ["third_party/blink/renderer/platform/heap/collection_support/heap_hash_set.h",
"third_party/blink/renderer/platform/heap/member.h",
"third_party/blink/renderer/platform/heap/persistent.h",
"third_party/blink/renderer/core/css/style_rule.h"],
computed_style_custom_functions: ["setter"],
},
{
name: "PaintImages",
field_template: "external",
type_name: "PaintImages",
field_group: "*",
default_value: "nullptr",
wrapper_pointer_name: "Member",
custom_compare: true,
include_paths: ["third_party/blink/renderer/core/style/paint_images.h"],
computed_style_custom_functions: ["getter", "setter"],
},
{
name: "NonInheritedVariables",
field_template: "external",
type_name: "StyleNonInheritedVariables",
field_group: "*",
default_value: "nullptr",
wrapper_pointer_name: "Member",
include_paths: ["third_party/blink/renderer/core/style/style_non_inherited_variables.h"],
computed_style_custom_functions: ["getter", "setter"],
},
{
name: "PageSizeType",
field_template: "primitive",
field_group: "*",
type_name: "PageSizeType",
field_size: 2,
default_value: "PageSizeType::kAuto",
include_paths: ["third_party/blink/public/common/css/page_size_type.h"],
},
{
name: "HasCurrentOpacityAnimation",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
invalidate: ["compositing"],
},
{
name: "HasCurrentTranslateAnimation",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
invalidate: ["compositing", "has-transform"],
},
{
name: "HasCurrentRotateAnimation",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
invalidate: ["compositing", "has-transform"],
},
{
name: "HasCurrentScaleAnimation",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
invalidate: ["compositing", "has-transform"],
},
{
name: "HasCurrentTransformAnimation",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
invalidate: ["compositing", "has-transform"],
},
{
name: "HasCurrentFilterAnimation",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
invalidate: ["compositing"],
},
{
name: "HasCurrentBackdropFilterAnimation",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
invalidate: ["compositing"],
},
{
name: "HasCurrentBackgroundColorAnimation",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
},
{
name: "IsRunningOpacityAnimationOnCompositor",
field_template: "primitive",
type_name: "bool",
field_group: "*",
// This field just affects how changes of animatable values are handled,
// so it doesn't contribute to style differences.
custom_compare: true,
default_value: "false",
},
{
name: "IsRunningTransformAnimationOnCompositor",
field_template: "primitive",
type_name: "bool",
field_group: "*",
// This field just affects how changes of animatable values are handled,
// so it doesn't contribute to style differences.
custom_compare: true,
default_value: "false",
},
{
name: "IsRunningScaleAnimationOnCompositor",
field_template: "primitive",
type_name: "bool",
field_group: "*",
// This field just affects how changes of animatable values are handled,
// so it doesn't contribute to style differences.
custom_compare: true,
default_value: "false",
},
{
name: "IsRunningRotateAnimationOnCompositor",
field_template: "primitive",
type_name: "bool",
field_group: "*",
// This field just affects how changes of animatable values are handled,
// so it doesn't contribute to style differences.
custom_compare: true,
default_value: "false",
},
{
name: "IsRunningTranslateAnimationOnCompositor",
field_template: "primitive",
type_name: "bool",
field_group: "*",
// This field just affects how changes of animatable values are handled,
// so it doesn't contribute to style differences.
custom_compare: true,
default_value: "false",
},
{
name: "IsRunningFilterAnimationOnCompositor",
field_template: "primitive",
type_name: "bool",
field_group: "*",
// This field just affects how changes of animatable values are handled,
// so it doesn't contribute to style differences.
custom_compare: true,
default_value: "false",
},
{
name: "IsRunningBackdropFilterAnimationOnCompositor",
field_template: "primitive",
type_name: "bool",
field_group: "*",
// This field just affects how changes of animatable values are handled,
// so it doesn't contribute to style differences.
custom_compare: true,
default_value: "false",
},
// A stacking context is painted atomically and defines a stacking order,
// whereas a containing stacking context defines in which order the stacking
// contexts below are painted.
// See CSS 2.1, Appendix E (https://www.w3.org/TR/CSS21/zindex.html) for more
// details. Note that this field does _not_ consider paint or layout
// containment, since it depends on the type of layout object created.
{
name: "IsStackingContextWithoutContainment",
field_template: "derived_flag",
derived_from: "CalculateIsStackingContextWithoutContainment",
mutable: true,
reset_on_new_style: true,
},
// A stacking context is forced a few situations, e.g.:
//
// - The element is the document element.
// - The element is in the top layer.
// - The element is a <foreignObject>.
{
name: "ForcesStackingContext",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
},
// Plugins require accelerated compositing for reasons external to blink.
// In which case, we need to update the ComputedStyle on the
// LayoutEmbeddedObject, so store this bit so that the style actually changes
// when the plugin becomes composited.
{
name: "RequiresAcceleratedCompositingForExternalReasons",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
},
// Style adjustment for appearance is disabled when certain properties are set.
{
name: "HasAuthorBackground",
field_template: "monotonic_flag",
default_value: "false",
},
{
name: "HasAuthorBorder",
field_template: "monotonic_flag",
default_value: "false",
},
{
name: "HasAuthorBorderRadius",
field_template: "monotonic_flag",
default_value: "false",
},
// Paired cascade: in highlight pseudo styles, the presence of any highlight
// colors affects whether all other highlight color properties default to
// initial or the UA default.
// https://drafts.csswg.org/css-pseudo-4/#highlight-cascade
{
name: "HasAuthorHighlightColors",
field_template: "monotonic_flag",
default_value: "false",
},
{
name: "ColorIsCurrentColor",
field_template: "primitive",
field_group: "inherited",
type_name: "bool",
default_value: "true",
inherited: true,
computed_style_protected_functions: ["getter"],
},
{
name: "InternalVisitedColorIsCurrentColor",
field_template: "primitive",
field_group: "inherited",
type_name: "bool",
default_value: "true",
inherited: true,
computed_style_protected_functions: ["getter"],
},
{
name: "WillChangeProperties",
field_template: "external",
type_name: "Vector<CSSPropertyID>",
field_group: "*->will-change",
default_value: "Vector<CSSPropertyID>()",
include_paths: ["third_party/blink/renderer/platform/wtf/vector.h",
"third_party/blink/renderer/core/css/css_property_names.h"],
invalidate: ["compositing"],
},
{
name: "WillChangeContents",
field_template: "primitive",
type_name: "bool",
field_group: "*->will-change",
default_value: "false",
},
{
name: "WillChangeScrollPosition",
field_template: "primitive",
type_name: "bool",
field_group: "*->will-change",
default_value: "false",
invalidate: ["compositing"],
},
{
name: "HasAutoColumnWidth",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "true",
computed_style_custom_functions: ["setter"],
invalidate: ["layout", "paint"],
},
{
name: "HasAutoColumnCount",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "true",
computed_style_custom_functions: ["setter"],
invalidate: ["layout", "paint"],
},
// We only create and store ComputedStyle objects for elements in
// display:none subtrees if we need it for e.g. getComputedStyle. This flag
// is true for such ComputedStyle objects.
{
name: "IsEnsuredInDisplayNone",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
{
name: "MayHaveMargin",
field_template: "monotonic_flag",
field_group: "surround",
default_value: "false",
custom_compare: true,
},
{
name: "MayHavePadding",
field_template: "monotonic_flag",
field_group: "surround",
default_value: "false",
custom_compare: true,
},
{
name: "DarkColorScheme",
field_template: "primitive",
type_name: "bool",
default_value: "false",
custom_compare: true,
inherited: true,
invalidate: ["accent-color", "background-current-color", "border-visual", "paint"],
},
{
// This flag is set if both the computed value of color-scheme is 'normal'
// and the page's supported color-schemes is 'normal'.
name: "ColorSchemeFlagsIsNormal",
field_template: "primitive",
type_name: "bool",
default_value: "false",
custom_compare: true,
inherited: true,
},
{
name: "ColorSchemeForced",
field_template: "primitive",
type_name: "bool",
default_value: "false",
custom_compare: true,
inherited: true,
invalidate: ["paint"],
},
{
name: "IsInBlockifyingDisplay",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
{
name: "IsInInlinifyingDisplay",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
{
name: "IsFlexOrGridOrCustomItem",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
{
name: "IsEnsuredOutsideFlatTree",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
inherited: true,
},
{
name: "IsInsideDisplayIgnoringFloatingChildren",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
},
{
name: "IsInsideListElement",
field_template: "monotonic_flag",
default_value: "false",
custom_compare: true,
inherited: true,
},
// This field disables the 'overflow' check in |LayoutBlock::
// InlineBlockBaseline()|. For 'inline-block', CSS says that the baseline
// is the bottom margin edge if 'overflow' is not visible. But some
// elements want to ignore this condition.
{
name: "ShouldIgnoreOverflowPropertyForInlineBlockBaseline",
field_template: "monotonic_flag",
default_value: "false",
inherited: false,
},
{
name: "InlineBlockBaselineEdge",
field_group: "*",
field_template: "keyword",
keywords: ["margin-box", "border-box", "content-box"],
default_value: "margin-box",
},
{
name: "MathBaseline",
field_template: "external",
default_value: "Length()",
include_paths: ["third_party/blink/renderer/platform/geometry/length.h"],
type_name: "Length",
field_group: "*->math",
getter: "GetMathBaseline",
},
{
name: "MathFractionBarThickness",
field_template: "external",
default_value: "Length()",
include_paths: ["third_party/blink/renderer/platform/geometry/length.h"],
type_name: "Length",
field_group: "*->math",
getter: "GetMathFractionBarThickness",
invalidate: ["layout", "paint"],
},
{
name: "MathLSpace",
field_template: "external",
default_value: "Length()",
include_paths: ["third_party/blink/renderer/platform/geometry/length.h"],
type_name: "Length",
field_group: "*->math",
getter: "GetMathLSpace",
invalidate: ["layout", "paint"],
},
{
name: "MathRSpace",
field_template: "external",
default_value: "Length()",
include_paths: ["third_party/blink/renderer/platform/geometry/length.h"],
type_name: "Length",
field_group: "*->math",
getter: "GetMathRSpace",
invalidate: ["layout", "paint"],
},
{
name: "MathPaddedVOffset",
field_template: "external",
default_value: "Length()",
include_paths: ["third_party/blink/renderer/platform/geometry/length.h"],
type_name: "Length",
field_group: "*->math",
getter: "GetMathPaddedVOffset",
invalidate: ["layout", "paint"],
},
{
name: "MathPaddedDepth",
field_template: "external",
default_value: "Length()",
include_paths: ["third_party/blink/renderer/platform/geometry/length.h"],
type_name: "Length",
field_group: "*->math",
getter: "GetMathPaddedDepth",
},
{
name: "MathMinSize",
field_template: "external",
default_value: "Length()",
include_paths: ["third_party/blink/renderer/platform/geometry/length.h"],
type_name: "Length",
field_group: "*->math",
getter: "GetMathMinSize",
invalidate: ["layout", "paint"],
},
{
name: "MathMaxSize",
field_template: "external",
default_value: "Length()",
include_paths: ["third_party/blink/renderer/platform/geometry/length.h"],
type_name: "Length",
field_group: "*->math",
getter: "GetMathMaxSize",
invalidate: ["layout", "paint"],
},
{
name: "EffectiveZIndexZero",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
},
{
name: "BaselineShiftType",
field_group: "svg->misc",
// Use a keyword?
field_template: "primitive",
field_size: 2,
type_name: "EBaselineShiftType",
default_value: "EBaselineShiftType::kLength",
invalidate: ["layout", "paint"],
},
{
// Represents 'dominant-baseline' defined in the css-inline specification,
// not in SVG 1.1 specification.
// This doesn't have 'use-script', 'no-change', and 'reset-size'.
// For now ComputedStyle for non-SVG elemnts always have the initial value
// in order to disable the feature.
name: "CssDominantBaseline",
field_group: "svg",
field_template: "primitive",
field_size: 4,
type_name: "EDominantBaseline",
default_value: "EDominantBaseline::kAuto",
inherited: true,
invalidate: ["layout", "paint"],
},
{
name: "DependsOnSizeContainerQueries",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
},
{
name: "DependsOnStyleContainerQueries",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
},
{
name: "DependsOnStateContainerQueries",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
},
{
// Set to true if this ComputedStyle is for an element whose ::first-line
// style depends on size container queries.
name: "FirstLineDependsOnSizeContainerQueries",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
},
{
name: "BaseData",
inherited: false,
field_template: "pointer",
type_name: "StyleBaseData",
include_paths: ["third_party/blink/renderer/core/style/style_base_data.h"],
default_value: "nullptr",
wrapper_pointer_name: "Member",
custom_compare: true,
reset_on_new_style: true,
},
{
// See style_ua_shadow_host_data.h.
name: "UAShadowHostData",
inherited: true,
field_group: "*",
field_template: "pointer",
type_name: "StyleUAShadowHostData",
include_paths: ["third_party/blink/renderer/core/style/style_ua_shadow_host_data.h"],
default_value: "nullptr",
wrapper_pointer_name: "std::unique_ptr",
},
{
// https://drafts.csswg.org/css-contain-2/#skips-its-contents
name: "SkipsContents",
field_template: "primitive",
type_name: "bool",
default_value: "false",
invalidate: ["layout"],
},
{
// https://html.spec.whatwg.org/multipage/interaction.html#inert
name: "IsInert",
inherited: true,
independent: true,
field_template: "primitive",
type_name: "bool",
default_value: "false",
},
{
// We need to go through LayoutObject::SetStyle with
// ApplyStyleChanges::kYes if the body changes from being the first body
// element to a secondary one because the same style could lead to
// different need for scrollbars depending on whether the body element
// propagates its scrollbars to the viewport or not. This flag is merely
// for making the old and new ComputedStyles different in such a case.
name: "IsSecondaryBodyElement",
field_template: "monotonic_flag",
default_value: "false",
field_group: "*",
},
{
name: "InlineStyleLostCascade",
field_template: "primitive",
type_name: "bool",
field_group: "*",
default_value: "false",
custom_compare: true,
},
{
name: "HasExplicitOverflowXVisible",
field_template: "monotonic_flag",
type_name: "bool",
field_group: "*",
default_value: "false",
},
{
name: "HasExplicitOverflowYVisible",
field_template: "monotonic_flag",
type_name: "bool",
field_group: "*",
default_value: "false",
},
{
name: "IsStartingStyle",
field_template: "monotonic_flag",
type_name: "bool",
field_group: "*",
default_value: "false",
},
{
// Need to persist this flag from MatchResult and set it back on
// StyleResolverState when we hit the MatchedPropertiesCache. Otherwise
// ShouldStoreOldStyle() in StyleResolver will not return the correct
// result.
name: "CanAffectAnimations",
field_template: "monotonic_flag",
type_name: "bool",
field_group: "*",
default_value: "false",
},
{
// https://drafts.csswg.org/css-view-transitions-1/
name: "ElementIsViewTransitionParticipant",
field_template: "monotonic_flag",
field_group: "*",
default_value: "false",
},
// Whether this style contains at least one reference to a (custom)
// CSS function.
{
name: "AffectedByCSSFunction",
field_template: "monotonic_flag",
field_group: "*",
default_value: "false",
},
{
name: "HasAnchorFunctions",
field_template: "monotonic_flag",
field_group: "surround",
default_value: "false",
custom_compare: true,
},
{
// See ComputedStyle::HasAnchorFunctionsWithoutEvaluator.
name: "HasAnchorEvaluator",
field_template: "monotonic_flag",
field_group: "surround",
default_value: "false",
},
{
name: "PositionAreaOffsets",
field_template: "external",
field_group: "*",
include_paths: ["third_party/blink/renderer/core/style/position_area.h"],
default_value: "std::nullopt",
type_name: "std::optional<blink::PositionAreaOffsets>",
custom_compare: true,
},
{
name: "AnchorCenterOffset",
field_template: "external",
field_group: "*",
include_paths: ["third_party/blink/renderer/core/layout/geometry/physical_offset.h"],
default_value: "std::nullopt",
type_name: "std::optional<PhysicalOffset>",
custom_compare: true,
},
// This will return true if a user has enabled a web setting to prefer
// default scrollbar styles.
{
name: "PrefersDefaultScrollbarStyles",
field_template: "primitive",
type_name: "bool",
default_value: "false",
inherited: true,
invalidate: ["layout", "paint", "scrollbar-color"],
},
{
name: "IsPageMarginBox",
field_template: "primitive",
type_name: "bool",
default_value: "false",
inherited: false,
},
],
}