chromium/out/Default/gen/third_party/blink/renderer/core/style/computed_style_base.h

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Generated from template:
//   core/style/templates/computed_style_base.h.tmpl
// and input files:
//   ../../third_party/blink/renderer/core/css/computed_style_field_aliases.json5
//   ../../third_party/blink/renderer/core/css/css_group_config.json5
//   ../../third_party/blink/renderer/core/css/css_properties.json5
//   ../../third_party/blink/renderer/core/css/css_properties_ranking.json5
//   ../../third_party/blink/renderer/core/css/css_value_keywords.json5
//   ../../third_party/blink/renderer/core/style/computed_style_extra_fields.json5
//   ../../third_party/blink/renderer/platform/runtime_enabled_features.json5


#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_STYLE_COMPUTED_STYLE_BASE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_STYLE_COMPUTED_STYLE_BASE_H_

#include "base/memory/values_equivalent.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/style/computed_style_constants.h"
#include "third_party/blink/renderer/core/style/member_copy.h"
#include "third_party/blink/renderer/core/style/computed_style_initial_values.h"
#include "third_party/blink/renderer/core/style/style_cached_data.h"
#include "cc/input/scroll_snap_data.h"
#include "third_party/blink/public/common/css/page_orientation.h"
#include "third_party/blink/public/common/css/page_size_type.h"
#include "third_party/blink/public/mojom/frame/color_scheme.mojom-blink.h"
#include "third_party/blink/public/mojom/scroll/scroll_enums.mojom-blink.h"
#include "third_party/blink/renderer/core/animation/css/css_animation_data.h"
#include "third_party/blink/renderer/core/animation/css/css_transition_data.h"
#include "third_party/blink/renderer/core/animation/effect_model.h"
#include "third_party/blink/renderer/core/animation/timeline_inset.h"
#include "third_party/blink/renderer/core/css/css_property_names.h"
#include "third_party/blink/renderer/core/css/style_auto_color.h"
#include "third_party/blink/renderer/core/css/style_color.h"
#include "third_party/blink/renderer/core/css/style_rule.h"
#include "third_party/blink/renderer/core/css/white_space.h"
#include "third_party/blink/renderer/core/css_value_keywords.h"
#include "third_party/blink/renderer/core/keywords.h"
#include "third_party/blink/renderer/core/layout/geometry/physical_offset.h"
#include "third_party/blink/renderer/core/layout/layout_theme.h"
#include "third_party/blink/renderer/core/style/applied_text_decoration.h"
#include "third_party/blink/renderer/core/style/basic_shapes.h"
#include "third_party/blink/renderer/core/style/clip_path_operation.h"
#include "third_party/blink/renderer/core/style/computed_grid_template_areas.h"
#include "third_party/blink/renderer/core/style/computed_grid_track_list.h"
#include "third_party/blink/renderer/core/style/content_data.h"
#include "third_party/blink/renderer/core/style/counter_directives.h"
#include "third_party/blink/renderer/core/style/cursor_list.h"
#include "third_party/blink/renderer/core/style/fill_layer.h"
#include "third_party/blink/renderer/core/style/filter_operations.h"
#include "third_party/blink/renderer/core/style/grid_position.h"
#include "third_party/blink/renderer/core/style/grid_track_list.h"
#include "third_party/blink/renderer/core/style/list_style_type_data.h"
#include "third_party/blink/renderer/core/style/nine_piece_image.h"
#include "third_party/blink/renderer/core/style/offset_path_operation.h"
#include "third_party/blink/renderer/core/style/paint_images.h"
#include "third_party/blink/renderer/core/style/position_area.h"
#include "third_party/blink/renderer/core/style/position_try_fallbacks.h"
#include "third_party/blink/renderer/core/style/scoped_css_name.h"
#include "third_party/blink/renderer/core/style/scroll_start_data.h"
#include "third_party/blink/renderer/core/style/shadow_list.h"
#include "third_party/blink/renderer/core/style/shape_value.h"
#include "third_party/blink/renderer/core/style/style_aspect_ratio.h"
#include "third_party/blink/renderer/core/style/style_base_data.h"
#include "third_party/blink/renderer/core/style/style_content_alignment_data.h"
#include "third_party/blink/renderer/core/style/style_highlight_data.h"
#include "third_party/blink/renderer/core/style/style_hyphenate_limit_chars.h"
#include "third_party/blink/renderer/core/style/style_image.h"
#include "third_party/blink/renderer/core/style/style_inherited_variables.h"
#include "third_party/blink/renderer/core/style/style_initial_data.h"
#include "third_party/blink/renderer/core/style/style_initial_letter.h"
#include "third_party/blink/renderer/core/style/style_intrinsic_length.h"
#include "third_party/blink/renderer/core/style/style_non_inherited_variables.h"
#include "third_party/blink/renderer/core/style/style_offset_rotation.h"
#include "third_party/blink/renderer/core/style/style_overflow_clip_margin.h"
#include "third_party/blink/renderer/core/style/style_path.h"
#include "third_party/blink/renderer/core/style/style_reflection.h"
#include "third_party/blink/renderer/core/style/style_scrollbar_color.h"
#include "third_party/blink/renderer/core/style/style_self_alignment_data.h"
#include "third_party/blink/renderer/core/style/style_svg_resource.h"
#include "third_party/blink/renderer/core/style/style_ua_shadow_host_data.h"
#include "third_party/blink/renderer/core/style/style_view_transition_group.h"
#include "third_party/blink/renderer/core/style/svg_dash_array.h"
#include "third_party/blink/renderer/core/style/svg_paint.h"
#include "third_party/blink/renderer/core/style/text_box_edge.h"
#include "third_party/blink/renderer/core/style/text_decoration_thickness.h"
#include "third_party/blink/renderer/core/style/text_size_adjust.h"
#include "third_party/blink/renderer/core/style/transform_origin.h"
#include "third_party/blink/renderer/core/style/unzoomed_length.h"
#include "third_party/blink/renderer/platform/fonts/font.h"
#include "third_party/blink/renderer/platform/fonts/shaping/text_spacing_trim.h"
#include "third_party/blink/renderer/platform/geometry/layout_unit.h"
#include "third_party/blink/renderer/platform/geometry/length.h"
#include "third_party/blink/renderer/platform/geometry/length_box.h"
#include "third_party/blink/renderer/platform/geometry/length_point.h"
#include "third_party/blink/renderer/platform/geometry/length_size.h"
#include "third_party/blink/renderer/platform/graphics/graphics_types.h"
#include "third_party/blink/renderer/platform/graphics/image_orientation.h"
#include "third_party/blink/renderer/platform/graphics/touch_action.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_set.h"
#include "third_party/blink/renderer/platform/heap/member.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/text/quotes_data.h"
#include "third_party/blink/renderer/platform/text/tab_size.h"
#include "third_party/blink/renderer/platform/text/text_direction.h"
#include "third_party/blink/renderer/platform/text/unicode_bidi.h"
#include "third_party/blink/renderer/platform/text/writing_mode.h"
#include "third_party/blink/renderer/platform/theme_types.h"
#include "third_party/blink/renderer/platform/transforms/rotate_transform_operation.h"
#include "third_party/blink/renderer/platform/transforms/scale_transform_operation.h"
#include "third_party/blink/renderer/platform/transforms/transform_operations.h"
#include "third_party/blink/renderer/platform/transforms/translate_transform_operation.h"
#include "third_party/blink/renderer/platform/wtf/hash_set.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "ui/gfx/geometry/size_f.h"


namespace blink {

// Forward declaration for diff functions.
class ComputedStyle;

// Forward declaration for constructor.
class ComputedStyleBuilderBase;

// Forward declaration of friends:
namespace css_longhand { class Position; }
namespace css_longhand { class Appearance; }
namespace css_longhand { class Color; }
namespace css_longhand { class InternalVisitedColor; }
namespace css_longhand { class AccentColor; }
namespace css_longhand { class BackdropFilter; }
namespace css_longhand { class BackgroundColor; }
namespace css_longhand { class BorderBottomColor; }
namespace css_longhand { class BorderBottomWidth; }
namespace css_longhand { class BorderLeftColor; }
namespace css_longhand { class BorderLeftWidth; }
namespace css_longhand { class BorderRightColor; }
namespace css_longhand { class BorderRightWidth; }
namespace css_longhand { class BorderTopColor; }
namespace css_longhand { class BorderTopWidth; }
namespace css_longhand { class CaretColor; }
namespace css_longhand { class Clear; }
namespace css_longhand { class Clip; }
namespace css_longhand { class ClipPath; }
namespace css_longhand { class ColumnCount; }
namespace css_longhand { class ColumnRuleColor; }
namespace css_longhand { class ColumnRuleWidth; }
namespace css_longhand { class ColumnWidth; }
namespace css_longhand { class Content; }
namespace css_longhand { class Filter; }
namespace css_longhand { class Float; }
namespace css_longhand { class GridAutoFlow; }
namespace css_longhand { class InternalForcedBackgroundColor; }
namespace css_longhand { class InternalForcedBorderColor; }
namespace css_longhand { class InternalForcedColor; }
namespace css_longhand { class InternalForcedOutlineColor; }
namespace css_longhand { class InternalForcedVisitedColor; }
namespace css_longhand { class InternalVisitedBackgroundColor; }
namespace css_longhand { class InternalVisitedBorderBottomColor; }
namespace css_longhand { class InternalVisitedBorderLeftColor; }
namespace css_longhand { class InternalVisitedBorderRightColor; }
namespace css_longhand { class InternalVisitedBorderTopColor; }
namespace css_longhand { class InternalVisitedCaretColor; }
namespace css_longhand { class InternalVisitedColumnRuleColor; }
namespace css_longhand { class InternalVisitedOutlineColor; }
namespace css_longhand { class InternalVisitedTextDecorationColor; }
namespace css_longhand { class InternalVisitedTextEmphasisColor; }
namespace css_longhand { class InternalVisitedTextFillColor; }
namespace css_longhand { class InternalVisitedTextStrokeColor; }
namespace css_longhand { class LineClamp; }
namespace css_longhand { class LineHeight; }
namespace css_longhand { class MarginBottom; }
namespace css_longhand { class MarginLeft; }
namespace css_longhand { class MarginRight; }
namespace css_longhand { class MarginTop; }
namespace css_longhand { class Opacity; }
namespace css_longhand { class Orphans; }
namespace css_longhand { class OutlineColor; }
namespace css_longhand { class OutlineWidth; }
namespace css_longhand { class PaddingBottom; }
namespace css_longhand { class PaddingLeft; }
namespace css_longhand { class PaddingRight; }
namespace css_longhand { class PaddingTop; }
namespace css_longhand { class PointerEvents; }
namespace css_longhand { class Resize; }
namespace css_longhand { class ShapeImageThreshold; }
namespace css_longhand { class ShapeOutside; }
namespace css_longhand { class StopColor; }
namespace css_longhand { class TabSize; }
namespace css_longhand { class TextDecorationColor; }
namespace css_longhand { class TextEmphasisColor; }
namespace css_longhand { class UserSelect; }
namespace css_longhand { class WebkitBoxDirection; }
namespace css_longhand { class WebkitBoxOrdinalGroup; }
namespace css_longhand { class WebkitTextFillColor; }
namespace css_longhand { class WebkitTextStrokeColor; }
namespace css_longhand { class WebkitUserModify; }
namespace css_longhand { class Widows; }
namespace css_longhand { class ZIndex; }

// The generated portion of ComputedStyle. For more info, see the header comment
// in computed_style.h.
//
// ComputedStyleBase is a generated class that stores data members or 'fields'
// used in ComputedStyle. These fields can represent CSS properties or internal
// style information.
//
// STORAGE:
//
// Fields are organised in a tree structure, where a node (called a 'group')
// stores a set of fields and a set of pointers to child nodes (called
// 'subgroups'). We can visualise the tree structure with ComputedStyleBase as
// the root node:
//
// ComputedStyleBase (fields: display, vertical-align, ...)
//  |- StyleSurroundData (fields: border-color, left/right/top/bottom, ...)
//  |- StyleBoxData (fields: width, height, padding, ...)
//  |- ...
//  |- StyleRareNonInheritedData (fields: box-shadow, text-overflow, ...)
//      |- StyleFlexibleBoxData (fields: flex-direction, flex-wrap, ...)
//      |- ...
//
// This design saves memory by allowing multiple ComputedStyleBases to share the
// same instance of a subgroup. For example, if a page never uses flex box
// properties, then every ComputedStyleBase can share the same instance of
// StyleFlexibleBoxData. Without this sharing, we would need to allocate a copy
// of all the flex box fields for every ComputedStyleBase. Similarly, when an
// element inherits from its parent, its ComputedStyleBase can simply share all
// of its subgroups with the parent's.
//
// Most of these groupings are done manually, although there have been some
// adjustments based on statistics.
//
// INTERFACE:
//
// The functions generated for a field is determined by its 'template'. For
// example, a field with the 'keyword' template has only one setter, whereas an
// 'external' field has an extra setter that takes an rvalue reference. A list
// of the available templates can be found in css_properties.json5.
class ComputedStyleBase : public GarbageCollected<ComputedStyleBase> {};

class ComputedStyleBuilderBase {};

}  // namespace blink

namespace blink {
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleBackgroundData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleBoxData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleFillData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleFontData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleForcedColorsData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleGeometryData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleGridData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleHighlightDataData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleInheritedData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleInheritedForcedColorsData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleInheritedResourcesData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleInheritedVisitedData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleMasonryData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleMathData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleMiscData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleRareInheritedUsageLessThan100PercentData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleRareInheritedUsageLessThan64PercentData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleRareInheritedUsageLessThan64PercentSubData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleRareNonInheritedUsageLessThan100PercentData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleRareNonInheritedUsageLessThan14PercentData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleRareNonInheritedUsageLessThan14PercentSubData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleRareNonInheritedUsageLessThan22PercentData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleStartData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleStopData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleStrokeData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleSurroundData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleSVGData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleTargetData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleTimelineData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleVisitedData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleVisualData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase::StyleWillChangeData, T>::value>>;
ThreadingTrait<T, std::enable_if_t<std::is_base_of<blink::ComputedStyleBase, T>::value>>;
}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_STYLE_COMPUTED_STYLE_BASE_H_