Created
June 15, 2017 07:09
-
-
Save darrnshn/306bffcc27ca5a1ae5f1b2019750cd60 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
#ifndef ComputedStyleBase_h | |
#define ComputedStyleBase_h | |
#include "core/style/ComputedStyleConstants.h" | |
#include "core/CoreExport.h" | |
#include "core/style/DataRef.h" | |
#include "core/style/MemberCopy.h" | |
#include "core/style/DataPersistent.h" | |
#include "core/style/StyleDifference.h" | |
#include "platform/wtf/SizeAssertions.h" | |
#include "core/layout/LayoutTheme.h" | |
#include "core/CSSPropertyNames.h" | |
#include "core/animation/css/CSSAnimationData.h" | |
#include "core/animation/css/CSSTransitionData.h" | |
#include "core/css/StyleColor.h" | |
#include "core/style/AppliedTextDecorationList.h" | |
#include "core/style/ClipPathOperation.h" | |
#include "core/style/ContentData.h" | |
#include "core/style/CounterDirectives.h" | |
#include "core/style/CursorList.h" | |
#include "core/style/FillLayer.h" | |
#include "core/style/LineClampValue.h" | |
#include "core/style/NinePieceImage.h" | |
#include "core/style/OutlineValue.h" | |
#include "core/style/PaintImages.h" | |
#include "core/style/QuotesData.h" | |
#include "core/style/ShadowList.h" | |
#include "core/style/ShapeValue.h" | |
#include "core/style/StyleContentAlignmentData.h" | |
#include "core/style/StyleFilterData.h" | |
#include "core/style/StyleFlexibleBoxData.h" | |
#include "core/style/StyleGridData.h" | |
#include "core/style/StyleGridItemData.h" | |
#include "core/style/StyleInheritedVariables.h" | |
#include "core/style/StyleMultiColData.h" | |
#include "core/style/StyleNonInheritedVariables.h" | |
#include "core/style/StyleReflection.h" | |
#include "core/style/StyleScrollSnapData.h" | |
#include "core/style/StyleSelfAlignmentData.h" | |
#include "core/style/StyleTransformData.h" | |
#include "core/style/TextSizeAdjust.h" | |
#include "platform/LayoutUnit.h" | |
#include "platform/Length.h" | |
#include "platform/LengthBox.h" | |
#include "platform/LengthPoint.h" | |
#include "platform/LengthSize.h" | |
#include "platform/fonts/Font.h" | |
#include "platform/geometry/FloatSize.h" | |
#include "platform/graphics/Color.h" | |
#include "platform/graphics/TouchAction.h" | |
#include "platform/text/TabSize.h" | |
#include "platform/text/TextDirection.h" | |
#include "platform/text/TextJustify.h" | |
#include "platform/text/UnicodeBidi.h" | |
#include "platform/text/WritingMode.h" | |
#include "platform/wtf/Vector.h" | |
#include "platform/wtf/text/AtomicString.h" | |
#include "platform/wtf/text/WTFString.h" | |
#include "public/platform/WebBlendMode.h" | |
namespace blink { | |
// Forward declaration for diff functions. | |
class ComputedStyle; | |
// The generated portion of ComputedStyle. For more info, see the header comment | |
// in ComputedStyle.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: padding, border, ...) | |
// |- StyleBoxData (fields: width, height, ...) | |
// |- ... | |
// |- 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. | |
// | |
// 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 CSSProperties.json5. | |
class CORE_EXPORT ComputedStyleBase { | |
public: | |
inline bool IndependentInheritedEqual(const ComputedStyleBase& o) const { | |
return ( | |
pointer_events_ == o.pointer_events_ | |
&& white_space_ == o.white_space_ | |
&& text_transform_ == o.text_transform_ | |
&& visibility_ == o.visibility_ | |
&& border_collapse_ == o.border_collapse_ | |
&& box_direction_ == o.box_direction_ | |
&& caption_side_ == o.caption_side_ | |
&& empty_cells_ == o.empty_cells_ | |
&& list_style_position_ == o.list_style_position_ | |
&& print_color_adjust_ == o.print_color_adjust_ | |
&& rtl_ordering_ == o.rtl_ordering_ | |
); | |
} | |
inline bool NonIndependentInheritedEqual(const ComputedStyleBase& o) const { | |
return ( | |
rare_inherited_data_ == o.rare_inherited_data_ | |
&& inherited_data_ == o.inherited_data_ | |
&& cursor_ == o.cursor_ | |
&& list_style_type_ == o.list_style_type_ | |
&& text_align_ == o.text_align_ | |
&& inside_link_ == o.inside_link_ | |
&& writing_mode_ == o.writing_mode_ | |
&& direction_ == o.direction_ | |
&& has_simple_underline_ == o.has_simple_underline_ | |
); | |
} | |
inline bool InheritedEqual(const ComputedStyleBase& o) const { | |
return IndependentInheritedEqual(o) && NonIndependentInheritedEqual(o); | |
} | |
inline bool NonInheritedEqual(const ComputedStyleBase& o) const { | |
return ( | |
box_data_ == o.box_data_ | |
&& rare_non_inherited_data_ == o.rare_non_inherited_data_ | |
&& surround_data_ == o.surround_data_ | |
&& visual_data_ == o.visual_data_ | |
&& background_data_ == o.background_data_ | |
&& display_ == o.display_ | |
&& original_display_ == o.original_display_ | |
&& break_after_ == o.break_after_ | |
&& break_before_ == o.break_before_ | |
&& vertical_align_ == o.vertical_align_ | |
&& overflow_x_ == o.overflow_x_ | |
&& overflow_y_ == o.overflow_y_ | |
&& position_ == o.position_ | |
&& unicode_bidi_ == o.unicode_bidi_ | |
&& break_inside_ == o.break_inside_ | |
&& clear_ == o.clear_ | |
&& floating_ == o.floating_ | |
&& overflow_anchor_ == o.overflow_anchor_ | |
&& transform_box_ == o.transform_box_ | |
&& table_layout_ == o.table_layout_ | |
); | |
} | |
inline bool InheritedDataShared(const ComputedStyleBase& o) const { | |
return ( | |
rare_inherited_data_.Get() == o.rare_inherited_data_.Get() | |
&& inherited_data_.Get() == o.inherited_data_.Get() | |
&& cursor_ == o.cursor_ | |
&& list_style_type_ == o.list_style_type_ | |
&& pointer_events_ == o.pointer_events_ | |
&& text_align_ == o.text_align_ | |
&& white_space_ == o.white_space_ | |
&& inside_link_ == o.inside_link_ | |
&& text_transform_ == o.text_transform_ | |
&& visibility_ == o.visibility_ | |
&& writing_mode_ == o.writing_mode_ | |
&& border_collapse_ == o.border_collapse_ | |
&& box_direction_ == o.box_direction_ | |
&& caption_side_ == o.caption_side_ | |
&& direction_ == o.direction_ | |
&& empty_cells_ == o.empty_cells_ | |
&& has_simple_underline_ == o.has_simple_underline_ | |
&& list_style_position_ == o.list_style_position_ | |
&& print_color_adjust_ == o.print_color_adjust_ | |
&& rtl_ordering_ == o.rtl_ordering_ | |
); | |
} | |
enum IsAtShadowBoundary { | |
kAtShadowBoundary, | |
kNotAtShadowBoundary, | |
}; | |
void InheritFrom(const ComputedStyleBase& other, | |
IsAtShadowBoundary isAtShadowBoundary); | |
void CopyNonInheritedFromCached( | |
const ComputedStyleBase& other); | |
// Copies the values of any independent inherited properties from the parent | |
// style that are marked as inherited by this style. | |
void PropagateIndependentInheritedProperties( | |
const ComputedStyleBase& parentStyle); | |
static bool DiffNeedsVisualRectUpdate(const ComputedStyle& a, const ComputedStyle& b); | |
static bool UpdatePropertySpecificDifferencesOpacity(const ComputedStyle& a, const ComputedStyle& b); | |
static bool UpdatePropertySpecificDifferencesFilter(const ComputedStyle& a, const ComputedStyle& b); | |
static bool UpdatePropertySpecificDifferencesTextDecorationOrColor(const ComputedStyle& a, const ComputedStyle& b); | |
static bool DiffNeedsFullLayout(const ComputedStyle& a, const ComputedStyle& b); | |
static bool UpdatePropertySpecificDifferencesZIndex(const ComputedStyle& a, const ComputedStyle& b); | |
static bool DiffNeedsFullLayoutAndPaintInvalidationDisplayListItem(const ComputedStyle& a, const ComputedStyle& b); | |
static bool UpdatePropertySpecificDifferencesNeedsRecomputeOverflow(const ComputedStyle& a, const ComputedStyle& b); | |
static bool DiffNeedsPaintInvalidationSubtree(const ComputedStyle& a, const ComputedStyle& b); | |
static bool DiffNeedsPaintInvalidationObject(const ComputedStyle& a, const ComputedStyle& b); | |
static bool ScrollAnchorDisablingPropertyChanged(const ComputedStyle& a, const ComputedStyle& b); | |
static bool DiffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& a, const ComputedStyle& b); | |
static bool DiffNeedsFullLayoutAndPaintInvalidationDisplayTableType(const ComputedStyle& a, const ComputedStyle& b); | |
static bool UpdatePropertySpecificDifferencesBackdropFilter(const ComputedStyle& a, const ComputedStyle& b); | |
// Fields. | |
// TODO(sashab): Remove initialFoo() static methods and update callers to | |
// use resetFoo(), which can be more efficient. | |
// AffectedByActive | |
bool AffectedByActive() const { | |
return static_cast<bool>(affected_by_active_); | |
} | |
void SetAffectedByActive() { | |
affected_by_active_ = static_cast<unsigned>(true); | |
} | |
// AffectedByDrag | |
bool AffectedByDrag() const { | |
return static_cast<bool>(affected_by_drag_); | |
} | |
void SetAffectedByDrag() { | |
affected_by_drag_ = static_cast<unsigned>(true); | |
} | |
// AffectedByFocusWithin | |
bool AffectedByFocusWithin() const { | |
return static_cast<bool>(affected_by_focus_within_); | |
} | |
void SetAffectedByFocusWithin() { | |
affected_by_focus_within_ = static_cast<unsigned>(true); | |
} | |
// AffectedByHover | |
bool AffectedByHover() const { | |
return static_cast<bool>(affected_by_hover_); | |
} | |
void SetAffectedByHover() { | |
affected_by_hover_ = static_cast<unsigned>(true); | |
} | |
// align-content | |
// Getters and setters not generated | |
// align-items | |
// Getters and setters not generated | |
// align-self | |
// Getters and setters not generated | |
// Animations | |
// Getters and setters not generated | |
// -webkit-appearance | |
// Getters and setters not generated | |
// AppliedTextDecorations | |
// Getters and setters not generated | |
// BackdropFilter | |
// Getters and setters not generated | |
// backface-visibility | |
// Getters and setters not generated | |
// Background | |
// Getters and setters not generated | |
// BackgroundColor | |
// Getters and setters not generated | |
// border-bottom-color | |
// Getters and setters not generated | |
// BorderBottomColorIsCurrentColor | |
inline static bool InitialBorderBottomColorIsCurrentColor() { | |
return true; | |
} | |
bool BorderBottomColorIsCurrentColor() const { | |
return static_cast<bool>(surround_data_->border_bottom_color_is_current_color_); | |
} | |
void SetBorderBottomColorIsCurrentColor(bool v) { | |
if (!(surround_data_->border_bottom_color_is_current_color_ == static_cast<unsigned>(v))) | |
surround_data_.Access()->border_bottom_color_is_current_color_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBorderBottomColorIsCurrentColor() { | |
surround_data_.Access()->border_bottom_color_is_current_color_ = static_cast<unsigned>(true); | |
} | |
// border-bottom-left-radius | |
inline static LengthSize InitialBorderBottomLeftRadius() { | |
return LengthSize(Length(0, kFixed), Length(0, kFixed)); | |
} | |
const LengthSize& BorderBottomLeftRadius() const { | |
return surround_data_->border_bottom_left_radius_; | |
} | |
void SetBorderBottomLeftRadius(const LengthSize& v) { | |
if (!(surround_data_->border_bottom_left_radius_ == v)) | |
surround_data_.Access()->border_bottom_left_radius_ = v; | |
} | |
void SetBorderBottomLeftRadius(LengthSize&& v) { | |
if (!(surround_data_->border_bottom_left_radius_ == v)) | |
surround_data_.Access()->border_bottom_left_radius_ = std::move(v); | |
} | |
inline void ResetBorderBottomLeftRadius() { | |
surround_data_.Access()->border_bottom_left_radius_ = LengthSize(Length(0, kFixed), Length(0, kFixed)); | |
} | |
// border-bottom-right-radius | |
inline static LengthSize InitialBorderBottomRightRadius() { | |
return LengthSize(Length(0, kFixed), Length(0, kFixed)); | |
} | |
const LengthSize& BorderBottomRightRadius() const { | |
return surround_data_->border_bottom_right_radius_; | |
} | |
void SetBorderBottomRightRadius(const LengthSize& v) { | |
if (!(surround_data_->border_bottom_right_radius_ == v)) | |
surround_data_.Access()->border_bottom_right_radius_ = v; | |
} | |
void SetBorderBottomRightRadius(LengthSize&& v) { | |
if (!(surround_data_->border_bottom_right_radius_ == v)) | |
surround_data_.Access()->border_bottom_right_radius_ = std::move(v); | |
} | |
inline void ResetBorderBottomRightRadius() { | |
surround_data_.Access()->border_bottom_right_radius_ = LengthSize(Length(0, kFixed), Length(0, kFixed)); | |
} | |
// border-bottom-style | |
inline static EBorderStyle InitialBorderBottomStyle() { | |
return EBorderStyle::kNone; | |
} | |
EBorderStyle BorderBottomStyle() const { | |
return static_cast<EBorderStyle>(surround_data_->border_bottom_style_); | |
} | |
void SetBorderBottomStyle(EBorderStyle v) { | |
if (!(surround_data_->border_bottom_style_ == static_cast<unsigned>(v))) | |
surround_data_.Access()->border_bottom_style_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBorderBottomStyle() { | |
surround_data_.Access()->border_bottom_style_ = static_cast<unsigned>(EBorderStyle::kNone); | |
} | |
// border-bottom-width | |
// Getters and setters not generated | |
// border-collapse | |
inline static EBorderCollapse InitialBorderCollapse() { | |
return EBorderCollapse::kSeparate; | |
} | |
EBorderCollapse BorderCollapse() const { | |
return static_cast<EBorderCollapse>(border_collapse_); | |
} | |
void SetBorderCollapse(EBorderCollapse v) { | |
border_collapse_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBorderCollapse() { | |
border_collapse_ = static_cast<unsigned>(EBorderCollapse::kSeparate); | |
} | |
// border-collapse | |
inline static bool InitialBorderCollapseIsInherited() { | |
return true; | |
} | |
bool BorderCollapseIsInherited() const { | |
return static_cast<bool>(border_collapse_is_inherited_); | |
} | |
void SetBorderCollapseIsInherited(bool v) { | |
border_collapse_is_inherited_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBorderCollapseIsInherited() { | |
border_collapse_is_inherited_ = static_cast<unsigned>(true); | |
} | |
// border-image | |
inline static NinePieceImage InitialBorderImage() { | |
return NinePieceImage(); | |
} | |
const NinePieceImage& BorderImage() const { | |
return surround_data_->border_image_; | |
} | |
void SetBorderImage(const NinePieceImage& v) { | |
if (!(surround_data_->border_image_ == v)) | |
surround_data_.Access()->border_image_ = v; | |
} | |
void SetBorderImage(NinePieceImage&& v) { | |
if (!(surround_data_->border_image_ == v)) | |
surround_data_.Access()->border_image_ = std::move(v); | |
} | |
inline void ResetBorderImage() { | |
surround_data_.Access()->border_image_ = NinePieceImage(); | |
} | |
// border-left-color | |
// Getters and setters not generated | |
// BorderLeftColorIsCurrentColor | |
inline static bool InitialBorderLeftColorIsCurrentColor() { | |
return true; | |
} | |
bool BorderLeftColorIsCurrentColor() const { | |
return static_cast<bool>(surround_data_->border_left_color_is_current_color_); | |
} | |
void SetBorderLeftColorIsCurrentColor(bool v) { | |
if (!(surround_data_->border_left_color_is_current_color_ == static_cast<unsigned>(v))) | |
surround_data_.Access()->border_left_color_is_current_color_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBorderLeftColorIsCurrentColor() { | |
surround_data_.Access()->border_left_color_is_current_color_ = static_cast<unsigned>(true); | |
} | |
// border-left-style | |
inline static EBorderStyle InitialBorderLeftStyle() { | |
return EBorderStyle::kNone; | |
} | |
EBorderStyle BorderLeftStyle() const { | |
return static_cast<EBorderStyle>(surround_data_->border_left_style_); | |
} | |
void SetBorderLeftStyle(EBorderStyle v) { | |
if (!(surround_data_->border_left_style_ == static_cast<unsigned>(v))) | |
surround_data_.Access()->border_left_style_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBorderLeftStyle() { | |
surround_data_.Access()->border_left_style_ = static_cast<unsigned>(EBorderStyle::kNone); | |
} | |
// border-left-width | |
// Getters and setters not generated | |
// border-right-color | |
// Getters and setters not generated | |
// BorderRightColorIsCurrentColor | |
inline static bool InitialBorderRightColorIsCurrentColor() { | |
return true; | |
} | |
bool BorderRightColorIsCurrentColor() const { | |
return static_cast<bool>(surround_data_->border_right_color_is_current_color_); | |
} | |
void SetBorderRightColorIsCurrentColor(bool v) { | |
if (!(surround_data_->border_right_color_is_current_color_ == static_cast<unsigned>(v))) | |
surround_data_.Access()->border_right_color_is_current_color_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBorderRightColorIsCurrentColor() { | |
surround_data_.Access()->border_right_color_is_current_color_ = static_cast<unsigned>(true); | |
} | |
// border-right-style | |
inline static EBorderStyle InitialBorderRightStyle() { | |
return EBorderStyle::kNone; | |
} | |
EBorderStyle BorderRightStyle() const { | |
return static_cast<EBorderStyle>(surround_data_->border_right_style_); | |
} | |
void SetBorderRightStyle(EBorderStyle v) { | |
if (!(surround_data_->border_right_style_ == static_cast<unsigned>(v))) | |
surround_data_.Access()->border_right_style_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBorderRightStyle() { | |
surround_data_.Access()->border_right_style_ = static_cast<unsigned>(EBorderStyle::kNone); | |
} | |
// border-right-width | |
// Getters and setters not generated | |
// border-top-color | |
// Getters and setters not generated | |
// BorderTopColorIsCurrentColor | |
inline static bool InitialBorderTopColorIsCurrentColor() { | |
return true; | |
} | |
bool BorderTopColorIsCurrentColor() const { | |
return static_cast<bool>(surround_data_->border_top_color_is_current_color_); | |
} | |
void SetBorderTopColorIsCurrentColor(bool v) { | |
if (!(surround_data_->border_top_color_is_current_color_ == static_cast<unsigned>(v))) | |
surround_data_.Access()->border_top_color_is_current_color_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBorderTopColorIsCurrentColor() { | |
surround_data_.Access()->border_top_color_is_current_color_ = static_cast<unsigned>(true); | |
} | |
// border-top-left-radius | |
inline static LengthSize InitialBorderTopLeftRadius() { | |
return LengthSize(Length(0, kFixed), Length(0, kFixed)); | |
} | |
const LengthSize& BorderTopLeftRadius() const { | |
return surround_data_->border_top_left_radius_; | |
} | |
void SetBorderTopLeftRadius(const LengthSize& v) { | |
if (!(surround_data_->border_top_left_radius_ == v)) | |
surround_data_.Access()->border_top_left_radius_ = v; | |
} | |
void SetBorderTopLeftRadius(LengthSize&& v) { | |
if (!(surround_data_->border_top_left_radius_ == v)) | |
surround_data_.Access()->border_top_left_radius_ = std::move(v); | |
} | |
inline void ResetBorderTopLeftRadius() { | |
surround_data_.Access()->border_top_left_radius_ = LengthSize(Length(0, kFixed), Length(0, kFixed)); | |
} | |
// border-top-right-radius | |
inline static LengthSize InitialBorderTopRightRadius() { | |
return LengthSize(Length(0, kFixed), Length(0, kFixed)); | |
} | |
const LengthSize& BorderTopRightRadius() const { | |
return surround_data_->border_top_right_radius_; | |
} | |
void SetBorderTopRightRadius(const LengthSize& v) { | |
if (!(surround_data_->border_top_right_radius_ == v)) | |
surround_data_.Access()->border_top_right_radius_ = v; | |
} | |
void SetBorderTopRightRadius(LengthSize&& v) { | |
if (!(surround_data_->border_top_right_radius_ == v)) | |
surround_data_.Access()->border_top_right_radius_ = std::move(v); | |
} | |
inline void ResetBorderTopRightRadius() { | |
surround_data_.Access()->border_top_right_radius_ = LengthSize(Length(0, kFixed), Length(0, kFixed)); | |
} | |
// border-top-style | |
inline static EBorderStyle InitialBorderTopStyle() { | |
return EBorderStyle::kNone; | |
} | |
EBorderStyle BorderTopStyle() const { | |
return static_cast<EBorderStyle>(surround_data_->border_top_style_); | |
} | |
void SetBorderTopStyle(EBorderStyle v) { | |
if (!(surround_data_->border_top_style_ == static_cast<unsigned>(v))) | |
surround_data_.Access()->border_top_style_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBorderTopStyle() { | |
surround_data_.Access()->border_top_style_ = static_cast<unsigned>(EBorderStyle::kNone); | |
} | |
// border-top-width | |
// Getters and setters not generated | |
// bottom | |
inline static Length InitialBottom() { | |
return Length(); | |
} | |
const Length& Bottom() const { | |
return surround_data_->bottom_; | |
} | |
void SetBottom(const Length& v) { | |
if (!(surround_data_->bottom_ == v)) | |
surround_data_.Access()->bottom_ = v; | |
} | |
void SetBottom(Length&& v) { | |
if (!(surround_data_->bottom_ == v)) | |
surround_data_.Access()->bottom_ = std::move(v); | |
} | |
inline void ResetBottom() { | |
surround_data_.Access()->bottom_ = Length(); | |
} | |
// -webkit-box-align | |
// Getters and setters not generated | |
// -webkit-box-decoration-break | |
inline static EBoxDecorationBreak InitialBoxDecorationBreak() { | |
return EBoxDecorationBreak::kSlice; | |
} | |
EBoxDecorationBreak BoxDecorationBreak() const { | |
return static_cast<EBoxDecorationBreak>(box_data_->box_decoration_break_); | |
} | |
void SetBoxDecorationBreak(EBoxDecorationBreak v) { | |
if (!(box_data_->box_decoration_break_ == static_cast<unsigned>(v))) | |
box_data_.Access()->box_decoration_break_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBoxDecorationBreak() { | |
box_data_.Access()->box_decoration_break_ = static_cast<unsigned>(EBoxDecorationBreak::kSlice); | |
} | |
// -webkit-box-direction | |
inline static EBoxDirection InitialBoxDirection() { | |
return EBoxDirection::kNormal; | |
} | |
EBoxDirection BoxDirection() const { | |
return static_cast<EBoxDirection>(box_direction_); | |
} | |
void SetBoxDirection(EBoxDirection v) { | |
box_direction_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBoxDirection() { | |
box_direction_ = static_cast<unsigned>(EBoxDirection::kNormal); | |
} | |
// -webkit-box-direction | |
inline static bool InitialBoxDirectionIsInherited() { | |
return true; | |
} | |
bool BoxDirectionIsInherited() const { | |
return static_cast<bool>(box_direction_is_inherited_); | |
} | |
void SetBoxDirectionIsInherited(bool v) { | |
box_direction_is_inherited_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBoxDirectionIsInherited() { | |
box_direction_is_inherited_ = static_cast<unsigned>(true); | |
} | |
// -webkit-box-flex | |
// Getters and setters not generated | |
// -webkit-box-flex-group | |
// Getters and setters not generated | |
// -webkit-box-lines | |
// Getters and setters not generated | |
// -webkit-box-ordinal-group | |
// Getters and setters not generated | |
// -webkit-box-orient | |
// Getters and setters not generated | |
// -webkit-box-pack | |
// Getters and setters not generated | |
// -webkit-box-reflect | |
// Getters and setters not generated | |
// box-shadow | |
// Getters and setters not generated | |
// box-sizing | |
inline static EBoxSizing InitialBoxSizing() { | |
return EBoxSizing::kContentBox; | |
} | |
EBoxSizing BoxSizing() const { | |
return static_cast<EBoxSizing>(box_data_->box_sizing_); | |
} | |
void SetBoxSizing(EBoxSizing v) { | |
if (!(box_data_->box_sizing_ == static_cast<unsigned>(v))) | |
box_data_.Access()->box_sizing_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBoxSizing() { | |
box_data_.Access()->box_sizing_ = static_cast<unsigned>(EBoxSizing::kContentBox); | |
} | |
// break-after | |
inline static EBreakBetween InitialBreakAfter() { | |
return EBreakBetween::kAuto; | |
} | |
EBreakBetween BreakAfter() const { | |
return static_cast<EBreakBetween>(break_after_); | |
} | |
void SetBreakAfter(EBreakBetween v) { | |
break_after_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBreakAfter() { | |
break_after_ = static_cast<unsigned>(EBreakBetween::kAuto); | |
} | |
// break-before | |
inline static EBreakBetween InitialBreakBefore() { | |
return EBreakBetween::kAuto; | |
} | |
EBreakBetween BreakBefore() const { | |
return static_cast<EBreakBetween>(break_before_); | |
} | |
void SetBreakBefore(EBreakBetween v) { | |
break_before_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBreakBefore() { | |
break_before_ = static_cast<unsigned>(EBreakBetween::kAuto); | |
} | |
// break-inside | |
inline static EBreakInside InitialBreakInside() { | |
return EBreakInside::kAuto; | |
} | |
EBreakInside BreakInside() const { | |
return static_cast<EBreakInside>(break_inside_); | |
} | |
void SetBreakInside(EBreakInside v) { | |
break_inside_ = static_cast<unsigned>(v); | |
} | |
inline void ResetBreakInside() { | |
break_inside_ = static_cast<unsigned>(EBreakInside::kAuto); | |
} | |
// CallbackSelectors | |
// Getters and setters not generated | |
// caption-side | |
inline static ECaptionSide InitialCaptionSide() { | |
return ECaptionSide::kTop; | |
} | |
ECaptionSide CaptionSide() const { | |
return static_cast<ECaptionSide>(caption_side_); | |
} | |
void SetCaptionSide(ECaptionSide v) { | |
caption_side_ = static_cast<unsigned>(v); | |
} | |
inline void ResetCaptionSide() { | |
caption_side_ = static_cast<unsigned>(ECaptionSide::kTop); | |
} | |
// caption-side | |
inline static bool InitialCaptionSideIsInherited() { | |
return true; | |
} | |
bool CaptionSideIsInherited() const { | |
return static_cast<bool>(caption_side_is_inherited_); | |
} | |
void SetCaptionSideIsInherited(bool v) { | |
caption_side_is_inherited_ = static_cast<unsigned>(v); | |
} | |
inline void ResetCaptionSideIsInherited() { | |
caption_side_is_inherited_ = static_cast<unsigned>(true); | |
} | |
// caret-color | |
// Getters and setters not generated | |
// CaretColorIsAuto | |
// Getters and setters not generated | |
// CaretColorIsCurrentColor | |
// Getters and setters not generated | |
// clear | |
inline static EClear InitialClear() { | |
return EClear::kNone; | |
} | |
EClear Clear() const { | |
return static_cast<EClear>(clear_); | |
} | |
void SetClear(EClear v) { | |
clear_ = static_cast<unsigned>(v); | |
} | |
inline void ResetClear() { | |
clear_ = static_cast<unsigned>(EClear::kNone); | |
} | |
// clip | |
// Getters and setters not generated | |
// clip-path | |
// Getters and setters not generated | |
// color | |
// Getters and setters not generated | |
// contain | |
// Getters and setters not generated | |
// content | |
// Getters and setters not generated | |
// CounterDirectives | |
// Getters and setters not generated | |
// cursor | |
inline static ECursor InitialCursor() { | |
return ECursor::kAuto; | |
} | |
ECursor Cursor() const { | |
return static_cast<ECursor>(cursor_); | |
} | |
void SetCursor(ECursor v) { | |
cursor_ = static_cast<unsigned>(v); | |
} | |
inline void ResetCursor() { | |
cursor_ = static_cast<unsigned>(ECursor::kAuto); | |
} | |
// CursorData | |
// Getters and setters not generated | |
// direction | |
inline static TextDirection InitialDirection() { | |
return TextDirection::kLtr; | |
} | |
TextDirection Direction() const { | |
return static_cast<TextDirection>(direction_); | |
} | |
void SetDirection(TextDirection v) { | |
direction_ = static_cast<unsigned>(v); | |
} | |
inline void ResetDirection() { | |
direction_ = static_cast<unsigned>(TextDirection::kLtr); | |
} | |
// display | |
inline static EDisplay InitialDisplay() { | |
return EDisplay::kInline; | |
} | |
EDisplay Display() const { | |
return static_cast<EDisplay>(display_); | |
} | |
void SetDisplay(EDisplay v) { | |
display_ = static_cast<unsigned>(v); | |
} | |
inline void ResetDisplay() { | |
display_ = static_cast<unsigned>(EDisplay::kInline); | |
} | |
// -webkit-app-region | |
inline static EDraggableRegionMode InitialDraggableRegionMode() { | |
return EDraggableRegionMode::kNone; | |
} | |
EDraggableRegionMode DraggableRegionMode() const { | |
return static_cast<EDraggableRegionMode>(rare_non_inherited_data_->draggable_region_mode_); | |
} | |
void SetDraggableRegionMode(EDraggableRegionMode v) { | |
if (!(rare_non_inherited_data_->draggable_region_mode_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->draggable_region_mode_ = static_cast<unsigned>(v); | |
} | |
inline void ResetDraggableRegionMode() { | |
rare_non_inherited_data_.Access()->draggable_region_mode_ = static_cast<unsigned>(EDraggableRegionMode::kNone); | |
} | |
// EffectiveBlendMode | |
// Getters and setters not generated | |
// EffectiveZoom | |
// Getters and setters not generated | |
// empty-cells | |
inline static EEmptyCells InitialEmptyCells() { | |
return EEmptyCells::kShow; | |
} | |
EEmptyCells EmptyCells() const { | |
return static_cast<EEmptyCells>(empty_cells_); | |
} | |
void SetEmptyCells(EEmptyCells v) { | |
empty_cells_ = static_cast<unsigned>(v); | |
} | |
inline void ResetEmptyCells() { | |
empty_cells_ = static_cast<unsigned>(EEmptyCells::kShow); | |
} | |
// empty-cells | |
inline static bool InitialEmptyCellsIsInherited() { | |
return true; | |
} | |
bool EmptyCellsIsInherited() const { | |
return static_cast<bool>(empty_cells_is_inherited_); | |
} | |
void SetEmptyCellsIsInherited(bool v) { | |
empty_cells_is_inherited_ = static_cast<unsigned>(v); | |
} | |
inline void ResetEmptyCellsIsInherited() { | |
empty_cells_is_inherited_ = static_cast<unsigned>(true); | |
} | |
// EmptyState | |
// Getters and setters not generated | |
// Filter | |
// Getters and setters not generated | |
// FlexibleBoxData | |
// Getters and setters not generated | |
// float | |
inline static EFloat InitialFloating() { | |
return EFloat::kNone; | |
} | |
EFloat Floating() const { | |
return static_cast<EFloat>(floating_); | |
} | |
void SetFloating(EFloat v) { | |
floating_ = static_cast<unsigned>(v); | |
} | |
inline void ResetFloating() { | |
floating_ = static_cast<unsigned>(EFloat::kNone); | |
} | |
// font | |
// Getters and setters not generated | |
// GridData | |
// Getters and setters not generated | |
// GridItemData | |
// Getters and setters not generated | |
// HasAuthorBackground | |
// Getters and setters not generated | |
// HasAuthorBorder | |
// Getters and setters not generated | |
// HasAutoClip | |
// Getters and setters not generated | |
// HasAutoZIndex | |
// Getters and setters not generated | |
// HasCompositorProxy | |
// Getters and setters not generated | |
// HasCurrentBackdropFilterAnimation | |
// Getters and setters not generated | |
// HasCurrentFilterAnimation | |
// Getters and setters not generated | |
// HasCurrentOpacityAnimation | |
// Getters and setters not generated | |
// HasCurrentTransformAnimation | |
// Getters and setters not generated | |
// HasExplicitlyInheritedProperties | |
bool HasExplicitlyInheritedProperties() const { | |
return static_cast<bool>(has_explicitly_inherited_properties_); | |
} | |
void SetHasExplicitlyInheritedProperties() { | |
has_explicitly_inherited_properties_ = static_cast<unsigned>(true); | |
} | |
// HasInlineTransform | |
// Getters and setters not generated | |
// HasRemUnits | |
bool HasRemUnits() const { | |
return static_cast<bool>(has_rem_units_); | |
} | |
void SetHasRemUnits() { | |
has_rem_units_ = static_cast<unsigned>(true); | |
} | |
// HasSimpleUnderline | |
// Getters and setters not generated | |
// HasVariableReferenceFromNonInheritedProperty | |
bool HasVariableReferenceFromNonInheritedProperty() const { | |
return static_cast<bool>(has_variable_reference_from_non_inherited_property_); | |
} | |
void SetHasVariableReferenceFromNonInheritedProperty() { | |
has_variable_reference_from_non_inherited_property_ = static_cast<unsigned>(true); | |
} | |
// HasViewportUnits | |
inline static bool InitialHasViewportUnits() { | |
return false; | |
} | |
bool HasViewportUnits() const { | |
return static_cast<bool>(has_viewport_units_); | |
} | |
void SetHasViewportUnits(bool v) { | |
has_viewport_units_ = static_cast<unsigned>(v); | |
} | |
inline void ResetHasViewportUnits() { | |
has_viewport_units_ = static_cast<unsigned>(false); | |
} | |
// height | |
inline static Length InitialHeight() { | |
return Length(); | |
} | |
const Length& Height() const { | |
return box_data_->height_; | |
} | |
void SetHeight(const Length& v) { | |
if (!(box_data_->height_ == v)) | |
box_data_.Access()->height_ = v; | |
} | |
void SetHeight(Length&& v) { | |
if (!(box_data_->height_ == v)) | |
box_data_.Access()->height_ = std::move(v); | |
} | |
inline void ResetHeight() { | |
box_data_.Access()->height_ = Length(); | |
} | |
// -webkit-highlight | |
inline static AtomicString InitialHighlight() { | |
return g_null_atom; | |
} | |
const AtomicString& Highlight() const { | |
return rare_inherited_data_->highlight_; | |
} | |
void SetHighlight(const AtomicString& v) { | |
if (!(rare_inherited_data_->highlight_ == v)) | |
rare_inherited_data_.Access()->highlight_ = v; | |
} | |
void SetHighlight(AtomicString&& v) { | |
if (!(rare_inherited_data_->highlight_ == v)) | |
rare_inherited_data_.Access()->highlight_ = std::move(v); | |
} | |
inline void ResetHighlight() { | |
rare_inherited_data_.Access()->highlight_ = g_null_atom; | |
} | |
// -webkit-border-horizontal-spacing | |
inline static short InitialHorizontalBorderSpacing() { | |
return 0; | |
} | |
short HorizontalBorderSpacing() const { | |
return inherited_data_->horizontal_border_spacing_; | |
} | |
void SetHorizontalBorderSpacing(short v) { | |
if (!(inherited_data_->horizontal_border_spacing_ == v)) | |
inherited_data_.Access()->horizontal_border_spacing_ = v; | |
} | |
inline void ResetHorizontalBorderSpacing() { | |
inherited_data_.Access()->horizontal_border_spacing_ = 0; | |
} | |
// HyphenationLimitAfter | |
// Getters and setters not generated | |
// HyphenationLimitBefore | |
// Getters and setters not generated | |
// HyphenationLimitLines | |
// Getters and setters not generated | |
// -webkit-hyphenate-character | |
inline static AtomicString InitialHyphenationString() { | |
return AtomicString(); | |
} | |
const AtomicString& HyphenationString() const { | |
return rare_inherited_data_->hyphenation_string_; | |
} | |
void SetHyphenationString(const AtomicString& v) { | |
if (!(rare_inherited_data_->hyphenation_string_ == v)) | |
rare_inherited_data_.Access()->hyphenation_string_ = v; | |
} | |
void SetHyphenationString(AtomicString&& v) { | |
if (!(rare_inherited_data_->hyphenation_string_ == v)) | |
rare_inherited_data_.Access()->hyphenation_string_ = std::move(v); | |
} | |
inline void ResetHyphenationString() { | |
rare_inherited_data_.Access()->hyphenation_string_ = AtomicString(); | |
} | |
// hyphens | |
inline static Hyphens InitialHyphens() { | |
return Hyphens::kManual; | |
} | |
Hyphens GetHyphens() const { | |
return static_cast<Hyphens>(rare_inherited_data_->hyphens_); | |
} | |
void SetHyphens(Hyphens v) { | |
if (!(rare_inherited_data_->hyphens_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->hyphens_ = static_cast<unsigned>(v); | |
} | |
inline void ResetHyphens() { | |
rare_inherited_data_.Access()->hyphens_ = static_cast<unsigned>(Hyphens::kManual); | |
} | |
// image-rendering | |
inline static EImageRendering InitialImageRendering() { | |
return EImageRendering::kAuto; | |
} | |
EImageRendering ImageRendering() const { | |
return static_cast<EImageRendering>(rare_inherited_data_->image_rendering_); | |
} | |
void SetImageRendering(EImageRendering v) { | |
if (!(rare_inherited_data_->image_rendering_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->image_rendering_ = static_cast<unsigned>(v); | |
} | |
inline void ResetImageRendering() { | |
rare_inherited_data_.Access()->image_rendering_ = static_cast<unsigned>(EImageRendering::kAuto); | |
} | |
// InheritedVariables | |
// Getters and setters not generated | |
// InsideLink | |
inline static EInsideLink InitialInsideLink() { | |
return EInsideLink::kNotInsideLink; | |
} | |
EInsideLink InsideLink() const { | |
return static_cast<EInsideLink>(inside_link_); | |
} | |
void SetInsideLink(EInsideLink v) { | |
inside_link_ = static_cast<unsigned>(v); | |
} | |
inline void ResetInsideLink() { | |
inside_link_ = static_cast<unsigned>(EInsideLink::kNotInsideLink); | |
} | |
// IsLink | |
bool IsLink() const { | |
return static_cast<bool>(is_link_); | |
} | |
void SetIsLink() { | |
is_link_ = static_cast<unsigned>(true); | |
} | |
// IsStackingContext | |
// Getters and setters not generated | |
// isolation | |
inline static EIsolation InitialIsolation() { | |
return EIsolation::kAuto; | |
} | |
EIsolation Isolation() const { | |
return static_cast<EIsolation>(rare_non_inherited_data_->isolation_); | |
} | |
void SetIsolation(EIsolation v) { | |
if (!(rare_non_inherited_data_->isolation_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->isolation_ = static_cast<unsigned>(v); | |
} | |
inline void ResetIsolation() { | |
rare_non_inherited_data_.Access()->isolation_ = static_cast<unsigned>(EIsolation::kAuto); | |
} | |
// justify-content | |
// Getters and setters not generated | |
// justify-items | |
// Getters and setters not generated | |
// justify-self | |
// Getters and setters not generated | |
// left | |
inline static Length InitialLeft() { | |
return Length(); | |
} | |
const Length& Left() const { | |
return surround_data_->left_; | |
} | |
void SetLeft(const Length& v) { | |
if (!(surround_data_->left_ == v)) | |
surround_data_.Access()->left_ = v; | |
} | |
void SetLeft(Length&& v) { | |
if (!(surround_data_->left_ == v)) | |
surround_data_.Access()->left_ = std::move(v); | |
} | |
inline void ResetLeft() { | |
surround_data_.Access()->left_ = Length(); | |
} | |
// -webkit-line-break | |
inline static LineBreak InitialLineBreak() { | |
return LineBreak::kAuto; | |
} | |
LineBreak GetLineBreak() const { | |
return static_cast<LineBreak>(rare_inherited_data_->line_break_); | |
} | |
void SetLineBreak(LineBreak v) { | |
if (!(rare_inherited_data_->line_break_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->line_break_ = static_cast<unsigned>(v); | |
} | |
inline void ResetLineBreak() { | |
rare_inherited_data_.Access()->line_break_ = static_cast<unsigned>(LineBreak::kAuto); | |
} | |
// -webkit-line-clamp | |
// Getters and setters not generated | |
// line-height | |
// Getters and setters not generated | |
// line-height-step | |
inline static uint8_t InitialLineHeightStep() { | |
return 0; | |
} | |
uint8_t LineHeightStep() const { | |
return rare_inherited_data_->line_height_step_; | |
} | |
void SetLineHeightStep(uint8_t v) { | |
if (!(rare_inherited_data_->line_height_step_ == v)) | |
rare_inherited_data_.Access()->line_height_step_ = v; | |
} | |
inline void ResetLineHeightStep() { | |
rare_inherited_data_.Access()->line_height_step_ = 0; | |
} | |
// list-style-image | |
// Getters and setters not generated | |
// list-style-position | |
inline static EListStylePosition InitialListStylePosition() { | |
return EListStylePosition::kOutside; | |
} | |
EListStylePosition ListStylePosition() const { | |
return static_cast<EListStylePosition>(list_style_position_); | |
} | |
void SetListStylePosition(EListStylePosition v) { | |
list_style_position_ = static_cast<unsigned>(v); | |
} | |
inline void ResetListStylePosition() { | |
list_style_position_ = static_cast<unsigned>(EListStylePosition::kOutside); | |
} | |
// list-style-position | |
inline static bool InitialListStylePositionIsInherited() { | |
return true; | |
} | |
bool ListStylePositionIsInherited() const { | |
return static_cast<bool>(list_style_position_is_inherited_); | |
} | |
void SetListStylePositionIsInherited(bool v) { | |
list_style_position_is_inherited_ = static_cast<unsigned>(v); | |
} | |
inline void ResetListStylePositionIsInherited() { | |
list_style_position_is_inherited_ = static_cast<unsigned>(true); | |
} | |
// list-style-type | |
inline static EListStyleType InitialListStyleType() { | |
return EListStyleType::kDisc; | |
} | |
EListStyleType ListStyleType() const { | |
return static_cast<EListStyleType>(list_style_type_); | |
} | |
void SetListStyleType(EListStyleType v) { | |
list_style_type_ = static_cast<unsigned>(v); | |
} | |
inline void ResetListStyleType() { | |
list_style_type_ = static_cast<unsigned>(EListStyleType::kDisc); | |
} | |
// -webkit-margin-after-collapse | |
inline static EMarginCollapse InitialMarginAfterCollapse() { | |
return EMarginCollapse::kCollapse; | |
} | |
EMarginCollapse MarginAfterCollapse() const { | |
return static_cast<EMarginCollapse>(rare_non_inherited_data_->margin_after_collapse_); | |
} | |
void SetMarginAfterCollapse(EMarginCollapse v) { | |
if (!(rare_non_inherited_data_->margin_after_collapse_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->margin_after_collapse_ = static_cast<unsigned>(v); | |
} | |
inline void ResetMarginAfterCollapse() { | |
rare_non_inherited_data_.Access()->margin_after_collapse_ = static_cast<unsigned>(EMarginCollapse::kCollapse); | |
} | |
// -webkit-margin-before-collapse | |
inline static EMarginCollapse InitialMarginBeforeCollapse() { | |
return EMarginCollapse::kCollapse; | |
} | |
EMarginCollapse MarginBeforeCollapse() const { | |
return static_cast<EMarginCollapse>(rare_non_inherited_data_->margin_before_collapse_); | |
} | |
void SetMarginBeforeCollapse(EMarginCollapse v) { | |
if (!(rare_non_inherited_data_->margin_before_collapse_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->margin_before_collapse_ = static_cast<unsigned>(v); | |
} | |
inline void ResetMarginBeforeCollapse() { | |
rare_non_inherited_data_.Access()->margin_before_collapse_ = static_cast<unsigned>(EMarginCollapse::kCollapse); | |
} | |
// margin-bottom | |
inline static Length InitialMarginBottom() { | |
return Length(kFixed); | |
} | |
const Length& MarginBottom() const { | |
return surround_data_->margin_bottom_; | |
} | |
void SetMarginBottom(const Length& v) { | |
if (!(surround_data_->margin_bottom_ == v)) | |
surround_data_.Access()->margin_bottom_ = v; | |
} | |
void SetMarginBottom(Length&& v) { | |
if (!(surround_data_->margin_bottom_ == v)) | |
surround_data_.Access()->margin_bottom_ = std::move(v); | |
} | |
inline void ResetMarginBottom() { | |
surround_data_.Access()->margin_bottom_ = Length(kFixed); | |
} | |
// margin-left | |
inline static Length InitialMarginLeft() { | |
return Length(kFixed); | |
} | |
const Length& MarginLeft() const { | |
return surround_data_->margin_left_; | |
} | |
void SetMarginLeft(const Length& v) { | |
if (!(surround_data_->margin_left_ == v)) | |
surround_data_.Access()->margin_left_ = v; | |
} | |
void SetMarginLeft(Length&& v) { | |
if (!(surround_data_->margin_left_ == v)) | |
surround_data_.Access()->margin_left_ = std::move(v); | |
} | |
inline void ResetMarginLeft() { | |
surround_data_.Access()->margin_left_ = Length(kFixed); | |
} | |
// margin-right | |
inline static Length InitialMarginRight() { | |
return Length(kFixed); | |
} | |
const Length& MarginRight() const { | |
return surround_data_->margin_right_; | |
} | |
void SetMarginRight(const Length& v) { | |
if (!(surround_data_->margin_right_ == v)) | |
surround_data_.Access()->margin_right_ = v; | |
} | |
void SetMarginRight(Length&& v) { | |
if (!(surround_data_->margin_right_ == v)) | |
surround_data_.Access()->margin_right_ = std::move(v); | |
} | |
inline void ResetMarginRight() { | |
surround_data_.Access()->margin_right_ = Length(kFixed); | |
} | |
// margin-top | |
inline static Length InitialMarginTop() { | |
return Length(kFixed); | |
} | |
const Length& MarginTop() const { | |
return surround_data_->margin_top_; | |
} | |
void SetMarginTop(const Length& v) { | |
if (!(surround_data_->margin_top_ == v)) | |
surround_data_.Access()->margin_top_ = v; | |
} | |
void SetMarginTop(Length&& v) { | |
if (!(surround_data_->margin_top_ == v)) | |
surround_data_.Access()->margin_top_ = std::move(v); | |
} | |
inline void ResetMarginTop() { | |
surround_data_.Access()->margin_top_ = Length(kFixed); | |
} | |
// Mask | |
// Getters and setters not generated | |
// MaskBoxImage | |
// Getters and setters not generated | |
// max-height | |
inline static Length InitialMaxHeight() { | |
return Length(kMaxSizeNone); | |
} | |
const Length& MaxHeight() const { | |
return box_data_->max_height_; | |
} | |
void SetMaxHeight(const Length& v) { | |
if (!(box_data_->max_height_ == v)) | |
box_data_.Access()->max_height_ = v; | |
} | |
void SetMaxHeight(Length&& v) { | |
if (!(box_data_->max_height_ == v)) | |
box_data_.Access()->max_height_ = std::move(v); | |
} | |
inline void ResetMaxHeight() { | |
box_data_.Access()->max_height_ = Length(kMaxSizeNone); | |
} | |
// max-width | |
inline static Length InitialMaxWidth() { | |
return Length(kMaxSizeNone); | |
} | |
const Length& MaxWidth() const { | |
return box_data_->max_width_; | |
} | |
void SetMaxWidth(const Length& v) { | |
if (!(box_data_->max_width_ == v)) | |
box_data_.Access()->max_width_ = v; | |
} | |
void SetMaxWidth(Length&& v) { | |
if (!(box_data_->max_width_ == v)) | |
box_data_.Access()->max_width_ = std::move(v); | |
} | |
inline void ResetMaxWidth() { | |
box_data_.Access()->max_width_ = Length(kMaxSizeNone); | |
} | |
// min-height | |
inline static Length InitialMinHeight() { | |
return Length(); | |
} | |
const Length& MinHeight() const { | |
return box_data_->min_height_; | |
} | |
void SetMinHeight(const Length& v) { | |
if (!(box_data_->min_height_ == v)) | |
box_data_.Access()->min_height_ = v; | |
} | |
void SetMinHeight(Length&& v) { | |
if (!(box_data_->min_height_ == v)) | |
box_data_.Access()->min_height_ = std::move(v); | |
} | |
inline void ResetMinHeight() { | |
box_data_.Access()->min_height_ = Length(); | |
} | |
// min-width | |
inline static Length InitialMinWidth() { | |
return Length(); | |
} | |
const Length& MinWidth() const { | |
return box_data_->min_width_; | |
} | |
void SetMinWidth(const Length& v) { | |
if (!(box_data_->min_width_ == v)) | |
box_data_.Access()->min_width_ = v; | |
} | |
void SetMinWidth(Length&& v) { | |
if (!(box_data_->min_width_ == v)) | |
box_data_.Access()->min_width_ = std::move(v); | |
} | |
inline void ResetMinWidth() { | |
box_data_.Access()->min_width_ = Length(); | |
} | |
// MultiColData | |
// Getters and setters not generated | |
// NonInheritedVariables | |
// Getters and setters not generated | |
// object-fit | |
inline static EObjectFit InitialObjectFit() { | |
return EObjectFit::kFill; | |
} | |
EObjectFit GetObjectFit() const { | |
return static_cast<EObjectFit>(rare_non_inherited_data_->object_fit_); | |
} | |
void SetObjectFit(EObjectFit v) { | |
if (!(rare_non_inherited_data_->object_fit_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->object_fit_ = static_cast<unsigned>(v); | |
} | |
inline void ResetObjectFit() { | |
rare_non_inherited_data_.Access()->object_fit_ = static_cast<unsigned>(EObjectFit::kFill); | |
} | |
// object-position | |
inline static LengthPoint InitialObjectPosition() { | |
return LengthPoint(Length(50.0, kPercent), Length(50.0, kPercent)); | |
} | |
const LengthPoint& ObjectPosition() const { | |
return rare_non_inherited_data_->object_position_; | |
} | |
void SetObjectPosition(const LengthPoint& v) { | |
if (!(rare_non_inherited_data_->object_position_ == v)) | |
rare_non_inherited_data_.Access()->object_position_ = v; | |
} | |
void SetObjectPosition(LengthPoint&& v) { | |
if (!(rare_non_inherited_data_->object_position_ == v)) | |
rare_non_inherited_data_.Access()->object_position_ = std::move(v); | |
} | |
inline void ResetObjectPosition() { | |
rare_non_inherited_data_.Access()->object_position_ = LengthPoint(Length(50.0, kPercent), Length(50.0, kPercent)); | |
} | |
// opacity | |
// Getters and setters not generated | |
// order | |
// Getters and setters not generated | |
// OriginalDisplay | |
inline static EDisplay InitialOriginalDisplay() { | |
return EDisplay::kInline; | |
} | |
EDisplay OriginalDisplay() const { | |
return static_cast<EDisplay>(original_display_); | |
} | |
void SetOriginalDisplay(EDisplay v) { | |
original_display_ = static_cast<unsigned>(v); | |
} | |
inline void ResetOriginalDisplay() { | |
original_display_ = static_cast<unsigned>(EDisplay::kInline); | |
} | |
// orphans | |
inline static short InitialOrphans() { | |
return 2; | |
} | |
short Orphans() const { | |
return rare_inherited_data_->orphans_; | |
} | |
void SetOrphans(short v) { | |
if (!(rare_inherited_data_->orphans_ == v)) | |
rare_inherited_data_.Access()->orphans_ = v; | |
} | |
inline void ResetOrphans() { | |
rare_inherited_data_.Access()->orphans_ = 2; | |
} | |
// Outline | |
// Getters and setters not generated | |
// overflow-anchor | |
inline static EOverflowAnchor InitialOverflowAnchor() { | |
return EOverflowAnchor::kAuto; | |
} | |
EOverflowAnchor OverflowAnchor() const { | |
return static_cast<EOverflowAnchor>(overflow_anchor_); | |
} | |
void SetOverflowAnchor(EOverflowAnchor v) { | |
overflow_anchor_ = static_cast<unsigned>(v); | |
} | |
inline void ResetOverflowAnchor() { | |
overflow_anchor_ = static_cast<unsigned>(EOverflowAnchor::kAuto); | |
} | |
// overflow-wrap | |
inline static EOverflowWrap InitialOverflowWrap() { | |
return EOverflowWrap::kNormal; | |
} | |
EOverflowWrap OverflowWrap() const { | |
return static_cast<EOverflowWrap>(rare_inherited_data_->overflow_wrap_); | |
} | |
void SetOverflowWrap(EOverflowWrap v) { | |
if (!(rare_inherited_data_->overflow_wrap_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->overflow_wrap_ = static_cast<unsigned>(v); | |
} | |
inline void ResetOverflowWrap() { | |
rare_inherited_data_.Access()->overflow_wrap_ = static_cast<unsigned>(EOverflowWrap::kNormal); | |
} | |
// overflow-x | |
inline static EOverflow InitialOverflowX() { | |
return EOverflow::kVisible; | |
} | |
EOverflow OverflowX() const { | |
return static_cast<EOverflow>(overflow_x_); | |
} | |
void SetOverflowX(EOverflow v) { | |
overflow_x_ = static_cast<unsigned>(v); | |
} | |
inline void ResetOverflowX() { | |
overflow_x_ = static_cast<unsigned>(EOverflow::kVisible); | |
} | |
// overflow-y | |
inline static EOverflow InitialOverflowY() { | |
return EOverflow::kVisible; | |
} | |
EOverflow OverflowY() const { | |
return static_cast<EOverflow>(overflow_y_); | |
} | |
void SetOverflowY(EOverflow v) { | |
overflow_y_ = static_cast<unsigned>(v); | |
} | |
inline void ResetOverflowY() { | |
overflow_y_ = static_cast<unsigned>(EOverflow::kVisible); | |
} | |
// padding-bottom | |
inline static Length InitialPaddingBottom() { | |
return Length(kFixed); | |
} | |
const Length& PaddingBottom() const { | |
return surround_data_->padding_bottom_; | |
} | |
void SetPaddingBottom(const Length& v) { | |
if (!(surround_data_->padding_bottom_ == v)) | |
surround_data_.Access()->padding_bottom_ = v; | |
} | |
void SetPaddingBottom(Length&& v) { | |
if (!(surround_data_->padding_bottom_ == v)) | |
surround_data_.Access()->padding_bottom_ = std::move(v); | |
} | |
inline void ResetPaddingBottom() { | |
surround_data_.Access()->padding_bottom_ = Length(kFixed); | |
} | |
// padding-left | |
inline static Length InitialPaddingLeft() { | |
return Length(kFixed); | |
} | |
const Length& PaddingLeft() const { | |
return surround_data_->padding_left_; | |
} | |
void SetPaddingLeft(const Length& v) { | |
if (!(surround_data_->padding_left_ == v)) | |
surround_data_.Access()->padding_left_ = v; | |
} | |
void SetPaddingLeft(Length&& v) { | |
if (!(surround_data_->padding_left_ == v)) | |
surround_data_.Access()->padding_left_ = std::move(v); | |
} | |
inline void ResetPaddingLeft() { | |
surround_data_.Access()->padding_left_ = Length(kFixed); | |
} | |
// padding-right | |
inline static Length InitialPaddingRight() { | |
return Length(kFixed); | |
} | |
const Length& PaddingRight() const { | |
return surround_data_->padding_right_; | |
} | |
void SetPaddingRight(const Length& v) { | |
if (!(surround_data_->padding_right_ == v)) | |
surround_data_.Access()->padding_right_ = v; | |
} | |
void SetPaddingRight(Length&& v) { | |
if (!(surround_data_->padding_right_ == v)) | |
surround_data_.Access()->padding_right_ = std::move(v); | |
} | |
inline void ResetPaddingRight() { | |
surround_data_.Access()->padding_right_ = Length(kFixed); | |
} | |
// padding-top | |
inline static Length InitialPaddingTop() { | |
return Length(kFixed); | |
} | |
const Length& PaddingTop() const { | |
return surround_data_->padding_top_; | |
} | |
void SetPaddingTop(const Length& v) { | |
if (!(surround_data_->padding_top_ == v)) | |
surround_data_.Access()->padding_top_ = v; | |
} | |
void SetPaddingTop(Length&& v) { | |
if (!(surround_data_->padding_top_ == v)) | |
surround_data_.Access()->padding_top_ = std::move(v); | |
} | |
inline void ResetPaddingTop() { | |
surround_data_.Access()->padding_top_ = Length(kFixed); | |
} | |
// PageSize | |
// Getters and setters not generated | |
// PageSizeType | |
// Getters and setters not generated | |
// PaintImages | |
// Getters and setters not generated | |
// perspective | |
// Getters and setters not generated | |
// perspective-origin | |
// Getters and setters not generated | |
// pointer-events | |
inline static EPointerEvents InitialPointerEvents() { | |
return EPointerEvents::kAuto; | |
} | |
EPointerEvents PointerEvents() const { | |
return static_cast<EPointerEvents>(pointer_events_); | |
} | |
void SetPointerEvents(EPointerEvents v) { | |
pointer_events_ = static_cast<unsigned>(v); | |
} | |
inline void ResetPointerEvents() { | |
pointer_events_ = static_cast<unsigned>(EPointerEvents::kAuto); | |
} | |
// pointer-events | |
inline static bool InitialPointerEventsIsInherited() { | |
return true; | |
} | |
bool PointerEventsIsInherited() const { | |
return static_cast<bool>(pointer_events_is_inherited_); | |
} | |
void SetPointerEventsIsInherited(bool v) { | |
pointer_events_is_inherited_ = static_cast<unsigned>(v); | |
} | |
inline void ResetPointerEventsIsInherited() { | |
pointer_events_is_inherited_ = static_cast<unsigned>(true); | |
} | |
// position | |
inline static EPosition InitialPosition() { | |
return EPosition::kStatic; | |
} | |
EPosition GetPosition() const { | |
return static_cast<EPosition>(position_); | |
} | |
void SetPosition(EPosition v) { | |
position_ = static_cast<unsigned>(v); | |
} | |
inline void ResetPosition() { | |
position_ = static_cast<unsigned>(EPosition::kStatic); | |
} | |
// -webkit-print-color-adjust | |
inline static EPrintColorAdjust InitialPrintColorAdjust() { | |
return EPrintColorAdjust::kEconomy; | |
} | |
EPrintColorAdjust PrintColorAdjust() const { | |
return static_cast<EPrintColorAdjust>(print_color_adjust_); | |
} | |
void SetPrintColorAdjust(EPrintColorAdjust v) { | |
print_color_adjust_ = static_cast<unsigned>(v); | |
} | |
inline void ResetPrintColorAdjust() { | |
print_color_adjust_ = static_cast<unsigned>(EPrintColorAdjust::kEconomy); | |
} | |
// -webkit-print-color-adjust | |
inline static bool InitialPrintColorAdjustIsInherited() { | |
return true; | |
} | |
bool PrintColorAdjustIsInherited() const { | |
return static_cast<bool>(print_color_adjust_is_inherited_); | |
} | |
void SetPrintColorAdjustIsInherited(bool v) { | |
print_color_adjust_is_inherited_ = static_cast<unsigned>(v); | |
} | |
inline void ResetPrintColorAdjustIsInherited() { | |
print_color_adjust_is_inherited_ = static_cast<unsigned>(true); | |
} | |
// PseudoBits | |
// Getters and setters not generated | |
// quotes | |
// Getters and setters not generated | |
// RequiresAcceleratedCompositingForExternalReasons | |
// Getters and setters not generated | |
// resize | |
// Getters and setters not generated | |
// RespectImageOrientation | |
// Getters and setters not generated | |
// right | |
inline static Length InitialRight() { | |
return Length(); | |
} | |
const Length& Right() const { | |
return surround_data_->right_; | |
} | |
void SetRight(const Length& v) { | |
if (!(surround_data_->right_ == v)) | |
surround_data_.Access()->right_ = v; | |
} | |
void SetRight(Length&& v) { | |
if (!(surround_data_->right_ == v)) | |
surround_data_.Access()->right_ = std::move(v); | |
} | |
inline void ResetRight() { | |
surround_data_.Access()->right_ = Length(); | |
} | |
// -webkit-rtl-ordering | |
inline static EOrder InitialRtlOrdering() { | |
return EOrder::kLogical; | |
} | |
EOrder RtlOrdering() const { | |
return static_cast<EOrder>(rtl_ordering_); | |
} | |
void SetRtlOrdering(EOrder v) { | |
rtl_ordering_ = static_cast<unsigned>(v); | |
} | |
inline void ResetRtlOrdering() { | |
rtl_ordering_ = static_cast<unsigned>(EOrder::kLogical); | |
} | |
// -webkit-rtl-ordering | |
inline static bool InitialRtlOrderingIsInherited() { | |
return true; | |
} | |
bool RtlOrderingIsInherited() const { | |
return static_cast<bool>(rtl_ordering_is_inherited_); | |
} | |
void SetRtlOrderingIsInherited(bool v) { | |
rtl_ordering_is_inherited_ = static_cast<unsigned>(v); | |
} | |
inline void ResetRtlOrderingIsInherited() { | |
rtl_ordering_is_inherited_ = static_cast<unsigned>(true); | |
} | |
// -webkit-ruby-position | |
inline static RubyPosition InitialRubyPosition() { | |
return RubyPosition::kBefore; | |
} | |
RubyPosition GetRubyPosition() const { | |
return static_cast<RubyPosition>(rare_inherited_data_->ruby_position_); | |
} | |
void SetRubyPosition(RubyPosition v) { | |
if (!(rare_inherited_data_->ruby_position_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->ruby_position_ = static_cast<unsigned>(v); | |
} | |
inline void ResetRubyPosition() { | |
rare_inherited_data_.Access()->ruby_position_ = static_cast<unsigned>(RubyPosition::kBefore); | |
} | |
// RunningBackdropFilterAnimationOnCompositor | |
// Getters and setters not generated | |
// RunningFilterAnimationOnCompositor | |
// Getters and setters not generated | |
// RunningOpacityAnimationOnCompositor | |
// Getters and setters not generated | |
// RunningTransformAnimationOnCompositor | |
// Getters and setters not generated | |
// scroll-behavior | |
// Getters and setters not generated | |
// ScrollSnapData | |
// Getters and setters not generated | |
// scroll-snap-type | |
// Getters and setters not generated | |
// SelfOrAncestorHasDirAutoAttribute | |
// Getters and setters not generated | |
// shape-image-threshold | |
// Getters and setters not generated | |
// shape-margin | |
// Getters and setters not generated | |
// shape-outside | |
// Getters and setters not generated | |
// speak | |
inline static ESpeak InitialSpeak() { | |
return ESpeak::kNormal; | |
} | |
ESpeak Speak() const { | |
return static_cast<ESpeak>(rare_inherited_data_->speak_); | |
} | |
void SetSpeak(ESpeak v) { | |
if (!(rare_inherited_data_->speak_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->speak_ = static_cast<unsigned>(v); | |
} | |
inline void ResetSpeak() { | |
rare_inherited_data_.Access()->speak_ = static_cast<unsigned>(ESpeak::kNormal); | |
} | |
// StyleType | |
// Getters and setters not generated | |
// SubtreeIsSticky | |
inline static bool InitialSubtreeIsSticky() { | |
return false; | |
} | |
bool SubtreeIsSticky() const { | |
return static_cast<bool>(rare_inherited_data_->subtree_is_sticky_); | |
} | |
void SetSubtreeIsSticky(bool v) { | |
if (!(rare_inherited_data_->subtree_is_sticky_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->subtree_is_sticky_ = static_cast<unsigned>(v); | |
} | |
inline void ResetSubtreeIsSticky() { | |
rare_inherited_data_.Access()->subtree_is_sticky_ = static_cast<unsigned>(false); | |
} | |
// SubtreeWillChangeContents | |
inline static bool InitialSubtreeWillChangeContents() { | |
return false; | |
} | |
bool SubtreeWillChangeContents() const { | |
return static_cast<bool>(rare_inherited_data_->subtree_will_change_contents_); | |
} | |
void SetSubtreeWillChangeContents(bool v) { | |
if (!(rare_inherited_data_->subtree_will_change_contents_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->subtree_will_change_contents_ = static_cast<unsigned>(v); | |
} | |
inline void ResetSubtreeWillChangeContents() { | |
rare_inherited_data_.Access()->subtree_will_change_contents_ = static_cast<unsigned>(false); | |
} | |
// tab-size | |
inline static TabSize InitialTabSize() { | |
return TabSize(8); | |
} | |
const TabSize& GetTabSize() const { | |
return rare_inherited_data_->tab_size_; | |
} | |
void SetTabSize(const TabSize& v) { | |
if (!(rare_inherited_data_->tab_size_ == v)) | |
rare_inherited_data_.Access()->tab_size_ = v; | |
} | |
void SetTabSize(TabSize&& v) { | |
if (!(rare_inherited_data_->tab_size_ == v)) | |
rare_inherited_data_.Access()->tab_size_ = std::move(v); | |
} | |
inline void ResetTabSize() { | |
rare_inherited_data_.Access()->tab_size_ = TabSize(8); | |
} | |
// table-layout | |
inline static ETableLayout InitialTableLayout() { | |
return ETableLayout::kAuto; | |
} | |
ETableLayout TableLayout() const { | |
return static_cast<ETableLayout>(table_layout_); | |
} | |
void SetTableLayout(ETableLayout v) { | |
table_layout_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTableLayout() { | |
table_layout_ = static_cast<unsigned>(ETableLayout::kAuto); | |
} | |
// -webkit-tap-highlight-color | |
inline static Color InitialTapHighlightColor() { | |
return LayoutTheme::TapHighlightColor(); | |
} | |
const Color& TapHighlightColor() const { | |
return rare_inherited_data_->tap_highlight_color_; | |
} | |
void SetTapHighlightColor(const Color& v) { | |
if (!(rare_inherited_data_->tap_highlight_color_ == v)) | |
rare_inherited_data_.Access()->tap_highlight_color_ = v; | |
} | |
void SetTapHighlightColor(Color&& v) { | |
if (!(rare_inherited_data_->tap_highlight_color_ == v)) | |
rare_inherited_data_.Access()->tap_highlight_color_ = std::move(v); | |
} | |
inline void ResetTapHighlightColor() { | |
rare_inherited_data_.Access()->tap_highlight_color_ = LayoutTheme::TapHighlightColor(); | |
} | |
// text-align | |
inline static ETextAlign InitialTextAlign() { | |
return ETextAlign::kStart; | |
} | |
ETextAlign GetTextAlign() const { | |
return static_cast<ETextAlign>(text_align_); | |
} | |
void SetTextAlign(ETextAlign v) { | |
text_align_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTextAlign() { | |
text_align_ = static_cast<unsigned>(ETextAlign::kStart); | |
} | |
// text-align-last | |
inline static ETextAlignLast InitialTextAlignLast() { | |
return ETextAlignLast::kAuto; | |
} | |
ETextAlignLast TextAlignLast() const { | |
return static_cast<ETextAlignLast>(rare_inherited_data_->text_align_last_); | |
} | |
void SetTextAlignLast(ETextAlignLast v) { | |
if (!(rare_inherited_data_->text_align_last_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_align_last_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTextAlignLast() { | |
rare_inherited_data_.Access()->text_align_last_ = static_cast<unsigned>(ETextAlignLast::kAuto); | |
} | |
// TextAutosizingMultiplier | |
// Getters and setters not generated | |
// text-combine-upright | |
inline static ETextCombine InitialTextCombine() { | |
return ETextCombine::kNone; | |
} | |
ETextCombine TextCombine() const { | |
return static_cast<ETextCombine>(rare_inherited_data_->text_combine_); | |
} | |
void SetTextCombine(ETextCombine v) { | |
if (!(rare_inherited_data_->text_combine_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_combine_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTextCombine() { | |
rare_inherited_data_.Access()->text_combine_ = static_cast<unsigned>(ETextCombine::kNone); | |
} | |
// TextDecoration | |
// Getters and setters not generated | |
// text-decoration-color | |
// Getters and setters not generated | |
// text-decoration-skip | |
// Getters and setters not generated | |
// text-decoration-style | |
// Getters and setters not generated | |
// -webkit-text-emphasis-color | |
// Getters and setters not generated | |
// TextEmphasisColorIsCurrentColor | |
// Getters and setters not generated | |
// TextEmphasisCustomMark | |
inline static AtomicString InitialTextEmphasisCustomMark() { | |
return AtomicString(); | |
} | |
const AtomicString& TextEmphasisCustomMark() const { | |
return rare_inherited_data_->text_emphasis_custom_mark_; | |
} | |
void SetTextEmphasisCustomMark(const AtomicString& v) { | |
if (!(rare_inherited_data_->text_emphasis_custom_mark_ == v)) | |
rare_inherited_data_.Access()->text_emphasis_custom_mark_ = v; | |
} | |
void SetTextEmphasisCustomMark(AtomicString&& v) { | |
if (!(rare_inherited_data_->text_emphasis_custom_mark_ == v)) | |
rare_inherited_data_.Access()->text_emphasis_custom_mark_ = std::move(v); | |
} | |
inline void ResetTextEmphasisCustomMark() { | |
rare_inherited_data_.Access()->text_emphasis_custom_mark_ = AtomicString(); | |
} | |
// TextEmphasisFill | |
inline static TextEmphasisFill InitialTextEmphasisFill() { | |
return TextEmphasisFill::kFilled; | |
} | |
TextEmphasisFill GetTextEmphasisFill() const { | |
return static_cast<TextEmphasisFill>(rare_inherited_data_->text_emphasis_fill_); | |
} | |
void SetTextEmphasisFill(TextEmphasisFill v) { | |
if (!(rare_inherited_data_->text_emphasis_fill_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_emphasis_fill_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTextEmphasisFill() { | |
rare_inherited_data_.Access()->text_emphasis_fill_ = static_cast<unsigned>(TextEmphasisFill::kFilled); | |
} | |
// TextEmphasisMark | |
// Getters and setters not generated | |
// -webkit-text-emphasis-position | |
inline static TextEmphasisPosition InitialTextEmphasisPosition() { | |
return TextEmphasisPosition::kOver; | |
} | |
TextEmphasisPosition GetTextEmphasisPosition() const { | |
return static_cast<TextEmphasisPosition>(rare_inherited_data_->text_emphasis_position_); | |
} | |
void SetTextEmphasisPosition(TextEmphasisPosition v) { | |
if (!(rare_inherited_data_->text_emphasis_position_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_emphasis_position_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTextEmphasisPosition() { | |
rare_inherited_data_.Access()->text_emphasis_position_ = static_cast<unsigned>(TextEmphasisPosition::kOver); | |
} | |
// -webkit-text-fill-color | |
// Getters and setters not generated | |
// TextFillColorIsCurrentColor | |
// Getters and setters not generated | |
// text-indent | |
inline static Length InitialTextIndent() { | |
return Length(kFixed); | |
} | |
const Length& TextIndent() const { | |
return rare_inherited_data_->text_indent_; | |
} | |
void SetTextIndent(const Length& v) { | |
if (!(rare_inherited_data_->text_indent_ == v)) | |
rare_inherited_data_.Access()->text_indent_ = v; | |
} | |
void SetTextIndent(Length&& v) { | |
if (!(rare_inherited_data_->text_indent_ == v)) | |
rare_inherited_data_.Access()->text_indent_ = std::move(v); | |
} | |
inline void ResetTextIndent() { | |
rare_inherited_data_.Access()->text_indent_ = Length(kFixed); | |
} | |
// TextIndentLine | |
inline static TextIndentLine InitialTextIndentLine() { | |
return TextIndentLine::kFirstLine; | |
} | |
TextIndentLine GetTextIndentLine() const { | |
return static_cast<TextIndentLine>(rare_inherited_data_->text_indent_line_); | |
} | |
void SetTextIndentLine(TextIndentLine v) { | |
if (!(rare_inherited_data_->text_indent_line_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_indent_line_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTextIndentLine() { | |
rare_inherited_data_.Access()->text_indent_line_ = static_cast<unsigned>(TextIndentLine::kFirstLine); | |
} | |
// TextIndentType | |
inline static TextIndentType InitialTextIndentType() { | |
return TextIndentType::kNormal; | |
} | |
TextIndentType GetTextIndentType() const { | |
return static_cast<TextIndentType>(rare_inherited_data_->text_indent_type_); | |
} | |
void SetTextIndentType(TextIndentType v) { | |
if (!(rare_inherited_data_->text_indent_type_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_indent_type_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTextIndentType() { | |
rare_inherited_data_.Access()->text_indent_type_ = static_cast<unsigned>(TextIndentType::kNormal); | |
} | |
// text-justify | |
inline static TextJustify InitialTextJustify() { | |
return TextJustify::kAuto; | |
} | |
TextJustify GetTextJustify() const { | |
return static_cast<TextJustify>(rare_inherited_data_->text_justify_); | |
} | |
void SetTextJustify(TextJustify v) { | |
if (!(rare_inherited_data_->text_justify_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_justify_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTextJustify() { | |
rare_inherited_data_.Access()->text_justify_ = static_cast<unsigned>(TextJustify::kAuto); | |
} | |
// text-orientation | |
inline static ETextOrientation InitialTextOrientation() { | |
return ETextOrientation::kMixed; | |
} | |
ETextOrientation GetTextOrientation() const { | |
return static_cast<ETextOrientation>(rare_inherited_data_->text_orientation_); | |
} | |
void SetTextOrientation(ETextOrientation v) { | |
if (!(rare_inherited_data_->text_orientation_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_orientation_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTextOrientation() { | |
rare_inherited_data_.Access()->text_orientation_ = static_cast<unsigned>(ETextOrientation::kMixed); | |
} | |
// text-overflow | |
// Getters and setters not generated | |
// -webkit-text-security | |
inline static ETextSecurity InitialTextSecurity() { | |
return ETextSecurity::kNone; | |
} | |
ETextSecurity TextSecurity() const { | |
return static_cast<ETextSecurity>(rare_inherited_data_->text_security_); | |
} | |
void SetTextSecurity(ETextSecurity v) { | |
if (!(rare_inherited_data_->text_security_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_security_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTextSecurity() { | |
rare_inherited_data_.Access()->text_security_ = static_cast<unsigned>(ETextSecurity::kNone); | |
} | |
// text-shadow | |
// Getters and setters not generated | |
// text-size-adjust | |
inline static TextSizeAdjust InitialTextSizeAdjust() { | |
return TextSizeAdjust::AdjustAuto(); | |
} | |
const TextSizeAdjust& GetTextSizeAdjust() const { | |
return rare_inherited_data_->text_size_adjust_; | |
} | |
void SetTextSizeAdjust(const TextSizeAdjust& v) { | |
if (!(rare_inherited_data_->text_size_adjust_ == v)) | |
rare_inherited_data_.Access()->text_size_adjust_ = v; | |
} | |
void SetTextSizeAdjust(TextSizeAdjust&& v) { | |
if (!(rare_inherited_data_->text_size_adjust_ == v)) | |
rare_inherited_data_.Access()->text_size_adjust_ = std::move(v); | |
} | |
inline void ResetTextSizeAdjust() { | |
rare_inherited_data_.Access()->text_size_adjust_ = TextSizeAdjust::AdjustAuto(); | |
} | |
// -webkit-text-stroke-color | |
// Getters and setters not generated | |
// TextStrokeColorIsCurrentColor | |
// Getters and setters not generated | |
// -webkit-text-stroke-width | |
inline static float InitialTextStrokeWidth() { | |
return 0; | |
} | |
float TextStrokeWidth() const { | |
return rare_inherited_data_->text_stroke_width_; | |
} | |
void SetTextStrokeWidth(float v) { | |
if (!(rare_inherited_data_->text_stroke_width_ == v)) | |
rare_inherited_data_.Access()->text_stroke_width_ = v; | |
} | |
inline void ResetTextStrokeWidth() { | |
rare_inherited_data_.Access()->text_stroke_width_ = 0; | |
} | |
// text-transform | |
inline static ETextTransform InitialTextTransform() { | |
return ETextTransform::kNone; | |
} | |
ETextTransform TextTransform() const { | |
return static_cast<ETextTransform>(text_transform_); | |
} | |
void SetTextTransform(ETextTransform v) { | |
text_transform_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTextTransform() { | |
text_transform_ = static_cast<unsigned>(ETextTransform::kNone); | |
} | |
// text-transform | |
inline static bool InitialTextTransformIsInherited() { | |
return true; | |
} | |
bool TextTransformIsInherited() const { | |
return static_cast<bool>(text_transform_is_inherited_); | |
} | |
void SetTextTransformIsInherited(bool v) { | |
text_transform_is_inherited_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTextTransformIsInherited() { | |
text_transform_is_inherited_ = static_cast<unsigned>(true); | |
} | |
// text-underline-position | |
inline static TextUnderlinePosition InitialTextUnderlinePosition() { | |
return TextUnderlinePosition::kAuto; | |
} | |
TextUnderlinePosition GetTextUnderlinePosition() const { | |
return static_cast<TextUnderlinePosition>(rare_inherited_data_->text_underline_position_); | |
} | |
void SetTextUnderlinePosition(TextUnderlinePosition v) { | |
if (!(rare_inherited_data_->text_underline_position_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_underline_position_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTextUnderlinePosition() { | |
rare_inherited_data_.Access()->text_underline_position_ = static_cast<unsigned>(TextUnderlinePosition::kAuto); | |
} | |
// top | |
inline static Length InitialTop() { | |
return Length(); | |
} | |
const Length& Top() const { | |
return surround_data_->top_; | |
} | |
void SetTop(const Length& v) { | |
if (!(surround_data_->top_ == v)) | |
surround_data_.Access()->top_ = v; | |
} | |
void SetTop(Length&& v) { | |
if (!(surround_data_->top_ == v)) | |
surround_data_.Access()->top_ = std::move(v); | |
} | |
inline void ResetTop() { | |
surround_data_.Access()->top_ = Length(); | |
} | |
// touch-action | |
// Getters and setters not generated | |
// transform-box | |
inline static ETransformBox InitialTransformBox() { | |
return ETransformBox::kBorderBox; | |
} | |
ETransformBox TransformBox() const { | |
return static_cast<ETransformBox>(transform_box_); | |
} | |
void SetTransformBox(ETransformBox v) { | |
transform_box_ = static_cast<unsigned>(v); | |
} | |
inline void ResetTransformBox() { | |
transform_box_ = static_cast<unsigned>(ETransformBox::kBorderBox); | |
} | |
// TransformData | |
// Getters and setters not generated | |
// transform-style | |
// Getters and setters not generated | |
// Transitions | |
// Getters and setters not generated | |
// unicode-bidi | |
inline static UnicodeBidi InitialUnicodeBidi() { | |
return UnicodeBidi::kNormal; | |
} | |
UnicodeBidi GetUnicodeBidi() const { | |
return static_cast<UnicodeBidi>(unicode_bidi_); | |
} | |
void SetUnicodeBidi(UnicodeBidi v) { | |
unicode_bidi_ = static_cast<unsigned>(v); | |
} | |
inline void ResetUnicodeBidi() { | |
unicode_bidi_ = static_cast<unsigned>(UnicodeBidi::kNormal); | |
} | |
// Unique | |
bool Unique() const { | |
return static_cast<bool>(unique_); | |
} | |
void SetUnique() { | |
unique_ = static_cast<unsigned>(true); | |
} | |
// -webkit-user-drag | |
// Getters and setters not generated | |
// -webkit-user-modify | |
inline static EUserModify InitialUserModify() { | |
return EUserModify::kReadOnly; | |
} | |
EUserModify UserModify() const { | |
return static_cast<EUserModify>(rare_inherited_data_->user_modify_); | |
} | |
void SetUserModify(EUserModify v) { | |
if (!(rare_inherited_data_->user_modify_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->user_modify_ = static_cast<unsigned>(v); | |
} | |
inline void ResetUserModify() { | |
rare_inherited_data_.Access()->user_modify_ = static_cast<unsigned>(EUserModify::kReadOnly); | |
} | |
// user-select | |
inline static EUserSelect InitialUserSelect() { | |
return EUserSelect::kText; | |
} | |
EUserSelect UserSelect() const { | |
return static_cast<EUserSelect>(rare_inherited_data_->user_select_); | |
} | |
void SetUserSelect(EUserSelect v) { | |
if (!(rare_inherited_data_->user_select_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->user_select_ = static_cast<unsigned>(v); | |
} | |
inline void ResetUserSelect() { | |
rare_inherited_data_.Access()->user_select_ = static_cast<unsigned>(EUserSelect::kText); | |
} | |
// VerticalAlign | |
// Getters and setters not generated | |
// VerticalAlignLength | |
// Getters and setters not generated | |
// -webkit-border-vertical-spacing | |
inline static short InitialVerticalBorderSpacing() { | |
return 0; | |
} | |
short VerticalBorderSpacing() const { | |
return inherited_data_->vertical_border_spacing_; | |
} | |
void SetVerticalBorderSpacing(short v) { | |
if (!(inherited_data_->vertical_border_spacing_ == v)) | |
inherited_data_.Access()->vertical_border_spacing_ = v; | |
} | |
inline void ResetVerticalBorderSpacing() { | |
inherited_data_.Access()->vertical_border_spacing_ = 0; | |
} | |
// visibility | |
inline static EVisibility InitialVisibility() { | |
return EVisibility::kVisible; | |
} | |
EVisibility Visibility() const { | |
return static_cast<EVisibility>(visibility_); | |
} | |
void SetVisibility(EVisibility v) { | |
visibility_ = static_cast<unsigned>(v); | |
} | |
inline void ResetVisibility() { | |
visibility_ = static_cast<unsigned>(EVisibility::kVisible); | |
} | |
// visibility | |
inline static bool InitialVisibilityIsInherited() { | |
return true; | |
} | |
bool VisibilityIsInherited() const { | |
return static_cast<bool>(visibility_is_inherited_); | |
} | |
void SetVisibilityIsInherited(bool v) { | |
visibility_is_inherited_ = static_cast<unsigned>(v); | |
} | |
inline void ResetVisibilityIsInherited() { | |
visibility_is_inherited_ = static_cast<unsigned>(true); | |
} | |
// VisitedLinkBackgroundColor | |
// Getters and setters not generated | |
// VisitedLinkBorderBottomColor | |
// Getters and setters not generated | |
// VisitedLinkBorderLeftColor | |
// Getters and setters not generated | |
// VisitedLinkBorderRightColor | |
// Getters and setters not generated | |
// VisitedLinkBorderTopColor | |
// Getters and setters not generated | |
// VisitedLinkCaretColor | |
// Getters and setters not generated | |
// VisitedLinkCaretColorIsAuto | |
// Getters and setters not generated | |
// VisitedLinkCaretColorIsCurrentColor | |
// Getters and setters not generated | |
// VisitedLinkColor | |
inline static Color InitialVisitedLinkColor() { | |
return Color::kBlack; | |
} | |
const Color& VisitedLinkColor() const { | |
return inherited_data_->visited_link_color_; | |
} | |
void SetVisitedLinkColor(const Color& v) { | |
if (!(inherited_data_->visited_link_color_ == v)) | |
inherited_data_.Access()->visited_link_color_ = v; | |
} | |
void SetVisitedLinkColor(Color&& v) { | |
if (!(inherited_data_->visited_link_color_ == v)) | |
inherited_data_.Access()->visited_link_color_ = std::move(v); | |
} | |
inline void ResetVisitedLinkColor() { | |
inherited_data_.Access()->visited_link_color_ = Color::kBlack; | |
} | |
// VisitedLinkOutlineColor | |
// Getters and setters not generated | |
// VisitedLinkTextDecorationColor | |
// Getters and setters not generated | |
// VisitedLinkTextEmphasisColor | |
// Getters and setters not generated | |
// VisitedLinkTextEmphasisColorIsCurrentColor | |
// Getters and setters not generated | |
// VisitedLinkTextFillColor | |
// Getters and setters not generated | |
// VisitedLinkTextFillColorIsCurrentColor | |
// Getters and setters not generated | |
// VisitedLinkTextStrokeColor | |
// Getters and setters not generated | |
// VisitedLinkTextStrokeColorIsCurrentColor | |
// Getters and setters not generated | |
// white-space | |
inline static EWhiteSpace InitialWhiteSpace() { | |
return EWhiteSpace::kNormal; | |
} | |
EWhiteSpace WhiteSpace() const { | |
return static_cast<EWhiteSpace>(white_space_); | |
} | |
void SetWhiteSpace(EWhiteSpace v) { | |
white_space_ = static_cast<unsigned>(v); | |
} | |
inline void ResetWhiteSpace() { | |
white_space_ = static_cast<unsigned>(EWhiteSpace::kNormal); | |
} | |
// white-space | |
inline static bool InitialWhiteSpaceIsInherited() { | |
return true; | |
} | |
bool WhiteSpaceIsInherited() const { | |
return static_cast<bool>(white_space_is_inherited_); | |
} | |
void SetWhiteSpaceIsInherited(bool v) { | |
white_space_is_inherited_ = static_cast<unsigned>(v); | |
} | |
inline void ResetWhiteSpaceIsInherited() { | |
white_space_is_inherited_ = static_cast<unsigned>(true); | |
} | |
// widows | |
inline static short InitialWidows() { | |
return 2; | |
} | |
short Widows() const { | |
return rare_inherited_data_->widows_; | |
} | |
void SetWidows(short v) { | |
if (!(rare_inherited_data_->widows_ == v)) | |
rare_inherited_data_.Access()->widows_ = v; | |
} | |
inline void ResetWidows() { | |
rare_inherited_data_.Access()->widows_ = 2; | |
} | |
// width | |
inline static Length InitialWidth() { | |
return Length(); | |
} | |
const Length& Width() const { | |
return box_data_->width_; | |
} | |
void SetWidth(const Length& v) { | |
if (!(box_data_->width_ == v)) | |
box_data_.Access()->width_ = v; | |
} | |
void SetWidth(Length&& v) { | |
if (!(box_data_->width_ == v)) | |
box_data_.Access()->width_ = std::move(v); | |
} | |
inline void ResetWidth() { | |
box_data_.Access()->width_ = Length(); | |
} | |
// WillChangeContents | |
// Getters and setters not generated | |
// WillChangeProperties | |
// Getters and setters not generated | |
// WillChangeScrollPosition | |
// Getters and setters not generated | |
// word-break | |
inline static EWordBreak InitialWordBreak() { | |
return EWordBreak::kNormal; | |
} | |
EWordBreak WordBreak() const { | |
return static_cast<EWordBreak>(rare_inherited_data_->word_break_); | |
} | |
void SetWordBreak(EWordBreak v) { | |
if (!(rare_inherited_data_->word_break_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->word_break_ = static_cast<unsigned>(v); | |
} | |
inline void ResetWordBreak() { | |
rare_inherited_data_.Access()->word_break_ = static_cast<unsigned>(EWordBreak::kNormal); | |
} | |
// writing-mode | |
inline static WritingMode InitialWritingMode() { | |
return WritingMode::kHorizontalTb; | |
} | |
WritingMode GetWritingMode() const { | |
return static_cast<WritingMode>(writing_mode_); | |
} | |
void SetWritingMode(WritingMode v) { | |
writing_mode_ = static_cast<unsigned>(v); | |
} | |
inline void ResetWritingMode() { | |
writing_mode_ = static_cast<unsigned>(WritingMode::kHorizontalTb); | |
} | |
// z-index | |
// Getters and setters not generated | |
// zoom | |
// Getters and setters not generated | |
private: | |
class StyleBoxData : public RefCounted<StyleBoxData> { | |
public: | |
static PassRefPtr<StyleBoxData> Create() { | |
return AdoptRef(new StyleBoxData); | |
} | |
PassRefPtr<StyleBoxData> Copy() const { | |
return AdoptRef(new StyleBoxData(*this)); | |
} | |
bool operator==(const StyleBoxData& other) const { | |
return ( | |
height_ == other.height_ | |
&& max_width_ == other.max_width_ | |
&& width_ == other.width_ | |
&& min_height_ == other.min_height_ | |
&& max_height_ == other.max_height_ | |
&& min_width_ == other.min_width_ | |
&& vertical_align_length_ == other.vertical_align_length_ | |
&& z_index_ == other.z_index_ | |
&& box_decoration_break_ == other.box_decoration_break_ | |
&& box_sizing_ == other.box_sizing_ | |
&& has_auto_z_index_ == other.has_auto_z_index_ | |
); | |
} | |
bool operator!=(const StyleBoxData& other) const { return !(*this == other); } | |
Length height_; | |
Length max_width_; | |
Length width_; | |
Length min_height_; | |
Length max_height_; | |
Length min_width_; | |
Length vertical_align_length_; | |
int z_index_; | |
unsigned box_decoration_break_ : 1; // EBoxDecorationBreak | |
unsigned box_sizing_ : 1; // EBoxSizing | |
unsigned has_auto_z_index_ : 1; // bool | |
private: | |
StyleBoxData(); | |
StyleBoxData(const StyleBoxData&); | |
}; | |
class StyleRareInheritedData : public RefCounted<StyleRareInheritedData> { | |
public: | |
static PassRefPtr<StyleRareInheritedData> Create() { | |
return AdoptRef(new StyleRareInheritedData); | |
} | |
PassRefPtr<StyleRareInheritedData> Copy() const { | |
return AdoptRef(new StyleRareInheritedData(*this)); | |
} | |
bool operator==(const StyleRareInheritedData& other) const { | |
return ( | |
hyphenation_string_ == other.hyphenation_string_ | |
&& highlight_ == other.highlight_ | |
&& text_emphasis_custom_mark_ == other.text_emphasis_custom_mark_ | |
&& DataEquivalent(quotes_, other.quotes_) | |
&& DataEquivalent(text_shadow_, other.text_shadow_) | |
&& DataEquivalent(applied_text_decorations_, other.applied_text_decorations_) | |
&& DataEquivalent(inherited_variables_, other.inherited_variables_) | |
&& DataEquivalent(list_style_image_, other.list_style_image_) | |
&& DataEquivalent(cursor_data_, other.cursor_data_) | |
&& text_indent_ == other.text_indent_ | |
&& text_size_adjust_ == other.text_size_adjust_ | |
&& tab_size_ == other.tab_size_ | |
&& text_stroke_width_ == other.text_stroke_width_ | |
&& effective_zoom_ == other.effective_zoom_ | |
&& text_fill_color_ == other.text_fill_color_ | |
&& tap_highlight_color_ == other.tap_highlight_color_ | |
&& text_stroke_color_ == other.text_stroke_color_ | |
&& caret_color_ == other.caret_color_ | |
&& text_emphasis_color_ == other.text_emphasis_color_ | |
&& visited_link_text_stroke_color_ == other.visited_link_text_stroke_color_ | |
&& visited_link_text_fill_color_ == other.visited_link_text_fill_color_ | |
&& visited_link_text_emphasis_color_ == other.visited_link_text_emphasis_color_ | |
&& visited_link_caret_color_ == other.visited_link_caret_color_ | |
&& widows_ == other.widows_ | |
&& orphans_ == other.orphans_ | |
&& hyphenation_limit_before_ == other.hyphenation_limit_before_ | |
&& hyphenation_limit_after_ == other.hyphenation_limit_after_ | |
&& hyphenation_limit_lines_ == other.hyphenation_limit_lines_ | |
&& line_height_step_ == other.line_height_step_ | |
&& image_rendering_ == other.image_rendering_ | |
&& line_break_ == other.line_break_ | |
&& speak_ == other.speak_ | |
&& text_align_last_ == other.text_align_last_ | |
&& text_decoration_skip_ == other.text_decoration_skip_ | |
&& text_emphasis_mark_ == other.text_emphasis_mark_ | |
&& hyphens_ == other.hyphens_ | |
&& text_justify_ == other.text_justify_ | |
&& text_orientation_ == other.text_orientation_ | |
&& text_security_ == other.text_security_ | |
&& user_modify_ == other.user_modify_ | |
&& user_select_ == other.user_select_ | |
&& word_break_ == other.word_break_ | |
&& caret_color_is_auto_ == other.caret_color_is_auto_ | |
&& caret_color_is_current_color_ == other.caret_color_is_current_color_ | |
&& overflow_wrap_ == other.overflow_wrap_ | |
&& respect_image_orientation_ == other.respect_image_orientation_ | |
&& ruby_position_ == other.ruby_position_ | |
&& self_or_ancestor_has_dir_auto_attribute_ == other.self_or_ancestor_has_dir_auto_attribute_ | |
&& subtree_is_sticky_ == other.subtree_is_sticky_ | |
&& subtree_will_change_contents_ == other.subtree_will_change_contents_ | |
&& text_combine_ == other.text_combine_ | |
&& text_emphasis_color_is_current_color_ == other.text_emphasis_color_is_current_color_ | |
&& text_emphasis_fill_ == other.text_emphasis_fill_ | |
&& text_emphasis_position_ == other.text_emphasis_position_ | |
&& text_fill_color_is_current_color_ == other.text_fill_color_is_current_color_ | |
&& text_indent_line_ == other.text_indent_line_ | |
&& text_indent_type_ == other.text_indent_type_ | |
&& text_stroke_color_is_current_color_ == other.text_stroke_color_is_current_color_ | |
&& text_underline_position_ == other.text_underline_position_ | |
&& visited_link_caret_color_is_auto_ == other.visited_link_caret_color_is_auto_ | |
&& visited_link_caret_color_is_current_color_ == other.visited_link_caret_color_is_current_color_ | |
&& visited_link_text_emphasis_color_is_current_color_ == other.visited_link_text_emphasis_color_is_current_color_ | |
&& visited_link_text_fill_color_is_current_color_ == other.visited_link_text_fill_color_is_current_color_ | |
&& visited_link_text_stroke_color_is_current_color_ == other.visited_link_text_stroke_color_is_current_color_ | |
); | |
} | |
bool operator!=(const StyleRareInheritedData& other) const { return !(*this == other); } | |
AtomicString hyphenation_string_; | |
AtomicString highlight_; | |
AtomicString text_emphasis_custom_mark_; | |
RefPtr<QuotesData> quotes_; | |
RefPtr<ShadowList> text_shadow_; | |
RefPtr<AppliedTextDecorationList> applied_text_decorations_; | |
RefPtr<StyleInheritedVariables> inherited_variables_; | |
Persistent<StyleImage> list_style_image_; | |
Persistent<CursorList> cursor_data_; | |
Length text_indent_; | |
TextSizeAdjust text_size_adjust_; | |
TabSize tab_size_; | |
float text_stroke_width_; | |
float effective_zoom_; | |
Color text_fill_color_; | |
Color tap_highlight_color_; | |
Color text_stroke_color_; | |
Color caret_color_; | |
Color text_emphasis_color_; | |
Color visited_link_text_stroke_color_; | |
Color visited_link_text_fill_color_; | |
Color visited_link_text_emphasis_color_; | |
Color visited_link_caret_color_; | |
short widows_; | |
short orphans_; | |
short hyphenation_limit_before_; | |
short hyphenation_limit_after_; | |
short hyphenation_limit_lines_; | |
uint8_t line_height_step_; | |
unsigned image_rendering_ : 3; // EImageRendering | |
unsigned line_break_ : 3; // LineBreak | |
unsigned speak_ : 3; // ESpeak | |
unsigned text_align_last_ : 3; // ETextAlignLast | |
unsigned text_decoration_skip_ : 3; // TextDecorationSkip | |
unsigned text_emphasis_mark_ : 3; // TextEmphasisMark | |
unsigned hyphens_ : 2; // Hyphens | |
unsigned text_justify_ : 2; // TextJustify | |
unsigned text_orientation_ : 2; // ETextOrientation | |
unsigned text_security_ : 2; // ETextSecurity | |
unsigned user_modify_ : 2; // EUserModify | |
unsigned user_select_ : 2; // EUserSelect | |
unsigned word_break_ : 2; // EWordBreak | |
unsigned caret_color_is_auto_ : 1; // bool | |
unsigned caret_color_is_current_color_ : 1; // bool | |
unsigned overflow_wrap_ : 1; // EOverflowWrap | |
unsigned respect_image_orientation_ : 1; // bool | |
unsigned ruby_position_ : 1; // RubyPosition | |
unsigned self_or_ancestor_has_dir_auto_attribute_ : 1; // bool | |
unsigned subtree_is_sticky_ : 1; // bool | |
unsigned subtree_will_change_contents_ : 1; // bool | |
unsigned text_combine_ : 1; // ETextCombine | |
unsigned text_emphasis_color_is_current_color_ : 1; // bool | |
unsigned text_emphasis_fill_ : 1; // TextEmphasisFill | |
unsigned text_emphasis_position_ : 1; // TextEmphasisPosition | |
unsigned text_fill_color_is_current_color_ : 1; // bool | |
unsigned text_indent_line_ : 1; // TextIndentLine | |
unsigned text_indent_type_ : 1; // TextIndentType | |
unsigned text_stroke_color_is_current_color_ : 1; // bool | |
unsigned text_underline_position_ : 1; // TextUnderlinePosition | |
unsigned visited_link_caret_color_is_auto_ : 1; // bool | |
unsigned visited_link_caret_color_is_current_color_ : 1; // bool | |
unsigned visited_link_text_emphasis_color_is_current_color_ : 1; // bool | |
unsigned visited_link_text_fill_color_is_current_color_ : 1; // bool | |
unsigned visited_link_text_stroke_color_is_current_color_ : 1; // bool | |
private: | |
StyleRareInheritedData(); | |
StyleRareInheritedData(const StyleRareInheritedData&); | |
}; | |
class StyleWillChangeData : public RefCounted<StyleWillChangeData> { | |
public: | |
static PassRefPtr<StyleWillChangeData> Create() { | |
return AdoptRef(new StyleWillChangeData); | |
} | |
PassRefPtr<StyleWillChangeData> Copy() const { | |
return AdoptRef(new StyleWillChangeData(*this)); | |
} | |
bool operator==(const StyleWillChangeData& other) const { | |
return ( | |
will_change_properties_ == other.will_change_properties_ | |
&& will_change_contents_ == other.will_change_contents_ | |
&& will_change_scroll_position_ == other.will_change_scroll_position_ | |
); | |
} | |
bool operator!=(const StyleWillChangeData& other) const { return !(*this == other); } | |
Vector<CSSPropertyID> will_change_properties_; | |
unsigned will_change_contents_ : 1; // unsigned | |
unsigned will_change_scroll_position_ : 1; // unsigned | |
private: | |
StyleWillChangeData(); | |
StyleWillChangeData(const StyleWillChangeData&); | |
}; | |
class StyleDeprecatedFlexibleBoxData : public RefCounted<StyleDeprecatedFlexibleBoxData> { | |
public: | |
static PassRefPtr<StyleDeprecatedFlexibleBoxData> Create() { | |
return AdoptRef(new StyleDeprecatedFlexibleBoxData); | |
} | |
PassRefPtr<StyleDeprecatedFlexibleBoxData> Copy() const { | |
return AdoptRef(new StyleDeprecatedFlexibleBoxData(*this)); | |
} | |
bool operator==(const StyleDeprecatedFlexibleBoxData& other) const { | |
return ( | |
box_flex_ == other.box_flex_ | |
&& box_ordinal_group_ == other.box_ordinal_group_ | |
&& box_flex_group_ == other.box_flex_group_ | |
&& box_align_ == other.box_align_ | |
&& box_pack_ == other.box_pack_ | |
&& box_lines_ == other.box_lines_ | |
&& box_orient_ == other.box_orient_ | |
); | |
} | |
bool operator!=(const StyleDeprecatedFlexibleBoxData& other) const { return !(*this == other); } | |
float box_flex_; | |
unsigned box_ordinal_group_; | |
unsigned box_flex_group_; | |
unsigned box_align_ : 3; // EBoxAlignment | |
unsigned box_pack_ : 2; // EBoxPack | |
unsigned box_lines_ : 1; // EBoxLines | |
unsigned box_orient_ : 1; // EBoxOrient | |
private: | |
StyleDeprecatedFlexibleBoxData(); | |
StyleDeprecatedFlexibleBoxData(const StyleDeprecatedFlexibleBoxData&); | |
}; | |
class StyleRareNonInheritedData : public RefCounted<StyleRareNonInheritedData> { | |
public: | |
static PassRefPtr<StyleRareNonInheritedData> Create() { | |
return AdoptRef(new StyleRareNonInheritedData); | |
} | |
PassRefPtr<StyleRareNonInheritedData> Copy() const { | |
return AdoptRef(new StyleRareNonInheritedData(*this)); | |
} | |
bool operator==(const StyleRareNonInheritedData& other) const { | |
return ( | |
will_change_data_ == other.will_change_data_ | |
&& deprecated_flexible_box_data_ == other.deprecated_flexible_box_data_ | |
&& DataEquivalent(flexible_box_data_, other.flexible_box_data_) | |
&& DataEquivalent(multi_col_data_, other.multi_col_data_) | |
&& DataEquivalent(transform_data_, other.transform_data_) | |
&& DataEquivalent(grid_data_, other.grid_data_) | |
&& DataEquivalent(grid_item_data_, other.grid_item_data_) | |
&& DataEquivalent(scroll_snap_data_, other.scroll_snap_data_) | |
&& DataEquivalent(clip_path_, other.clip_path_) | |
&& DataEquivalent(box_reflect_, other.box_reflect_) | |
&& DataEquivalent(box_shadow_, other.box_shadow_) | |
&& DataEquivalent(filter_, other.filter_) | |
&& DataEquivalent(backdrop_filter_, other.backdrop_filter_) | |
&& DataEquivalent(shape_outside_, other.shape_outside_) | |
&& DataEquivalent(content_, other.content_) | |
&& DataEquivalent(counter_directives_, other.counter_directives_) | |
&& DataEquivalent(animations_, other.animations_) | |
&& DataEquivalent(transitions_, other.transitions_) | |
&& DataEquivalent(non_inherited_variables_, other.non_inherited_variables_) | |
&& callback_selectors_ == other.callback_selectors_ | |
&& mask_ == other.mask_ | |
&& mask_box_image_ == other.mask_box_image_ | |
&& page_size_ == other.page_size_ | |
&& perspective_origin_ == other.perspective_origin_ | |
&& object_position_ == other.object_position_ | |
&& shape_margin_ == other.shape_margin_ | |
&& shape_image_threshold_ == other.shape_image_threshold_ | |
&& opacity_ == other.opacity_ | |
&& perspective_ == other.perspective_ | |
&& text_decoration_color_ == other.text_decoration_color_ | |
&& visited_link_text_decoration_color_ == other.visited_link_text_decoration_color_ | |
&& visited_link_background_color_ == other.visited_link_background_color_ | |
&& visited_link_outline_color_ == other.visited_link_outline_color_ | |
&& visited_link_border_left_color_ == other.visited_link_border_left_color_ | |
&& visited_link_border_right_color_ == other.visited_link_border_right_color_ | |
&& visited_link_border_top_color_ == other.visited_link_border_top_color_ | |
&& visited_link_border_bottom_color_ == other.visited_link_border_bottom_color_ | |
&& line_clamp_ == other.line_clamp_ | |
&& outline_ == other.outline_ | |
&& order_ == other.order_ | |
&& align_self_ == other.align_self_ | |
&& justify_self_ == other.justify_self_ | |
&& justify_items_ == other.justify_items_ | |
&& align_items_ == other.align_items_ | |
&& align_content_ == other.align_content_ | |
&& justify_content_ == other.justify_content_ | |
&& appearance_ == other.appearance_ | |
&& touch_action_ == other.touch_action_ | |
&& effective_blend_mode_ == other.effective_blend_mode_ | |
&& contain_ == other.contain_ | |
&& object_fit_ == other.object_fit_ | |
&& text_decoration_style_ == other.text_decoration_style_ | |
&& draggable_region_mode_ == other.draggable_region_mode_ | |
&& margin_after_collapse_ == other.margin_after_collapse_ | |
&& backface_visibility_ == other.backface_visibility_ | |
&& margin_before_collapse_ == other.margin_before_collapse_ | |
&& page_size_type_ == other.page_size_type_ | |
&& resize_ == other.resize_ | |
&& scroll_behavior_ == other.scroll_behavior_ | |
&& scroll_snap_type_ == other.scroll_snap_type_ | |
&& user_drag_ == other.user_drag_ | |
&& has_author_background_ == other.has_author_background_ | |
&& has_author_border_ == other.has_author_border_ | |
&& has_compositor_proxy_ == other.has_compositor_proxy_ | |
&& has_current_backdrop_filter_animation_ == other.has_current_backdrop_filter_animation_ | |
&& has_current_filter_animation_ == other.has_current_filter_animation_ | |
&& has_current_opacity_animation_ == other.has_current_opacity_animation_ | |
&& has_current_transform_animation_ == other.has_current_transform_animation_ | |
&& has_inline_transform_ == other.has_inline_transform_ | |
&& is_stacking_context_ == other.is_stacking_context_ | |
&& isolation_ == other.isolation_ | |
&& requires_accelerated_compositing_for_external_reasons_ == other.requires_accelerated_compositing_for_external_reasons_ | |
&& text_overflow_ == other.text_overflow_ | |
&& transform_style_3d_ == other.transform_style_3d_ | |
); | |
} | |
bool operator!=(const StyleRareNonInheritedData& other) const { return !(*this == other); } | |
DataRef<StyleWillChangeData> will_change_data_; | |
DataRef<StyleDeprecatedFlexibleBoxData> deprecated_flexible_box_data_; | |
DataRef<StyleFlexibleBoxData> flexible_box_data_; | |
DataRef<StyleMultiColData> multi_col_data_; | |
DataRef<StyleTransformData> transform_data_; | |
DataRef<StyleGridData> grid_data_; | |
DataRef<StyleGridItemData> grid_item_data_; | |
DataRef<StyleScrollSnapData> scroll_snap_data_; | |
RefPtr<ClipPathOperation> clip_path_; | |
RefPtr<StyleReflection> box_reflect_; | |
RefPtr<ShadowList> box_shadow_; | |
DataPersistent<StyleFilterData> filter_; | |
DataPersistent<StyleFilterData> backdrop_filter_; | |
Persistent<ShapeValue> shape_outside_; | |
Persistent<ContentData> content_; | |
std::unique_ptr<CounterDirectiveMap> counter_directives_; | |
std::unique_ptr<CSSAnimationData> animations_; | |
std::unique_ptr<CSSTransitionData> transitions_; | |
std::unique_ptr<PaintImages> paint_images_; | |
std::unique_ptr<StyleNonInheritedVariables> non_inherited_variables_; | |
Vector<String> callback_selectors_; | |
FillLayer mask_; | |
NinePieceImage mask_box_image_; | |
FloatSize page_size_; | |
LengthPoint perspective_origin_; | |
LengthPoint object_position_; | |
Length shape_margin_; | |
float shape_image_threshold_; | |
float opacity_; | |
float perspective_; | |
StyleColor text_decoration_color_; | |
StyleColor visited_link_text_decoration_color_; | |
StyleColor visited_link_background_color_; | |
StyleColor visited_link_outline_color_; | |
StyleColor visited_link_border_left_color_; | |
StyleColor visited_link_border_right_color_; | |
StyleColor visited_link_border_top_color_; | |
StyleColor visited_link_border_bottom_color_; | |
LineClampValue line_clamp_; | |
OutlineValue outline_; | |
int order_; | |
StyleSelfAlignmentData align_self_; | |
StyleSelfAlignmentData justify_self_; | |
StyleSelfAlignmentData justify_items_; | |
StyleSelfAlignmentData align_items_; | |
StyleContentAlignmentData align_content_; | |
StyleContentAlignmentData justify_content_; | |
unsigned appearance_ : 6; // ControlPart | |
unsigned touch_action_ : 6; // TouchAction | |
unsigned effective_blend_mode_ : 5; // WebBlendMode | |
unsigned contain_ : 4; // Containment | |
unsigned object_fit_ : 3; // EObjectFit | |
unsigned text_decoration_style_ : 3; // TextDecorationStyle | |
unsigned draggable_region_mode_ : 2; // EDraggableRegionMode | |
unsigned margin_after_collapse_ : 2; // EMarginCollapse | |
unsigned backface_visibility_ : 1; // EBackfaceVisibility | |
unsigned margin_before_collapse_ : 2; // EMarginCollapse | |
unsigned page_size_type_ : 2; // PageSizeType | |
unsigned resize_ : 2; // EResize | |
unsigned scroll_behavior_ : 2; // ScrollBehavior | |
unsigned scroll_snap_type_ : 2; // ScrollSnapType | |
unsigned user_drag_ : 2; // EUserDrag | |
unsigned has_author_background_ : 1; // bool | |
unsigned has_author_border_ : 1; // bool | |
unsigned has_compositor_proxy_ : 1; // bool | |
unsigned has_current_backdrop_filter_animation_ : 1; // bool | |
unsigned has_current_filter_animation_ : 1; // bool | |
unsigned has_current_opacity_animation_ : 1; // bool | |
unsigned has_current_transform_animation_ : 1; // bool | |
unsigned has_inline_transform_ : 1; // bool | |
unsigned is_stacking_context_ : 1; // bool | |
unsigned isolation_ : 1; // EIsolation | |
unsigned requires_accelerated_compositing_for_external_reasons_ : 1; // bool | |
unsigned running_backdrop_filter_animation_on_compositor_ : 1; // bool | |
unsigned running_filter_animation_on_compositor_ : 1; // bool | |
unsigned running_opacity_animation_on_compositor_ : 1; // bool | |
unsigned running_transform_animation_on_compositor_ : 1; // bool | |
unsigned text_overflow_ : 1; // TextOverflow | |
unsigned transform_style_3d_ : 1; // ETransformStyle3D | |
private: | |
StyleRareNonInheritedData(); | |
StyleRareNonInheritedData(const StyleRareNonInheritedData&); | |
}; | |
class StyleSurroundData : public RefCounted<StyleSurroundData> { | |
public: | |
static PassRefPtr<StyleSurroundData> Create() { | |
return AdoptRef(new StyleSurroundData); | |
} | |
PassRefPtr<StyleSurroundData> Copy() const { | |
return AdoptRef(new StyleSurroundData(*this)); | |
} | |
bool operator==(const StyleSurroundData& other) const { | |
return ( | |
border_image_ == other.border_image_ | |
&& border_bottom_left_radius_ == other.border_bottom_left_radius_ | |
&& border_top_right_radius_ == other.border_top_right_radius_ | |
&& border_bottom_right_radius_ == other.border_bottom_right_radius_ | |
&& border_top_left_radius_ == other.border_top_left_radius_ | |
&& padding_bottom_ == other.padding_bottom_ | |
&& margin_right_ == other.margin_right_ | |
&& padding_right_ == other.padding_right_ | |
&& bottom_ == other.bottom_ | |
&& top_ == other.top_ | |
&& margin_top_ == other.margin_top_ | |
&& padding_left_ == other.padding_left_ | |
&& left_ == other.left_ | |
&& margin_bottom_ == other.margin_bottom_ | |
&& right_ == other.right_ | |
&& margin_left_ == other.margin_left_ | |
&& padding_top_ == other.padding_top_ | |
&& border_right_color_ == other.border_right_color_ | |
&& border_left_color_ == other.border_left_color_ | |
&& border_top_color_ == other.border_top_color_ | |
&& border_bottom_color_ == other.border_bottom_color_ | |
&& border_right_width_ == other.border_right_width_ | |
&& border_left_width_ == other.border_left_width_ | |
&& border_top_width_ == other.border_top_width_ | |
&& border_bottom_width_ == other.border_bottom_width_ | |
&& border_bottom_style_ == other.border_bottom_style_ | |
&& border_left_style_ == other.border_left_style_ | |
&& border_right_style_ == other.border_right_style_ | |
&& border_top_style_ == other.border_top_style_ | |
&& border_bottom_color_is_current_color_ == other.border_bottom_color_is_current_color_ | |
&& border_left_color_is_current_color_ == other.border_left_color_is_current_color_ | |
&& border_right_color_is_current_color_ == other.border_right_color_is_current_color_ | |
&& border_top_color_is_current_color_ == other.border_top_color_is_current_color_ | |
); | |
} | |
bool operator!=(const StyleSurroundData& other) const { return !(*this == other); } | |
NinePieceImage border_image_; | |
LengthSize border_bottom_left_radius_; | |
LengthSize border_top_right_radius_; | |
LengthSize border_bottom_right_radius_; | |
LengthSize border_top_left_radius_; | |
Length padding_bottom_; | |
Length margin_right_; | |
Length padding_right_; | |
Length bottom_; | |
Length top_; | |
Length margin_top_; | |
Length padding_left_; | |
Length left_; | |
Length margin_bottom_; | |
Length right_; | |
Length margin_left_; | |
Length padding_top_; | |
Color border_right_color_; | |
Color border_left_color_; | |
Color border_top_color_; | |
Color border_bottom_color_; | |
LayoutUnit border_right_width_; | |
LayoutUnit border_left_width_; | |
LayoutUnit border_top_width_; | |
LayoutUnit border_bottom_width_; | |
unsigned border_bottom_style_ : 4; // EBorderStyle | |
unsigned border_left_style_ : 4; // EBorderStyle | |
unsigned border_right_style_ : 4; // EBorderStyle | |
unsigned border_top_style_ : 4; // EBorderStyle | |
unsigned border_bottom_color_is_current_color_ : 1; // bool | |
unsigned border_left_color_is_current_color_ : 1; // bool | |
unsigned border_right_color_is_current_color_ : 1; // bool | |
unsigned border_top_color_is_current_color_ : 1; // bool | |
private: | |
StyleSurroundData(); | |
StyleSurroundData(const StyleSurroundData&); | |
}; | |
class StyleVisualData : public RefCounted<StyleVisualData> { | |
public: | |
static PassRefPtr<StyleVisualData> Create() { | |
return AdoptRef(new StyleVisualData); | |
} | |
PassRefPtr<StyleVisualData> Copy() const { | |
return AdoptRef(new StyleVisualData(*this)); | |
} | |
bool operator==(const StyleVisualData& other) const { | |
return ( | |
clip_ == other.clip_ | |
&& zoom_ == other.zoom_ | |
&& text_decoration_ == other.text_decoration_ | |
&& has_auto_clip_ == other.has_auto_clip_ | |
); | |
} | |
bool operator!=(const StyleVisualData& other) const { return !(*this == other); } | |
LengthBox clip_; | |
float zoom_; | |
unsigned text_decoration_ : 4; // TextDecoration | |
unsigned has_auto_clip_ : 1; // bool | |
private: | |
StyleVisualData(); | |
StyleVisualData(const StyleVisualData&); | |
}; | |
class StyleBackgroundData : public RefCounted<StyleBackgroundData> { | |
public: | |
static PassRefPtr<StyleBackgroundData> Create() { | |
return AdoptRef(new StyleBackgroundData); | |
} | |
PassRefPtr<StyleBackgroundData> Copy() const { | |
return AdoptRef(new StyleBackgroundData(*this)); | |
} | |
bool operator==(const StyleBackgroundData& other) const { | |
return ( | |
background_ == other.background_ | |
&& background_color_ == other.background_color_ | |
); | |
} | |
bool operator!=(const StyleBackgroundData& other) const { return !(*this == other); } | |
FillLayer background_; | |
StyleColor background_color_; | |
private: | |
StyleBackgroundData(); | |
StyleBackgroundData(const StyleBackgroundData&); | |
}; | |
class StyleInheritedData : public RefCounted<StyleInheritedData> { | |
public: | |
static PassRefPtr<StyleInheritedData> Create() { | |
return AdoptRef(new StyleInheritedData); | |
} | |
PassRefPtr<StyleInheritedData> Copy() const { | |
return AdoptRef(new StyleInheritedData(*this)); | |
} | |
bool operator==(const StyleInheritedData& other) const { | |
return ( | |
font_ == other.font_ | |
&& line_height_ == other.line_height_ | |
&& text_autosizing_multiplier_ == other.text_autosizing_multiplier_ | |
&& color_ == other.color_ | |
&& visited_link_color_ == other.visited_link_color_ | |
&& horizontal_border_spacing_ == other.horizontal_border_spacing_ | |
&& vertical_border_spacing_ == other.vertical_border_spacing_ | |
); | |
} | |
bool operator!=(const StyleInheritedData& other) const { return !(*this == other); } | |
Font font_; | |
Length line_height_; | |
float text_autosizing_multiplier_; | |
Color color_; | |
Color visited_link_color_; | |
short horizontal_border_spacing_; | |
short vertical_border_spacing_; | |
private: | |
StyleInheritedData(); | |
StyleInheritedData(const StyleInheritedData&); | |
}; | |
protected: | |
// Constructor and destructor are protected so that only the parent class ComputedStyle | |
// can instantiate this class. | |
ComputedStyleBase(); | |
// AffectedByActive | |
void SetAffectedByActiveInternal(bool v) { | |
affected_by_active_ = static_cast<unsigned>(v); | |
} | |
// AffectedByDrag | |
void SetAffectedByDragInternal(bool v) { | |
affected_by_drag_ = static_cast<unsigned>(v); | |
} | |
// AffectedByFocusWithin | |
void SetAffectedByFocusWithinInternal(bool v) { | |
affected_by_focus_within_ = static_cast<unsigned>(v); | |
} | |
// AffectedByHover | |
void SetAffectedByHoverInternal(bool v) { | |
affected_by_hover_ = static_cast<unsigned>(v); | |
} | |
// align-content | |
const StyleContentAlignmentData& AlignContentInternal() const { | |
return rare_non_inherited_data_->align_content_; | |
} | |
void SetAlignContentInternal(const StyleContentAlignmentData& v) { | |
if (!(rare_non_inherited_data_->align_content_ == v)) | |
rare_non_inherited_data_.Access()->align_content_ = v; | |
} | |
void SetAlignContentInternal(StyleContentAlignmentData&& v) { | |
if (!(rare_non_inherited_data_->align_content_ == v)) | |
rare_non_inherited_data_.Access()->align_content_ = std::move(v); | |
} | |
StyleContentAlignmentData& MutableAlignContentInternal() { | |
return rare_non_inherited_data_.Access()->align_content_; | |
} | |
// align-items | |
const StyleSelfAlignmentData& AlignItemsInternal() const { | |
return rare_non_inherited_data_->align_items_; | |
} | |
void SetAlignItemsInternal(const StyleSelfAlignmentData& v) { | |
if (!(rare_non_inherited_data_->align_items_ == v)) | |
rare_non_inherited_data_.Access()->align_items_ = v; | |
} | |
void SetAlignItemsInternal(StyleSelfAlignmentData&& v) { | |
if (!(rare_non_inherited_data_->align_items_ == v)) | |
rare_non_inherited_data_.Access()->align_items_ = std::move(v); | |
} | |
StyleSelfAlignmentData& MutableAlignItemsInternal() { | |
return rare_non_inherited_data_.Access()->align_items_; | |
} | |
// align-self | |
const StyleSelfAlignmentData& AlignSelfInternal() const { | |
return rare_non_inherited_data_->align_self_; | |
} | |
void SetAlignSelfInternal(const StyleSelfAlignmentData& v) { | |
if (!(rare_non_inherited_data_->align_self_ == v)) | |
rare_non_inherited_data_.Access()->align_self_ = v; | |
} | |
void SetAlignSelfInternal(StyleSelfAlignmentData&& v) { | |
if (!(rare_non_inherited_data_->align_self_ == v)) | |
rare_non_inherited_data_.Access()->align_self_ = std::move(v); | |
} | |
StyleSelfAlignmentData& MutableAlignSelfInternal() { | |
return rare_non_inherited_data_.Access()->align_self_; | |
} | |
// Animations | |
const std::unique_ptr<CSSAnimationData>& AnimationsInternal() const { | |
return rare_non_inherited_data_->animations_; | |
} | |
void SetAnimationsInternal(std::unique_ptr<CSSAnimationData>&& v) { | |
if (!(rare_non_inherited_data_->animations_ == v)) | |
rare_non_inherited_data_.Access()->animations_ = std::move(v); | |
} | |
std::unique_ptr<CSSAnimationData>& MutableAnimationsInternal() { | |
return rare_non_inherited_data_.Access()->animations_; | |
} | |
// -webkit-appearance | |
ControlPart AppearanceInternal() const { | |
return static_cast<ControlPart>(rare_non_inherited_data_->appearance_); | |
} | |
void SetAppearanceInternal(ControlPart v) { | |
if (!(rare_non_inherited_data_->appearance_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->appearance_ = static_cast<unsigned>(v); | |
} | |
// AppliedTextDecorations | |
const RefPtr<AppliedTextDecorationList>& AppliedTextDecorationsInternal() const { | |
return rare_inherited_data_->applied_text_decorations_; | |
} | |
void SetAppliedTextDecorationsInternal(RefPtr<AppliedTextDecorationList>&& v) { | |
if (!(rare_inherited_data_->applied_text_decorations_ == v)) | |
rare_inherited_data_.Access()->applied_text_decorations_ = std::move(v); | |
} | |
RefPtr<AppliedTextDecorationList>& MutableAppliedTextDecorationsInternal() { | |
return rare_inherited_data_.Access()->applied_text_decorations_; | |
} | |
// BackdropFilter | |
const DataPersistent<StyleFilterData>& BackdropFilterInternal() const { | |
return rare_non_inherited_data_->backdrop_filter_; | |
} | |
void SetBackdropFilterInternal(DataPersistent<StyleFilterData>&& v) { | |
if (!(rare_non_inherited_data_->backdrop_filter_ == v)) | |
rare_non_inherited_data_.Access()->backdrop_filter_ = std::move(v); | |
} | |
DataPersistent<StyleFilterData>& MutableBackdropFilterInternal() { | |
return rare_non_inherited_data_.Access()->backdrop_filter_; | |
} | |
// backface-visibility | |
EBackfaceVisibility BackfaceVisibilityInternal() const { | |
return static_cast<EBackfaceVisibility>(rare_non_inherited_data_->backface_visibility_); | |
} | |
void SetBackfaceVisibilityInternal(EBackfaceVisibility v) { | |
if (!(rare_non_inherited_data_->backface_visibility_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->backface_visibility_ = static_cast<unsigned>(v); | |
} | |
// Background | |
const FillLayer& BackgroundInternal() const { | |
return background_data_->background_; | |
} | |
void SetBackgroundInternal(const FillLayer& v) { | |
if (!(background_data_->background_ == v)) | |
background_data_.Access()->background_ = v; | |
} | |
void SetBackgroundInternal(FillLayer&& v) { | |
if (!(background_data_->background_ == v)) | |
background_data_.Access()->background_ = std::move(v); | |
} | |
FillLayer& MutableBackgroundInternal() { | |
return background_data_.Access()->background_; | |
} | |
// BackgroundColor | |
const StyleColor& BackgroundColorInternal() const { | |
return background_data_->background_color_; | |
} | |
void SetBackgroundColorInternal(const StyleColor& v) { | |
if (!(background_data_->background_color_ == v)) | |
background_data_.Access()->background_color_ = v; | |
} | |
void SetBackgroundColorInternal(StyleColor&& v) { | |
if (!(background_data_->background_color_ == v)) | |
background_data_.Access()->background_color_ = std::move(v); | |
} | |
StyleColor& MutableBackgroundColorInternal() { | |
return background_data_.Access()->background_color_; | |
} | |
// border-bottom-color | |
const Color& BorderBottomColorInternal() const { | |
return surround_data_->border_bottom_color_; | |
} | |
void SetBorderBottomColorInternal(const Color& v) { | |
if (!(surround_data_->border_bottom_color_ == v)) | |
surround_data_.Access()->border_bottom_color_ = v; | |
} | |
void SetBorderBottomColorInternal(Color&& v) { | |
if (!(surround_data_->border_bottom_color_ == v)) | |
surround_data_.Access()->border_bottom_color_ = std::move(v); | |
} | |
Color& MutableBorderBottomColorInternal() { | |
return surround_data_.Access()->border_bottom_color_; | |
} | |
// border-bottom-left-radius | |
LengthSize& MutableBorderBottomLeftRadiusInternal() { | |
return surround_data_.Access()->border_bottom_left_radius_; | |
} | |
// border-bottom-right-radius | |
LengthSize& MutableBorderBottomRightRadiusInternal() { | |
return surround_data_.Access()->border_bottom_right_radius_; | |
} | |
// border-bottom-width | |
const LayoutUnit& BorderBottomWidthInternal() const { | |
return surround_data_->border_bottom_width_; | |
} | |
void SetBorderBottomWidthInternal(const LayoutUnit& v) { | |
if (!(surround_data_->border_bottom_width_ == v)) | |
surround_data_.Access()->border_bottom_width_ = v; | |
} | |
void SetBorderBottomWidthInternal(LayoutUnit&& v) { | |
if (!(surround_data_->border_bottom_width_ == v)) | |
surround_data_.Access()->border_bottom_width_ = std::move(v); | |
} | |
LayoutUnit& MutableBorderBottomWidthInternal() { | |
return surround_data_.Access()->border_bottom_width_; | |
} | |
// border-image | |
NinePieceImage& MutableBorderImageInternal() { | |
return surround_data_.Access()->border_image_; | |
} | |
// border-left-color | |
const Color& BorderLeftColorInternal() const { | |
return surround_data_->border_left_color_; | |
} | |
void SetBorderLeftColorInternal(const Color& v) { | |
if (!(surround_data_->border_left_color_ == v)) | |
surround_data_.Access()->border_left_color_ = v; | |
} | |
void SetBorderLeftColorInternal(Color&& v) { | |
if (!(surround_data_->border_left_color_ == v)) | |
surround_data_.Access()->border_left_color_ = std::move(v); | |
} | |
Color& MutableBorderLeftColorInternal() { | |
return surround_data_.Access()->border_left_color_; | |
} | |
// border-left-width | |
const LayoutUnit& BorderLeftWidthInternal() const { | |
return surround_data_->border_left_width_; | |
} | |
void SetBorderLeftWidthInternal(const LayoutUnit& v) { | |
if (!(surround_data_->border_left_width_ == v)) | |
surround_data_.Access()->border_left_width_ = v; | |
} | |
void SetBorderLeftWidthInternal(LayoutUnit&& v) { | |
if (!(surround_data_->border_left_width_ == v)) | |
surround_data_.Access()->border_left_width_ = std::move(v); | |
} | |
LayoutUnit& MutableBorderLeftWidthInternal() { | |
return surround_data_.Access()->border_left_width_; | |
} | |
// border-right-color | |
const Color& BorderRightColorInternal() const { | |
return surround_data_->border_right_color_; | |
} | |
void SetBorderRightColorInternal(const Color& v) { | |
if (!(surround_data_->border_right_color_ == v)) | |
surround_data_.Access()->border_right_color_ = v; | |
} | |
void SetBorderRightColorInternal(Color&& v) { | |
if (!(surround_data_->border_right_color_ == v)) | |
surround_data_.Access()->border_right_color_ = std::move(v); | |
} | |
Color& MutableBorderRightColorInternal() { | |
return surround_data_.Access()->border_right_color_; | |
} | |
// border-right-width | |
const LayoutUnit& BorderRightWidthInternal() const { | |
return surround_data_->border_right_width_; | |
} | |
void SetBorderRightWidthInternal(const LayoutUnit& v) { | |
if (!(surround_data_->border_right_width_ == v)) | |
surround_data_.Access()->border_right_width_ = v; | |
} | |
void SetBorderRightWidthInternal(LayoutUnit&& v) { | |
if (!(surround_data_->border_right_width_ == v)) | |
surround_data_.Access()->border_right_width_ = std::move(v); | |
} | |
LayoutUnit& MutableBorderRightWidthInternal() { | |
return surround_data_.Access()->border_right_width_; | |
} | |
// border-top-color | |
const Color& BorderTopColorInternal() const { | |
return surround_data_->border_top_color_; | |
} | |
void SetBorderTopColorInternal(const Color& v) { | |
if (!(surround_data_->border_top_color_ == v)) | |
surround_data_.Access()->border_top_color_ = v; | |
} | |
void SetBorderTopColorInternal(Color&& v) { | |
if (!(surround_data_->border_top_color_ == v)) | |
surround_data_.Access()->border_top_color_ = std::move(v); | |
} | |
Color& MutableBorderTopColorInternal() { | |
return surround_data_.Access()->border_top_color_; | |
} | |
// border-top-left-radius | |
LengthSize& MutableBorderTopLeftRadiusInternal() { | |
return surround_data_.Access()->border_top_left_radius_; | |
} | |
// border-top-right-radius | |
LengthSize& MutableBorderTopRightRadiusInternal() { | |
return surround_data_.Access()->border_top_right_radius_; | |
} | |
// border-top-width | |
const LayoutUnit& BorderTopWidthInternal() const { | |
return surround_data_->border_top_width_; | |
} | |
void SetBorderTopWidthInternal(const LayoutUnit& v) { | |
if (!(surround_data_->border_top_width_ == v)) | |
surround_data_.Access()->border_top_width_ = v; | |
} | |
void SetBorderTopWidthInternal(LayoutUnit&& v) { | |
if (!(surround_data_->border_top_width_ == v)) | |
surround_data_.Access()->border_top_width_ = std::move(v); | |
} | |
LayoutUnit& MutableBorderTopWidthInternal() { | |
return surround_data_.Access()->border_top_width_; | |
} | |
// bottom | |
Length& MutableBottomInternal() { | |
return surround_data_.Access()->bottom_; | |
} | |
// -webkit-box-align | |
EBoxAlignment BoxAlignInternal() const { | |
return static_cast<EBoxAlignment>(rare_non_inherited_data_->deprecated_flexible_box_data_->box_align_); | |
} | |
void SetBoxAlignInternal(EBoxAlignment v) { | |
if (!(rare_non_inherited_data_->deprecated_flexible_box_data_->box_align_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Access()->box_align_ = static_cast<unsigned>(v); | |
} | |
// -webkit-box-flex | |
const float& BoxFlexInternal() const { | |
return rare_non_inherited_data_->deprecated_flexible_box_data_->box_flex_; | |
} | |
void SetBoxFlexInternal(const float& v) { | |
if (!(rare_non_inherited_data_->deprecated_flexible_box_data_->box_flex_ == v)) | |
rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Access()->box_flex_ = v; | |
} | |
void SetBoxFlexInternal(float&& v) { | |
if (!(rare_non_inherited_data_->deprecated_flexible_box_data_->box_flex_ == v)) | |
rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Access()->box_flex_ = std::move(v); | |
} | |
float& MutableBoxFlexInternal() { | |
return rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Access()->box_flex_; | |
} | |
// -webkit-box-flex-group | |
const unsigned& BoxFlexGroupInternal() const { | |
return rare_non_inherited_data_->deprecated_flexible_box_data_->box_flex_group_; | |
} | |
void SetBoxFlexGroupInternal(const unsigned& v) { | |
if (!(rare_non_inherited_data_->deprecated_flexible_box_data_->box_flex_group_ == v)) | |
rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Access()->box_flex_group_ = v; | |
} | |
void SetBoxFlexGroupInternal(unsigned&& v) { | |
if (!(rare_non_inherited_data_->deprecated_flexible_box_data_->box_flex_group_ == v)) | |
rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Access()->box_flex_group_ = std::move(v); | |
} | |
unsigned& MutableBoxFlexGroupInternal() { | |
return rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Access()->box_flex_group_; | |
} | |
// -webkit-box-lines | |
EBoxLines BoxLinesInternal() const { | |
return static_cast<EBoxLines>(rare_non_inherited_data_->deprecated_flexible_box_data_->box_lines_); | |
} | |
void SetBoxLinesInternal(EBoxLines v) { | |
if (!(rare_non_inherited_data_->deprecated_flexible_box_data_->box_lines_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Access()->box_lines_ = static_cast<unsigned>(v); | |
} | |
// -webkit-box-ordinal-group | |
const unsigned& BoxOrdinalGroupInternal() const { | |
return rare_non_inherited_data_->deprecated_flexible_box_data_->box_ordinal_group_; | |
} | |
void SetBoxOrdinalGroupInternal(const unsigned& v) { | |
if (!(rare_non_inherited_data_->deprecated_flexible_box_data_->box_ordinal_group_ == v)) | |
rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Access()->box_ordinal_group_ = v; | |
} | |
void SetBoxOrdinalGroupInternal(unsigned&& v) { | |
if (!(rare_non_inherited_data_->deprecated_flexible_box_data_->box_ordinal_group_ == v)) | |
rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Access()->box_ordinal_group_ = std::move(v); | |
} | |
unsigned& MutableBoxOrdinalGroupInternal() { | |
return rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Access()->box_ordinal_group_; | |
} | |
// -webkit-box-orient | |
EBoxOrient BoxOrientInternal() const { | |
return static_cast<EBoxOrient>(rare_non_inherited_data_->deprecated_flexible_box_data_->box_orient_); | |
} | |
void SetBoxOrientInternal(EBoxOrient v) { | |
if (!(rare_non_inherited_data_->deprecated_flexible_box_data_->box_orient_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Access()->box_orient_ = static_cast<unsigned>(v); | |
} | |
// -webkit-box-pack | |
EBoxPack BoxPackInternal() const { | |
return static_cast<EBoxPack>(rare_non_inherited_data_->deprecated_flexible_box_data_->box_pack_); | |
} | |
void SetBoxPackInternal(EBoxPack v) { | |
if (!(rare_non_inherited_data_->deprecated_flexible_box_data_->box_pack_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->deprecated_flexible_box_data_.Access()->box_pack_ = static_cast<unsigned>(v); | |
} | |
// -webkit-box-reflect | |
const RefPtr<StyleReflection>& BoxReflectInternal() const { | |
return rare_non_inherited_data_->box_reflect_; | |
} | |
void SetBoxReflectInternal(RefPtr<StyleReflection>&& v) { | |
if (!(rare_non_inherited_data_->box_reflect_ == v)) | |
rare_non_inherited_data_.Access()->box_reflect_ = std::move(v); | |
} | |
RefPtr<StyleReflection>& MutableBoxReflectInternal() { | |
return rare_non_inherited_data_.Access()->box_reflect_; | |
} | |
// box-shadow | |
const RefPtr<ShadowList>& BoxShadowInternal() const { | |
return rare_non_inherited_data_->box_shadow_; | |
} | |
void SetBoxShadowInternal(RefPtr<ShadowList>&& v) { | |
if (!(rare_non_inherited_data_->box_shadow_ == v)) | |
rare_non_inherited_data_.Access()->box_shadow_ = std::move(v); | |
} | |
RefPtr<ShadowList>& MutableBoxShadowInternal() { | |
return rare_non_inherited_data_.Access()->box_shadow_; | |
} | |
// CallbackSelectors | |
const Vector<String>& CallbackSelectorsInternal() const { | |
return rare_non_inherited_data_->callback_selectors_; | |
} | |
void SetCallbackSelectorsInternal(const Vector<String>& v) { | |
if (!(rare_non_inherited_data_->callback_selectors_ == v)) | |
rare_non_inherited_data_.Access()->callback_selectors_ = v; | |
} | |
void SetCallbackSelectorsInternal(Vector<String>&& v) { | |
if (!(rare_non_inherited_data_->callback_selectors_ == v)) | |
rare_non_inherited_data_.Access()->callback_selectors_ = std::move(v); | |
} | |
Vector<String>& MutableCallbackSelectorsInternal() { | |
return rare_non_inherited_data_.Access()->callback_selectors_; | |
} | |
// caret-color | |
const Color& CaretColorInternal() const { | |
return rare_inherited_data_->caret_color_; | |
} | |
void SetCaretColorInternal(const Color& v) { | |
if (!(rare_inherited_data_->caret_color_ == v)) | |
rare_inherited_data_.Access()->caret_color_ = v; | |
} | |
void SetCaretColorInternal(Color&& v) { | |
if (!(rare_inherited_data_->caret_color_ == v)) | |
rare_inherited_data_.Access()->caret_color_ = std::move(v); | |
} | |
Color& MutableCaretColorInternal() { | |
return rare_inherited_data_.Access()->caret_color_; | |
} | |
// CaretColorIsAuto | |
bool CaretColorIsAutoInternal() const { | |
return static_cast<bool>(rare_inherited_data_->caret_color_is_auto_); | |
} | |
void SetCaretColorIsAutoInternal(bool v) { | |
if (!(rare_inherited_data_->caret_color_is_auto_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->caret_color_is_auto_ = static_cast<unsigned>(v); | |
} | |
// CaretColorIsCurrentColor | |
bool CaretColorIsCurrentColorInternal() const { | |
return static_cast<bool>(rare_inherited_data_->caret_color_is_current_color_); | |
} | |
void SetCaretColorIsCurrentColorInternal(bool v) { | |
if (!(rare_inherited_data_->caret_color_is_current_color_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->caret_color_is_current_color_ = static_cast<unsigned>(v); | |
} | |
// clip | |
const LengthBox& ClipInternal() const { | |
return visual_data_->clip_; | |
} | |
void SetClipInternal(const LengthBox& v) { | |
if (!(visual_data_->clip_ == v)) | |
visual_data_.Access()->clip_ = v; | |
} | |
void SetClipInternal(LengthBox&& v) { | |
if (!(visual_data_->clip_ == v)) | |
visual_data_.Access()->clip_ = std::move(v); | |
} | |
LengthBox& MutableClipInternal() { | |
return visual_data_.Access()->clip_; | |
} | |
// clip-path | |
const RefPtr<ClipPathOperation>& ClipPathInternal() const { | |
return rare_non_inherited_data_->clip_path_; | |
} | |
void SetClipPathInternal(RefPtr<ClipPathOperation>&& v) { | |
if (!(rare_non_inherited_data_->clip_path_ == v)) | |
rare_non_inherited_data_.Access()->clip_path_ = std::move(v); | |
} | |
RefPtr<ClipPathOperation>& MutableClipPathInternal() { | |
return rare_non_inherited_data_.Access()->clip_path_; | |
} | |
// color | |
const Color& ColorInternal() const { | |
return inherited_data_->color_; | |
} | |
void SetColorInternal(const Color& v) { | |
if (!(inherited_data_->color_ == v)) | |
inherited_data_.Access()->color_ = v; | |
} | |
void SetColorInternal(Color&& v) { | |
if (!(inherited_data_->color_ == v)) | |
inherited_data_.Access()->color_ = std::move(v); | |
} | |
Color& MutableColorInternal() { | |
return inherited_data_.Access()->color_; | |
} | |
// contain | |
Containment ContainInternal() const { | |
return static_cast<Containment>(rare_non_inherited_data_->contain_); | |
} | |
void SetContainInternal(Containment v) { | |
if (!(rare_non_inherited_data_->contain_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->contain_ = static_cast<unsigned>(v); | |
} | |
// content | |
const Persistent<ContentData>& ContentInternal() const { | |
return rare_non_inherited_data_->content_; | |
} | |
void SetContentInternal(Persistent<ContentData>&& v) { | |
if (!(rare_non_inherited_data_->content_ == v)) | |
rare_non_inherited_data_.Access()->content_ = std::move(v); | |
} | |
Persistent<ContentData>& MutableContentInternal() { | |
return rare_non_inherited_data_.Access()->content_; | |
} | |
// CounterDirectives | |
const std::unique_ptr<CounterDirectiveMap>& CounterDirectivesInternal() const { | |
return rare_non_inherited_data_->counter_directives_; | |
} | |
void SetCounterDirectivesInternal(std::unique_ptr<CounterDirectiveMap>&& v) { | |
if (!(rare_non_inherited_data_->counter_directives_ == v)) | |
rare_non_inherited_data_.Access()->counter_directives_ = std::move(v); | |
} | |
std::unique_ptr<CounterDirectiveMap>& MutableCounterDirectivesInternal() { | |
return rare_non_inherited_data_.Access()->counter_directives_; | |
} | |
// CursorData | |
const Persistent<CursorList>& CursorDataInternal() const { | |
return rare_inherited_data_->cursor_data_; | |
} | |
void SetCursorDataInternal(Persistent<CursorList>&& v) { | |
if (!(rare_inherited_data_->cursor_data_ == v)) | |
rare_inherited_data_.Access()->cursor_data_ = std::move(v); | |
} | |
Persistent<CursorList>& MutableCursorDataInternal() { | |
return rare_inherited_data_.Access()->cursor_data_; | |
} | |
// EffectiveBlendMode | |
WebBlendMode EffectiveBlendModeInternal() const { | |
return static_cast<WebBlendMode>(rare_non_inherited_data_->effective_blend_mode_); | |
} | |
void SetEffectiveBlendModeInternal(WebBlendMode v) { | |
if (!(rare_non_inherited_data_->effective_blend_mode_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->effective_blend_mode_ = static_cast<unsigned>(v); | |
} | |
// EffectiveZoom | |
const float& EffectiveZoomInternal() const { | |
return rare_inherited_data_->effective_zoom_; | |
} | |
void SetEffectiveZoomInternal(const float& v) { | |
if (!(rare_inherited_data_->effective_zoom_ == v)) | |
rare_inherited_data_.Access()->effective_zoom_ = v; | |
} | |
void SetEffectiveZoomInternal(float&& v) { | |
if (!(rare_inherited_data_->effective_zoom_ == v)) | |
rare_inherited_data_.Access()->effective_zoom_ = std::move(v); | |
} | |
float& MutableEffectiveZoomInternal() { | |
return rare_inherited_data_.Access()->effective_zoom_; | |
} | |
// EmptyState | |
bool EmptyStateInternal() const { | |
return static_cast<bool>(empty_state_); | |
} | |
void SetEmptyStateInternal(bool v) { | |
empty_state_ = static_cast<unsigned>(v); | |
} | |
// Filter | |
const DataPersistent<StyleFilterData>& FilterInternal() const { | |
return rare_non_inherited_data_->filter_; | |
} | |
void SetFilterInternal(DataPersistent<StyleFilterData>&& v) { | |
if (!(rare_non_inherited_data_->filter_ == v)) | |
rare_non_inherited_data_.Access()->filter_ = std::move(v); | |
} | |
DataPersistent<StyleFilterData>& MutableFilterInternal() { | |
return rare_non_inherited_data_.Access()->filter_; | |
} | |
// FlexibleBoxData | |
const DataRef<StyleFlexibleBoxData>& FlexibleBoxDataInternal() const { | |
return rare_non_inherited_data_->flexible_box_data_; | |
} | |
void SetFlexibleBoxDataInternal(DataRef<StyleFlexibleBoxData>&& v) { | |
if (!(rare_non_inherited_data_->flexible_box_data_ == v)) | |
rare_non_inherited_data_.Access()->flexible_box_data_ = std::move(v); | |
} | |
DataRef<StyleFlexibleBoxData>& MutableFlexibleBoxDataInternal() { | |
return rare_non_inherited_data_.Access()->flexible_box_data_; | |
} | |
// font | |
const Font& FontInternal() const { | |
return inherited_data_->font_; | |
} | |
void SetFontInternal(const Font& v) { | |
if (!(inherited_data_->font_ == v)) | |
inherited_data_.Access()->font_ = v; | |
} | |
void SetFontInternal(Font&& v) { | |
if (!(inherited_data_->font_ == v)) | |
inherited_data_.Access()->font_ = std::move(v); | |
} | |
Font& MutableFontInternal() { | |
return inherited_data_.Access()->font_; | |
} | |
// GridData | |
const DataRef<StyleGridData>& GridDataInternal() const { | |
return rare_non_inherited_data_->grid_data_; | |
} | |
void SetGridDataInternal(DataRef<StyleGridData>&& v) { | |
if (!(rare_non_inherited_data_->grid_data_ == v)) | |
rare_non_inherited_data_.Access()->grid_data_ = std::move(v); | |
} | |
DataRef<StyleGridData>& MutableGridDataInternal() { | |
return rare_non_inherited_data_.Access()->grid_data_; | |
} | |
// GridItemData | |
const DataRef<StyleGridItemData>& GridItemDataInternal() const { | |
return rare_non_inherited_data_->grid_item_data_; | |
} | |
void SetGridItemDataInternal(DataRef<StyleGridItemData>&& v) { | |
if (!(rare_non_inherited_data_->grid_item_data_ == v)) | |
rare_non_inherited_data_.Access()->grid_item_data_ = std::move(v); | |
} | |
DataRef<StyleGridItemData>& MutableGridItemDataInternal() { | |
return rare_non_inherited_data_.Access()->grid_item_data_; | |
} | |
// HasAuthorBackground | |
bool HasAuthorBackgroundInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->has_author_background_); | |
} | |
void SetHasAuthorBackgroundInternal(bool v) { | |
if (!(rare_non_inherited_data_->has_author_background_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->has_author_background_ = static_cast<unsigned>(v); | |
} | |
// HasAuthorBorder | |
bool HasAuthorBorderInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->has_author_border_); | |
} | |
void SetHasAuthorBorderInternal(bool v) { | |
if (!(rare_non_inherited_data_->has_author_border_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->has_author_border_ = static_cast<unsigned>(v); | |
} | |
// HasAutoClip | |
bool HasAutoClipInternal() const { | |
return static_cast<bool>(visual_data_->has_auto_clip_); | |
} | |
void SetHasAutoClipInternal(bool v) { | |
if (!(visual_data_->has_auto_clip_ == static_cast<unsigned>(v))) | |
visual_data_.Access()->has_auto_clip_ = static_cast<unsigned>(v); | |
} | |
// HasAutoZIndex | |
bool HasAutoZIndexInternal() const { | |
return static_cast<bool>(box_data_->has_auto_z_index_); | |
} | |
void SetHasAutoZIndexInternal(bool v) { | |
if (!(box_data_->has_auto_z_index_ == static_cast<unsigned>(v))) | |
box_data_.Access()->has_auto_z_index_ = static_cast<unsigned>(v); | |
} | |
// HasCompositorProxy | |
bool HasCompositorProxyInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->has_compositor_proxy_); | |
} | |
void SetHasCompositorProxyInternal(bool v) { | |
if (!(rare_non_inherited_data_->has_compositor_proxy_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->has_compositor_proxy_ = static_cast<unsigned>(v); | |
} | |
// HasCurrentBackdropFilterAnimation | |
bool HasCurrentBackdropFilterAnimationInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->has_current_backdrop_filter_animation_); | |
} | |
void SetHasCurrentBackdropFilterAnimationInternal(bool v) { | |
if (!(rare_non_inherited_data_->has_current_backdrop_filter_animation_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->has_current_backdrop_filter_animation_ = static_cast<unsigned>(v); | |
} | |
// HasCurrentFilterAnimation | |
bool HasCurrentFilterAnimationInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->has_current_filter_animation_); | |
} | |
void SetHasCurrentFilterAnimationInternal(bool v) { | |
if (!(rare_non_inherited_data_->has_current_filter_animation_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->has_current_filter_animation_ = static_cast<unsigned>(v); | |
} | |
// HasCurrentOpacityAnimation | |
bool HasCurrentOpacityAnimationInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->has_current_opacity_animation_); | |
} | |
void SetHasCurrentOpacityAnimationInternal(bool v) { | |
if (!(rare_non_inherited_data_->has_current_opacity_animation_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->has_current_opacity_animation_ = static_cast<unsigned>(v); | |
} | |
// HasCurrentTransformAnimation | |
bool HasCurrentTransformAnimationInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->has_current_transform_animation_); | |
} | |
void SetHasCurrentTransformAnimationInternal(bool v) { | |
if (!(rare_non_inherited_data_->has_current_transform_animation_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->has_current_transform_animation_ = static_cast<unsigned>(v); | |
} | |
// HasExplicitlyInheritedProperties | |
void SetHasExplicitlyInheritedPropertiesInternal(bool v) { | |
has_explicitly_inherited_properties_ = static_cast<unsigned>(v); | |
} | |
// HasInlineTransform | |
bool HasInlineTransformInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->has_inline_transform_); | |
} | |
void SetHasInlineTransformInternal(bool v) { | |
if (!(rare_non_inherited_data_->has_inline_transform_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->has_inline_transform_ = static_cast<unsigned>(v); | |
} | |
// HasRemUnits | |
void SetHasRemUnitsInternal(bool v) { | |
has_rem_units_ = static_cast<unsigned>(v); | |
} | |
// HasSimpleUnderline | |
bool HasSimpleUnderlineInternal() const { | |
return static_cast<bool>(has_simple_underline_); | |
} | |
void SetHasSimpleUnderlineInternal(bool v) { | |
has_simple_underline_ = static_cast<unsigned>(v); | |
} | |
// HasVariableReferenceFromNonInheritedProperty | |
void SetHasVariableReferenceFromNonInheritedPropertyInternal(bool v) { | |
has_variable_reference_from_non_inherited_property_ = static_cast<unsigned>(v); | |
} | |
// height | |
Length& MutableHeightInternal() { | |
return box_data_.Access()->height_; | |
} | |
// -webkit-highlight | |
AtomicString& MutableHighlightInternal() { | |
return rare_inherited_data_.Access()->highlight_; | |
} | |
// HyphenationLimitAfter | |
const short& HyphenationLimitAfterInternal() const { | |
return rare_inherited_data_->hyphenation_limit_after_; | |
} | |
void SetHyphenationLimitAfterInternal(const short& v) { | |
if (!(rare_inherited_data_->hyphenation_limit_after_ == v)) | |
rare_inherited_data_.Access()->hyphenation_limit_after_ = v; | |
} | |
void SetHyphenationLimitAfterInternal(short&& v) { | |
if (!(rare_inherited_data_->hyphenation_limit_after_ == v)) | |
rare_inherited_data_.Access()->hyphenation_limit_after_ = std::move(v); | |
} | |
short& MutableHyphenationLimitAfterInternal() { | |
return rare_inherited_data_.Access()->hyphenation_limit_after_; | |
} | |
// HyphenationLimitBefore | |
const short& HyphenationLimitBeforeInternal() const { | |
return rare_inherited_data_->hyphenation_limit_before_; | |
} | |
void SetHyphenationLimitBeforeInternal(const short& v) { | |
if (!(rare_inherited_data_->hyphenation_limit_before_ == v)) | |
rare_inherited_data_.Access()->hyphenation_limit_before_ = v; | |
} | |
void SetHyphenationLimitBeforeInternal(short&& v) { | |
if (!(rare_inherited_data_->hyphenation_limit_before_ == v)) | |
rare_inherited_data_.Access()->hyphenation_limit_before_ = std::move(v); | |
} | |
short& MutableHyphenationLimitBeforeInternal() { | |
return rare_inherited_data_.Access()->hyphenation_limit_before_; | |
} | |
// HyphenationLimitLines | |
const short& HyphenationLimitLinesInternal() const { | |
return rare_inherited_data_->hyphenation_limit_lines_; | |
} | |
void SetHyphenationLimitLinesInternal(const short& v) { | |
if (!(rare_inherited_data_->hyphenation_limit_lines_ == v)) | |
rare_inherited_data_.Access()->hyphenation_limit_lines_ = v; | |
} | |
void SetHyphenationLimitLinesInternal(short&& v) { | |
if (!(rare_inherited_data_->hyphenation_limit_lines_ == v)) | |
rare_inherited_data_.Access()->hyphenation_limit_lines_ = std::move(v); | |
} | |
short& MutableHyphenationLimitLinesInternal() { | |
return rare_inherited_data_.Access()->hyphenation_limit_lines_; | |
} | |
// -webkit-hyphenate-character | |
AtomicString& MutableHyphenationStringInternal() { | |
return rare_inherited_data_.Access()->hyphenation_string_; | |
} | |
// InheritedVariables | |
const RefPtr<StyleInheritedVariables>& InheritedVariablesInternal() const { | |
return rare_inherited_data_->inherited_variables_; | |
} | |
void SetInheritedVariablesInternal(RefPtr<StyleInheritedVariables>&& v) { | |
if (!(rare_inherited_data_->inherited_variables_ == v)) | |
rare_inherited_data_.Access()->inherited_variables_ = std::move(v); | |
} | |
RefPtr<StyleInheritedVariables>& MutableInheritedVariablesInternal() { | |
return rare_inherited_data_.Access()->inherited_variables_; | |
} | |
// IsLink | |
void SetIsLinkInternal(bool v) { | |
is_link_ = static_cast<unsigned>(v); | |
} | |
// IsStackingContext | |
bool IsStackingContextInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->is_stacking_context_); | |
} | |
void SetIsStackingContextInternal(bool v) { | |
if (!(rare_non_inherited_data_->is_stacking_context_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->is_stacking_context_ = static_cast<unsigned>(v); | |
} | |
// justify-content | |
const StyleContentAlignmentData& JustifyContentInternal() const { | |
return rare_non_inherited_data_->justify_content_; | |
} | |
void SetJustifyContentInternal(const StyleContentAlignmentData& v) { | |
if (!(rare_non_inherited_data_->justify_content_ == v)) | |
rare_non_inherited_data_.Access()->justify_content_ = v; | |
} | |
void SetJustifyContentInternal(StyleContentAlignmentData&& v) { | |
if (!(rare_non_inherited_data_->justify_content_ == v)) | |
rare_non_inherited_data_.Access()->justify_content_ = std::move(v); | |
} | |
StyleContentAlignmentData& MutableJustifyContentInternal() { | |
return rare_non_inherited_data_.Access()->justify_content_; | |
} | |
// justify-items | |
const StyleSelfAlignmentData& JustifyItemsInternal() const { | |
return rare_non_inherited_data_->justify_items_; | |
} | |
void SetJustifyItemsInternal(const StyleSelfAlignmentData& v) { | |
if (!(rare_non_inherited_data_->justify_items_ == v)) | |
rare_non_inherited_data_.Access()->justify_items_ = v; | |
} | |
void SetJustifyItemsInternal(StyleSelfAlignmentData&& v) { | |
if (!(rare_non_inherited_data_->justify_items_ == v)) | |
rare_non_inherited_data_.Access()->justify_items_ = std::move(v); | |
} | |
StyleSelfAlignmentData& MutableJustifyItemsInternal() { | |
return rare_non_inherited_data_.Access()->justify_items_; | |
} | |
// justify-self | |
const StyleSelfAlignmentData& JustifySelfInternal() const { | |
return rare_non_inherited_data_->justify_self_; | |
} | |
void SetJustifySelfInternal(const StyleSelfAlignmentData& v) { | |
if (!(rare_non_inherited_data_->justify_self_ == v)) | |
rare_non_inherited_data_.Access()->justify_self_ = v; | |
} | |
void SetJustifySelfInternal(StyleSelfAlignmentData&& v) { | |
if (!(rare_non_inherited_data_->justify_self_ == v)) | |
rare_non_inherited_data_.Access()->justify_self_ = std::move(v); | |
} | |
StyleSelfAlignmentData& MutableJustifySelfInternal() { | |
return rare_non_inherited_data_.Access()->justify_self_; | |
} | |
// left | |
Length& MutableLeftInternal() { | |
return surround_data_.Access()->left_; | |
} | |
// -webkit-line-clamp | |
const LineClampValue& LineClampInternal() const { | |
return rare_non_inherited_data_->line_clamp_; | |
} | |
void SetLineClampInternal(const LineClampValue& v) { | |
if (!(rare_non_inherited_data_->line_clamp_ == v)) | |
rare_non_inherited_data_.Access()->line_clamp_ = v; | |
} | |
void SetLineClampInternal(LineClampValue&& v) { | |
if (!(rare_non_inherited_data_->line_clamp_ == v)) | |
rare_non_inherited_data_.Access()->line_clamp_ = std::move(v); | |
} | |
LineClampValue& MutableLineClampInternal() { | |
return rare_non_inherited_data_.Access()->line_clamp_; | |
} | |
// line-height | |
const Length& LineHeightInternal() const { | |
return inherited_data_->line_height_; | |
} | |
void SetLineHeightInternal(const Length& v) { | |
if (!(inherited_data_->line_height_ == v)) | |
inherited_data_.Access()->line_height_ = v; | |
} | |
void SetLineHeightInternal(Length&& v) { | |
if (!(inherited_data_->line_height_ == v)) | |
inherited_data_.Access()->line_height_ = std::move(v); | |
} | |
Length& MutableLineHeightInternal() { | |
return inherited_data_.Access()->line_height_; | |
} | |
// list-style-image | |
const Persistent<StyleImage>& ListStyleImageInternal() const { | |
return rare_inherited_data_->list_style_image_; | |
} | |
void SetListStyleImageInternal(Persistent<StyleImage>&& v) { | |
if (!(rare_inherited_data_->list_style_image_ == v)) | |
rare_inherited_data_.Access()->list_style_image_ = std::move(v); | |
} | |
Persistent<StyleImage>& MutableListStyleImageInternal() { | |
return rare_inherited_data_.Access()->list_style_image_; | |
} | |
// margin-bottom | |
Length& MutableMarginBottomInternal() { | |
return surround_data_.Access()->margin_bottom_; | |
} | |
// margin-left | |
Length& MutableMarginLeftInternal() { | |
return surround_data_.Access()->margin_left_; | |
} | |
// margin-right | |
Length& MutableMarginRightInternal() { | |
return surround_data_.Access()->margin_right_; | |
} | |
// margin-top | |
Length& MutableMarginTopInternal() { | |
return surround_data_.Access()->margin_top_; | |
} | |
// Mask | |
const FillLayer& MaskInternal() const { | |
return rare_non_inherited_data_->mask_; | |
} | |
void SetMaskInternal(const FillLayer& v) { | |
if (!(rare_non_inherited_data_->mask_ == v)) | |
rare_non_inherited_data_.Access()->mask_ = v; | |
} | |
void SetMaskInternal(FillLayer&& v) { | |
if (!(rare_non_inherited_data_->mask_ == v)) | |
rare_non_inherited_data_.Access()->mask_ = std::move(v); | |
} | |
FillLayer& MutableMaskInternal() { | |
return rare_non_inherited_data_.Access()->mask_; | |
} | |
// MaskBoxImage | |
const NinePieceImage& MaskBoxImageInternal() const { | |
return rare_non_inherited_data_->mask_box_image_; | |
} | |
void SetMaskBoxImageInternal(const NinePieceImage& v) { | |
if (!(rare_non_inherited_data_->mask_box_image_ == v)) | |
rare_non_inherited_data_.Access()->mask_box_image_ = v; | |
} | |
void SetMaskBoxImageInternal(NinePieceImage&& v) { | |
if (!(rare_non_inherited_data_->mask_box_image_ == v)) | |
rare_non_inherited_data_.Access()->mask_box_image_ = std::move(v); | |
} | |
NinePieceImage& MutableMaskBoxImageInternal() { | |
return rare_non_inherited_data_.Access()->mask_box_image_; | |
} | |
// max-height | |
Length& MutableMaxHeightInternal() { | |
return box_data_.Access()->max_height_; | |
} | |
// max-width | |
Length& MutableMaxWidthInternal() { | |
return box_data_.Access()->max_width_; | |
} | |
// min-height | |
Length& MutableMinHeightInternal() { | |
return box_data_.Access()->min_height_; | |
} | |
// min-width | |
Length& MutableMinWidthInternal() { | |
return box_data_.Access()->min_width_; | |
} | |
// MultiColData | |
const DataRef<StyleMultiColData>& MultiColDataInternal() const { | |
return rare_non_inherited_data_->multi_col_data_; | |
} | |
void SetMultiColDataInternal(DataRef<StyleMultiColData>&& v) { | |
if (!(rare_non_inherited_data_->multi_col_data_ == v)) | |
rare_non_inherited_data_.Access()->multi_col_data_ = std::move(v); | |
} | |
DataRef<StyleMultiColData>& MutableMultiColDataInternal() { | |
return rare_non_inherited_data_.Access()->multi_col_data_; | |
} | |
// NonInheritedVariables | |
const std::unique_ptr<StyleNonInheritedVariables>& NonInheritedVariablesInternal() const { | |
return rare_non_inherited_data_->non_inherited_variables_; | |
} | |
void SetNonInheritedVariablesInternal(std::unique_ptr<StyleNonInheritedVariables>&& v) { | |
if (!(rare_non_inherited_data_->non_inherited_variables_ == v)) | |
rare_non_inherited_data_.Access()->non_inherited_variables_ = std::move(v); | |
} | |
std::unique_ptr<StyleNonInheritedVariables>& MutableNonInheritedVariablesInternal() { | |
return rare_non_inherited_data_.Access()->non_inherited_variables_; | |
} | |
// object-position | |
LengthPoint& MutableObjectPositionInternal() { | |
return rare_non_inherited_data_.Access()->object_position_; | |
} | |
// opacity | |
const float& OpacityInternal() const { | |
return rare_non_inherited_data_->opacity_; | |
} | |
void SetOpacityInternal(const float& v) { | |
if (!(rare_non_inherited_data_->opacity_ == v)) | |
rare_non_inherited_data_.Access()->opacity_ = v; | |
} | |
void SetOpacityInternal(float&& v) { | |
if (!(rare_non_inherited_data_->opacity_ == v)) | |
rare_non_inherited_data_.Access()->opacity_ = std::move(v); | |
} | |
float& MutableOpacityInternal() { | |
return rare_non_inherited_data_.Access()->opacity_; | |
} | |
// order | |
const int& OrderInternal() const { | |
return rare_non_inherited_data_->order_; | |
} | |
void SetOrderInternal(const int& v) { | |
if (!(rare_non_inherited_data_->order_ == v)) | |
rare_non_inherited_data_.Access()->order_ = v; | |
} | |
void SetOrderInternal(int&& v) { | |
if (!(rare_non_inherited_data_->order_ == v)) | |
rare_non_inherited_data_.Access()->order_ = std::move(v); | |
} | |
int& MutableOrderInternal() { | |
return rare_non_inherited_data_.Access()->order_; | |
} | |
// Outline | |
const OutlineValue& OutlineInternal() const { | |
return rare_non_inherited_data_->outline_; | |
} | |
void SetOutlineInternal(const OutlineValue& v) { | |
if (!(rare_non_inherited_data_->outline_ == v)) | |
rare_non_inherited_data_.Access()->outline_ = v; | |
} | |
void SetOutlineInternal(OutlineValue&& v) { | |
if (!(rare_non_inherited_data_->outline_ == v)) | |
rare_non_inherited_data_.Access()->outline_ = std::move(v); | |
} | |
OutlineValue& MutableOutlineInternal() { | |
return rare_non_inherited_data_.Access()->outline_; | |
} | |
// padding-bottom | |
Length& MutablePaddingBottomInternal() { | |
return surround_data_.Access()->padding_bottom_; | |
} | |
// padding-left | |
Length& MutablePaddingLeftInternal() { | |
return surround_data_.Access()->padding_left_; | |
} | |
// padding-right | |
Length& MutablePaddingRightInternal() { | |
return surround_data_.Access()->padding_right_; | |
} | |
// padding-top | |
Length& MutablePaddingTopInternal() { | |
return surround_data_.Access()->padding_top_; | |
} | |
// PageSize | |
const FloatSize& PageSizeInternal() const { | |
return rare_non_inherited_data_->page_size_; | |
} | |
void SetPageSizeInternal(const FloatSize& v) { | |
if (!(rare_non_inherited_data_->page_size_ == v)) | |
rare_non_inherited_data_.Access()->page_size_ = v; | |
} | |
void SetPageSizeInternal(FloatSize&& v) { | |
if (!(rare_non_inherited_data_->page_size_ == v)) | |
rare_non_inherited_data_.Access()->page_size_ = std::move(v); | |
} | |
FloatSize& MutablePageSizeInternal() { | |
return rare_non_inherited_data_.Access()->page_size_; | |
} | |
// PageSizeType | |
PageSizeType PageSizeTypeInternal() const { | |
return static_cast<PageSizeType>(rare_non_inherited_data_->page_size_type_); | |
} | |
void SetPageSizeTypeInternal(PageSizeType v) { | |
if (!(rare_non_inherited_data_->page_size_type_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->page_size_type_ = static_cast<unsigned>(v); | |
} | |
// PaintImages | |
const std::unique_ptr<PaintImages>& PaintImagesInternal() const { | |
return rare_non_inherited_data_->paint_images_; | |
} | |
void SetPaintImagesInternal(std::unique_ptr<PaintImages>&& v) { | |
if (!(rare_non_inherited_data_->paint_images_ == v)) | |
rare_non_inherited_data_.Access()->paint_images_ = std::move(v); | |
} | |
std::unique_ptr<PaintImages>& MutablePaintImagesInternal() { | |
return rare_non_inherited_data_.Access()->paint_images_; | |
} | |
// perspective | |
const float& PerspectiveInternal() const { | |
return rare_non_inherited_data_->perspective_; | |
} | |
void SetPerspectiveInternal(const float& v) { | |
if (!(rare_non_inherited_data_->perspective_ == v)) | |
rare_non_inherited_data_.Access()->perspective_ = v; | |
} | |
void SetPerspectiveInternal(float&& v) { | |
if (!(rare_non_inherited_data_->perspective_ == v)) | |
rare_non_inherited_data_.Access()->perspective_ = std::move(v); | |
} | |
float& MutablePerspectiveInternal() { | |
return rare_non_inherited_data_.Access()->perspective_; | |
} | |
// perspective-origin | |
const LengthPoint& PerspectiveOriginInternal() const { | |
return rare_non_inherited_data_->perspective_origin_; | |
} | |
void SetPerspectiveOriginInternal(const LengthPoint& v) { | |
if (!(rare_non_inherited_data_->perspective_origin_ == v)) | |
rare_non_inherited_data_.Access()->perspective_origin_ = v; | |
} | |
void SetPerspectiveOriginInternal(LengthPoint&& v) { | |
if (!(rare_non_inherited_data_->perspective_origin_ == v)) | |
rare_non_inherited_data_.Access()->perspective_origin_ = std::move(v); | |
} | |
LengthPoint& MutablePerspectiveOriginInternal() { | |
return rare_non_inherited_data_.Access()->perspective_origin_; | |
} | |
// PseudoBits | |
PseudoId PseudoBitsInternal() const { | |
return static_cast<PseudoId>(pseudo_bits_); | |
} | |
void SetPseudoBitsInternal(PseudoId v) { | |
pseudo_bits_ = static_cast<unsigned>(v); | |
} | |
// quotes | |
const RefPtr<QuotesData>& QuotesInternal() const { | |
return rare_inherited_data_->quotes_; | |
} | |
void SetQuotesInternal(RefPtr<QuotesData>&& v) { | |
if (!(rare_inherited_data_->quotes_ == v)) | |
rare_inherited_data_.Access()->quotes_ = std::move(v); | |
} | |
RefPtr<QuotesData>& MutableQuotesInternal() { | |
return rare_inherited_data_.Access()->quotes_; | |
} | |
// RequiresAcceleratedCompositingForExternalReasons | |
bool RequiresAcceleratedCompositingForExternalReasonsInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->requires_accelerated_compositing_for_external_reasons_); | |
} | |
void SetRequiresAcceleratedCompositingForExternalReasonsInternal(bool v) { | |
if (!(rare_non_inherited_data_->requires_accelerated_compositing_for_external_reasons_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->requires_accelerated_compositing_for_external_reasons_ = static_cast<unsigned>(v); | |
} | |
// resize | |
EResize ResizeInternal() const { | |
return static_cast<EResize>(rare_non_inherited_data_->resize_); | |
} | |
void SetResizeInternal(EResize v) { | |
if (!(rare_non_inherited_data_->resize_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->resize_ = static_cast<unsigned>(v); | |
} | |
// RespectImageOrientation | |
bool RespectImageOrientationInternal() const { | |
return static_cast<bool>(rare_inherited_data_->respect_image_orientation_); | |
} | |
void SetRespectImageOrientationInternal(bool v) { | |
if (!(rare_inherited_data_->respect_image_orientation_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->respect_image_orientation_ = static_cast<unsigned>(v); | |
} | |
// right | |
Length& MutableRightInternal() { | |
return surround_data_.Access()->right_; | |
} | |
// RunningBackdropFilterAnimationOnCompositor | |
bool RunningBackdropFilterAnimationOnCompositorInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->running_backdrop_filter_animation_on_compositor_); | |
} | |
void SetRunningBackdropFilterAnimationOnCompositorInternal(bool v) { | |
if (!(rare_non_inherited_data_->running_backdrop_filter_animation_on_compositor_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->running_backdrop_filter_animation_on_compositor_ = static_cast<unsigned>(v); | |
} | |
// RunningFilterAnimationOnCompositor | |
bool RunningFilterAnimationOnCompositorInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->running_filter_animation_on_compositor_); | |
} | |
void SetRunningFilterAnimationOnCompositorInternal(bool v) { | |
if (!(rare_non_inherited_data_->running_filter_animation_on_compositor_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->running_filter_animation_on_compositor_ = static_cast<unsigned>(v); | |
} | |
// RunningOpacityAnimationOnCompositor | |
bool RunningOpacityAnimationOnCompositorInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->running_opacity_animation_on_compositor_); | |
} | |
void SetRunningOpacityAnimationOnCompositorInternal(bool v) { | |
if (!(rare_non_inherited_data_->running_opacity_animation_on_compositor_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->running_opacity_animation_on_compositor_ = static_cast<unsigned>(v); | |
} | |
// RunningTransformAnimationOnCompositor | |
bool RunningTransformAnimationOnCompositorInternal() const { | |
return static_cast<bool>(rare_non_inherited_data_->running_transform_animation_on_compositor_); | |
} | |
void SetRunningTransformAnimationOnCompositorInternal(bool v) { | |
if (!(rare_non_inherited_data_->running_transform_animation_on_compositor_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->running_transform_animation_on_compositor_ = static_cast<unsigned>(v); | |
} | |
// scroll-behavior | |
ScrollBehavior ScrollBehaviorInternal() const { | |
return static_cast<ScrollBehavior>(rare_non_inherited_data_->scroll_behavior_); | |
} | |
void SetScrollBehaviorInternal(ScrollBehavior v) { | |
if (!(rare_non_inherited_data_->scroll_behavior_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->scroll_behavior_ = static_cast<unsigned>(v); | |
} | |
// ScrollSnapData | |
const DataRef<StyleScrollSnapData>& ScrollSnapDataInternal() const { | |
return rare_non_inherited_data_->scroll_snap_data_; | |
} | |
void SetScrollSnapDataInternal(DataRef<StyleScrollSnapData>&& v) { | |
if (!(rare_non_inherited_data_->scroll_snap_data_ == v)) | |
rare_non_inherited_data_.Access()->scroll_snap_data_ = std::move(v); | |
} | |
DataRef<StyleScrollSnapData>& MutableScrollSnapDataInternal() { | |
return rare_non_inherited_data_.Access()->scroll_snap_data_; | |
} | |
// scroll-snap-type | |
ScrollSnapType ScrollSnapTypeInternal() const { | |
return static_cast<ScrollSnapType>(rare_non_inherited_data_->scroll_snap_type_); | |
} | |
void SetScrollSnapTypeInternal(ScrollSnapType v) { | |
if (!(rare_non_inherited_data_->scroll_snap_type_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->scroll_snap_type_ = static_cast<unsigned>(v); | |
} | |
// SelfOrAncestorHasDirAutoAttribute | |
bool SelfOrAncestorHasDirAutoAttributeInternal() const { | |
return static_cast<bool>(rare_inherited_data_->self_or_ancestor_has_dir_auto_attribute_); | |
} | |
void SetSelfOrAncestorHasDirAutoAttributeInternal(bool v) { | |
if (!(rare_inherited_data_->self_or_ancestor_has_dir_auto_attribute_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->self_or_ancestor_has_dir_auto_attribute_ = static_cast<unsigned>(v); | |
} | |
// shape-image-threshold | |
const float& ShapeImageThresholdInternal() const { | |
return rare_non_inherited_data_->shape_image_threshold_; | |
} | |
void SetShapeImageThresholdInternal(const float& v) { | |
if (!(rare_non_inherited_data_->shape_image_threshold_ == v)) | |
rare_non_inherited_data_.Access()->shape_image_threshold_ = v; | |
} | |
void SetShapeImageThresholdInternal(float&& v) { | |
if (!(rare_non_inherited_data_->shape_image_threshold_ == v)) | |
rare_non_inherited_data_.Access()->shape_image_threshold_ = std::move(v); | |
} | |
float& MutableShapeImageThresholdInternal() { | |
return rare_non_inherited_data_.Access()->shape_image_threshold_; | |
} | |
// shape-margin | |
const Length& ShapeMarginInternal() const { | |
return rare_non_inherited_data_->shape_margin_; | |
} | |
void SetShapeMarginInternal(const Length& v) { | |
if (!(rare_non_inherited_data_->shape_margin_ == v)) | |
rare_non_inherited_data_.Access()->shape_margin_ = v; | |
} | |
void SetShapeMarginInternal(Length&& v) { | |
if (!(rare_non_inherited_data_->shape_margin_ == v)) | |
rare_non_inherited_data_.Access()->shape_margin_ = std::move(v); | |
} | |
Length& MutableShapeMarginInternal() { | |
return rare_non_inherited_data_.Access()->shape_margin_; | |
} | |
// shape-outside | |
const Persistent<ShapeValue>& ShapeOutsideInternal() const { | |
return rare_non_inherited_data_->shape_outside_; | |
} | |
void SetShapeOutsideInternal(Persistent<ShapeValue>&& v) { | |
if (!(rare_non_inherited_data_->shape_outside_ == v)) | |
rare_non_inherited_data_.Access()->shape_outside_ = std::move(v); | |
} | |
Persistent<ShapeValue>& MutableShapeOutsideInternal() { | |
return rare_non_inherited_data_.Access()->shape_outside_; | |
} | |
// StyleType | |
PseudoId StyleTypeInternal() const { | |
return static_cast<PseudoId>(style_type_); | |
} | |
void SetStyleTypeInternal(PseudoId v) { | |
style_type_ = static_cast<unsigned>(v); | |
} | |
// tab-size | |
TabSize& MutableTabSizeInternal() { | |
return rare_inherited_data_.Access()->tab_size_; | |
} | |
// -webkit-tap-highlight-color | |
Color& MutableTapHighlightColorInternal() { | |
return rare_inherited_data_.Access()->tap_highlight_color_; | |
} | |
// TextAutosizingMultiplier | |
const float& TextAutosizingMultiplierInternal() const { | |
return inherited_data_->text_autosizing_multiplier_; | |
} | |
void SetTextAutosizingMultiplierInternal(const float& v) { | |
if (!(inherited_data_->text_autosizing_multiplier_ == v)) | |
inherited_data_.Access()->text_autosizing_multiplier_ = v; | |
} | |
void SetTextAutosizingMultiplierInternal(float&& v) { | |
if (!(inherited_data_->text_autosizing_multiplier_ == v)) | |
inherited_data_.Access()->text_autosizing_multiplier_ = std::move(v); | |
} | |
float& MutableTextAutosizingMultiplierInternal() { | |
return inherited_data_.Access()->text_autosizing_multiplier_; | |
} | |
// TextDecoration | |
TextDecoration TextDecorationInternal() const { | |
return static_cast<TextDecoration>(visual_data_->text_decoration_); | |
} | |
void SetTextDecorationInternal(TextDecoration v) { | |
if (!(visual_data_->text_decoration_ == static_cast<unsigned>(v))) | |
visual_data_.Access()->text_decoration_ = static_cast<unsigned>(v); | |
} | |
// text-decoration-color | |
const StyleColor& TextDecorationColorInternal() const { | |
return rare_non_inherited_data_->text_decoration_color_; | |
} | |
void SetTextDecorationColorInternal(const StyleColor& v) { | |
if (!(rare_non_inherited_data_->text_decoration_color_ == v)) | |
rare_non_inherited_data_.Access()->text_decoration_color_ = v; | |
} | |
void SetTextDecorationColorInternal(StyleColor&& v) { | |
if (!(rare_non_inherited_data_->text_decoration_color_ == v)) | |
rare_non_inherited_data_.Access()->text_decoration_color_ = std::move(v); | |
} | |
StyleColor& MutableTextDecorationColorInternal() { | |
return rare_non_inherited_data_.Access()->text_decoration_color_; | |
} | |
// text-decoration-skip | |
TextDecorationSkip TextDecorationSkipInternal() const { | |
return static_cast<TextDecorationSkip>(rare_inherited_data_->text_decoration_skip_); | |
} | |
void SetTextDecorationSkipInternal(TextDecorationSkip v) { | |
if (!(rare_inherited_data_->text_decoration_skip_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_decoration_skip_ = static_cast<unsigned>(v); | |
} | |
// text-decoration-style | |
TextDecorationStyle TextDecorationStyleInternal() const { | |
return static_cast<TextDecorationStyle>(rare_non_inherited_data_->text_decoration_style_); | |
} | |
void SetTextDecorationStyleInternal(TextDecorationStyle v) { | |
if (!(rare_non_inherited_data_->text_decoration_style_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->text_decoration_style_ = static_cast<unsigned>(v); | |
} | |
// -webkit-text-emphasis-color | |
const Color& TextEmphasisColorInternal() const { | |
return rare_inherited_data_->text_emphasis_color_; | |
} | |
void SetTextEmphasisColorInternal(const Color& v) { | |
if (!(rare_inherited_data_->text_emphasis_color_ == v)) | |
rare_inherited_data_.Access()->text_emphasis_color_ = v; | |
} | |
void SetTextEmphasisColorInternal(Color&& v) { | |
if (!(rare_inherited_data_->text_emphasis_color_ == v)) | |
rare_inherited_data_.Access()->text_emphasis_color_ = std::move(v); | |
} | |
Color& MutableTextEmphasisColorInternal() { | |
return rare_inherited_data_.Access()->text_emphasis_color_; | |
} | |
// TextEmphasisColorIsCurrentColor | |
bool TextEmphasisColorIsCurrentColorInternal() const { | |
return static_cast<bool>(rare_inherited_data_->text_emphasis_color_is_current_color_); | |
} | |
void SetTextEmphasisColorIsCurrentColorInternal(bool v) { | |
if (!(rare_inherited_data_->text_emphasis_color_is_current_color_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_emphasis_color_is_current_color_ = static_cast<unsigned>(v); | |
} | |
// TextEmphasisCustomMark | |
AtomicString& MutableTextEmphasisCustomMarkInternal() { | |
return rare_inherited_data_.Access()->text_emphasis_custom_mark_; | |
} | |
// TextEmphasisMark | |
TextEmphasisMark TextEmphasisMarkInternal() const { | |
return static_cast<TextEmphasisMark>(rare_inherited_data_->text_emphasis_mark_); | |
} | |
void SetTextEmphasisMarkInternal(TextEmphasisMark v) { | |
if (!(rare_inherited_data_->text_emphasis_mark_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_emphasis_mark_ = static_cast<unsigned>(v); | |
} | |
// -webkit-text-fill-color | |
const Color& TextFillColorInternal() const { | |
return rare_inherited_data_->text_fill_color_; | |
} | |
void SetTextFillColorInternal(const Color& v) { | |
if (!(rare_inherited_data_->text_fill_color_ == v)) | |
rare_inherited_data_.Access()->text_fill_color_ = v; | |
} | |
void SetTextFillColorInternal(Color&& v) { | |
if (!(rare_inherited_data_->text_fill_color_ == v)) | |
rare_inherited_data_.Access()->text_fill_color_ = std::move(v); | |
} | |
Color& MutableTextFillColorInternal() { | |
return rare_inherited_data_.Access()->text_fill_color_; | |
} | |
// TextFillColorIsCurrentColor | |
bool TextFillColorIsCurrentColorInternal() const { | |
return static_cast<bool>(rare_inherited_data_->text_fill_color_is_current_color_); | |
} | |
void SetTextFillColorIsCurrentColorInternal(bool v) { | |
if (!(rare_inherited_data_->text_fill_color_is_current_color_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_fill_color_is_current_color_ = static_cast<unsigned>(v); | |
} | |
// text-indent | |
Length& MutableTextIndentInternal() { | |
return rare_inherited_data_.Access()->text_indent_; | |
} | |
// text-overflow | |
TextOverflow TextOverflowInternal() const { | |
return static_cast<TextOverflow>(rare_non_inherited_data_->text_overflow_); | |
} | |
void SetTextOverflowInternal(TextOverflow v) { | |
if (!(rare_non_inherited_data_->text_overflow_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->text_overflow_ = static_cast<unsigned>(v); | |
} | |
// text-shadow | |
const RefPtr<ShadowList>& TextShadowInternal() const { | |
return rare_inherited_data_->text_shadow_; | |
} | |
void SetTextShadowInternal(RefPtr<ShadowList>&& v) { | |
if (!(rare_inherited_data_->text_shadow_ == v)) | |
rare_inherited_data_.Access()->text_shadow_ = std::move(v); | |
} | |
RefPtr<ShadowList>& MutableTextShadowInternal() { | |
return rare_inherited_data_.Access()->text_shadow_; | |
} | |
// text-size-adjust | |
TextSizeAdjust& MutableTextSizeAdjustInternal() { | |
return rare_inherited_data_.Access()->text_size_adjust_; | |
} | |
// -webkit-text-stroke-color | |
const Color& TextStrokeColorInternal() const { | |
return rare_inherited_data_->text_stroke_color_; | |
} | |
void SetTextStrokeColorInternal(const Color& v) { | |
if (!(rare_inherited_data_->text_stroke_color_ == v)) | |
rare_inherited_data_.Access()->text_stroke_color_ = v; | |
} | |
void SetTextStrokeColorInternal(Color&& v) { | |
if (!(rare_inherited_data_->text_stroke_color_ == v)) | |
rare_inherited_data_.Access()->text_stroke_color_ = std::move(v); | |
} | |
Color& MutableTextStrokeColorInternal() { | |
return rare_inherited_data_.Access()->text_stroke_color_; | |
} | |
// TextStrokeColorIsCurrentColor | |
bool TextStrokeColorIsCurrentColorInternal() const { | |
return static_cast<bool>(rare_inherited_data_->text_stroke_color_is_current_color_); | |
} | |
void SetTextStrokeColorIsCurrentColorInternal(bool v) { | |
if (!(rare_inherited_data_->text_stroke_color_is_current_color_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->text_stroke_color_is_current_color_ = static_cast<unsigned>(v); | |
} | |
// top | |
Length& MutableTopInternal() { | |
return surround_data_.Access()->top_; | |
} | |
// touch-action | |
TouchAction TouchActionInternal() const { | |
return static_cast<TouchAction>(rare_non_inherited_data_->touch_action_); | |
} | |
void SetTouchActionInternal(TouchAction v) { | |
if (!(rare_non_inherited_data_->touch_action_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->touch_action_ = static_cast<unsigned>(v); | |
} | |
// TransformData | |
const DataRef<StyleTransformData>& TransformDataInternal() const { | |
return rare_non_inherited_data_->transform_data_; | |
} | |
void SetTransformDataInternal(DataRef<StyleTransformData>&& v) { | |
if (!(rare_non_inherited_data_->transform_data_ == v)) | |
rare_non_inherited_data_.Access()->transform_data_ = std::move(v); | |
} | |
DataRef<StyleTransformData>& MutableTransformDataInternal() { | |
return rare_non_inherited_data_.Access()->transform_data_; | |
} | |
// transform-style | |
ETransformStyle3D TransformStyle3dInternal() const { | |
return static_cast<ETransformStyle3D>(rare_non_inherited_data_->transform_style_3d_); | |
} | |
void SetTransformStyle3DInternal(ETransformStyle3D v) { | |
if (!(rare_non_inherited_data_->transform_style_3d_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->transform_style_3d_ = static_cast<unsigned>(v); | |
} | |
// Transitions | |
const std::unique_ptr<CSSTransitionData>& TransitionsInternal() const { | |
return rare_non_inherited_data_->transitions_; | |
} | |
void SetTransitionsInternal(std::unique_ptr<CSSTransitionData>&& v) { | |
if (!(rare_non_inherited_data_->transitions_ == v)) | |
rare_non_inherited_data_.Access()->transitions_ = std::move(v); | |
} | |
std::unique_ptr<CSSTransitionData>& MutableTransitionsInternal() { | |
return rare_non_inherited_data_.Access()->transitions_; | |
} | |
// Unique | |
void SetUniqueInternal(bool v) { | |
unique_ = static_cast<unsigned>(v); | |
} | |
// -webkit-user-drag | |
EUserDrag UserDragInternal() const { | |
return static_cast<EUserDrag>(rare_non_inherited_data_->user_drag_); | |
} | |
void SetUserDragInternal(EUserDrag v) { | |
if (!(rare_non_inherited_data_->user_drag_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->user_drag_ = static_cast<unsigned>(v); | |
} | |
// VerticalAlign | |
EVerticalAlign VerticalAlignInternal() const { | |
return static_cast<EVerticalAlign>(vertical_align_); | |
} | |
void SetVerticalAlignInternal(EVerticalAlign v) { | |
vertical_align_ = static_cast<unsigned>(v); | |
} | |
// VerticalAlignLength | |
const Length& VerticalAlignLengthInternal() const { | |
return box_data_->vertical_align_length_; | |
} | |
void SetVerticalAlignLengthInternal(const Length& v) { | |
if (!(box_data_->vertical_align_length_ == v)) | |
box_data_.Access()->vertical_align_length_ = v; | |
} | |
void SetVerticalAlignLengthInternal(Length&& v) { | |
if (!(box_data_->vertical_align_length_ == v)) | |
box_data_.Access()->vertical_align_length_ = std::move(v); | |
} | |
Length& MutableVerticalAlignLengthInternal() { | |
return box_data_.Access()->vertical_align_length_; | |
} | |
// VisitedLinkBackgroundColor | |
const StyleColor& VisitedLinkBackgroundColorInternal() const { | |
return rare_non_inherited_data_->visited_link_background_color_; | |
} | |
void SetVisitedLinkBackgroundColorInternal(const StyleColor& v) { | |
if (!(rare_non_inherited_data_->visited_link_background_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_background_color_ = v; | |
} | |
void SetVisitedLinkBackgroundColorInternal(StyleColor&& v) { | |
if (!(rare_non_inherited_data_->visited_link_background_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_background_color_ = std::move(v); | |
} | |
StyleColor& MutableVisitedLinkBackgroundColorInternal() { | |
return rare_non_inherited_data_.Access()->visited_link_background_color_; | |
} | |
// VisitedLinkBorderBottomColor | |
const StyleColor& VisitedLinkBorderBottomColorInternal() const { | |
return rare_non_inherited_data_->visited_link_border_bottom_color_; | |
} | |
void SetVisitedLinkBorderBottomColorInternal(const StyleColor& v) { | |
if (!(rare_non_inherited_data_->visited_link_border_bottom_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_border_bottom_color_ = v; | |
} | |
void SetVisitedLinkBorderBottomColorInternal(StyleColor&& v) { | |
if (!(rare_non_inherited_data_->visited_link_border_bottom_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_border_bottom_color_ = std::move(v); | |
} | |
StyleColor& MutableVisitedLinkBorderBottomColorInternal() { | |
return rare_non_inherited_data_.Access()->visited_link_border_bottom_color_; | |
} | |
// VisitedLinkBorderLeftColor | |
const StyleColor& VisitedLinkBorderLeftColorInternal() const { | |
return rare_non_inherited_data_->visited_link_border_left_color_; | |
} | |
void SetVisitedLinkBorderLeftColorInternal(const StyleColor& v) { | |
if (!(rare_non_inherited_data_->visited_link_border_left_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_border_left_color_ = v; | |
} | |
void SetVisitedLinkBorderLeftColorInternal(StyleColor&& v) { | |
if (!(rare_non_inherited_data_->visited_link_border_left_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_border_left_color_ = std::move(v); | |
} | |
StyleColor& MutableVisitedLinkBorderLeftColorInternal() { | |
return rare_non_inherited_data_.Access()->visited_link_border_left_color_; | |
} | |
// VisitedLinkBorderRightColor | |
const StyleColor& VisitedLinkBorderRightColorInternal() const { | |
return rare_non_inherited_data_->visited_link_border_right_color_; | |
} | |
void SetVisitedLinkBorderRightColorInternal(const StyleColor& v) { | |
if (!(rare_non_inherited_data_->visited_link_border_right_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_border_right_color_ = v; | |
} | |
void SetVisitedLinkBorderRightColorInternal(StyleColor&& v) { | |
if (!(rare_non_inherited_data_->visited_link_border_right_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_border_right_color_ = std::move(v); | |
} | |
StyleColor& MutableVisitedLinkBorderRightColorInternal() { | |
return rare_non_inherited_data_.Access()->visited_link_border_right_color_; | |
} | |
// VisitedLinkBorderTopColor | |
const StyleColor& VisitedLinkBorderTopColorInternal() const { | |
return rare_non_inherited_data_->visited_link_border_top_color_; | |
} | |
void SetVisitedLinkBorderTopColorInternal(const StyleColor& v) { | |
if (!(rare_non_inherited_data_->visited_link_border_top_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_border_top_color_ = v; | |
} | |
void SetVisitedLinkBorderTopColorInternal(StyleColor&& v) { | |
if (!(rare_non_inherited_data_->visited_link_border_top_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_border_top_color_ = std::move(v); | |
} | |
StyleColor& MutableVisitedLinkBorderTopColorInternal() { | |
return rare_non_inherited_data_.Access()->visited_link_border_top_color_; | |
} | |
// VisitedLinkCaretColor | |
const Color& VisitedLinkCaretColorInternal() const { | |
return rare_inherited_data_->visited_link_caret_color_; | |
} | |
void SetVisitedLinkCaretColorInternal(const Color& v) { | |
if (!(rare_inherited_data_->visited_link_caret_color_ == v)) | |
rare_inherited_data_.Access()->visited_link_caret_color_ = v; | |
} | |
void SetVisitedLinkCaretColorInternal(Color&& v) { | |
if (!(rare_inherited_data_->visited_link_caret_color_ == v)) | |
rare_inherited_data_.Access()->visited_link_caret_color_ = std::move(v); | |
} | |
Color& MutableVisitedLinkCaretColorInternal() { | |
return rare_inherited_data_.Access()->visited_link_caret_color_; | |
} | |
// VisitedLinkCaretColorIsAuto | |
bool VisitedLinkCaretColorIsAutoInternal() const { | |
return static_cast<bool>(rare_inherited_data_->visited_link_caret_color_is_auto_); | |
} | |
void SetVisitedLinkCaretColorIsAutoInternal(bool v) { | |
if (!(rare_inherited_data_->visited_link_caret_color_is_auto_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->visited_link_caret_color_is_auto_ = static_cast<unsigned>(v); | |
} | |
// VisitedLinkCaretColorIsCurrentColor | |
bool VisitedLinkCaretColorIsCurrentColorInternal() const { | |
return static_cast<bool>(rare_inherited_data_->visited_link_caret_color_is_current_color_); | |
} | |
void SetVisitedLinkCaretColorIsCurrentColorInternal(bool v) { | |
if (!(rare_inherited_data_->visited_link_caret_color_is_current_color_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->visited_link_caret_color_is_current_color_ = static_cast<unsigned>(v); | |
} | |
// VisitedLinkColor | |
Color& MutableVisitedLinkColorInternal() { | |
return inherited_data_.Access()->visited_link_color_; | |
} | |
// VisitedLinkOutlineColor | |
const StyleColor& VisitedLinkOutlineColorInternal() const { | |
return rare_non_inherited_data_->visited_link_outline_color_; | |
} | |
void SetVisitedLinkOutlineColorInternal(const StyleColor& v) { | |
if (!(rare_non_inherited_data_->visited_link_outline_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_outline_color_ = v; | |
} | |
void SetVisitedLinkOutlineColorInternal(StyleColor&& v) { | |
if (!(rare_non_inherited_data_->visited_link_outline_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_outline_color_ = std::move(v); | |
} | |
StyleColor& MutableVisitedLinkOutlineColorInternal() { | |
return rare_non_inherited_data_.Access()->visited_link_outline_color_; | |
} | |
// VisitedLinkTextDecorationColor | |
const StyleColor& VisitedLinkTextDecorationColorInternal() const { | |
return rare_non_inherited_data_->visited_link_text_decoration_color_; | |
} | |
void SetVisitedLinkTextDecorationColorInternal(const StyleColor& v) { | |
if (!(rare_non_inherited_data_->visited_link_text_decoration_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_text_decoration_color_ = v; | |
} | |
void SetVisitedLinkTextDecorationColorInternal(StyleColor&& v) { | |
if (!(rare_non_inherited_data_->visited_link_text_decoration_color_ == v)) | |
rare_non_inherited_data_.Access()->visited_link_text_decoration_color_ = std::move(v); | |
} | |
StyleColor& MutableVisitedLinkTextDecorationColorInternal() { | |
return rare_non_inherited_data_.Access()->visited_link_text_decoration_color_; | |
} | |
// VisitedLinkTextEmphasisColor | |
const Color& VisitedLinkTextEmphasisColorInternal() const { | |
return rare_inherited_data_->visited_link_text_emphasis_color_; | |
} | |
void SetVisitedLinkTextEmphasisColorInternal(const Color& v) { | |
if (!(rare_inherited_data_->visited_link_text_emphasis_color_ == v)) | |
rare_inherited_data_.Access()->visited_link_text_emphasis_color_ = v; | |
} | |
void SetVisitedLinkTextEmphasisColorInternal(Color&& v) { | |
if (!(rare_inherited_data_->visited_link_text_emphasis_color_ == v)) | |
rare_inherited_data_.Access()->visited_link_text_emphasis_color_ = std::move(v); | |
} | |
Color& MutableVisitedLinkTextEmphasisColorInternal() { | |
return rare_inherited_data_.Access()->visited_link_text_emphasis_color_; | |
} | |
// VisitedLinkTextEmphasisColorIsCurrentColor | |
bool VisitedLinkTextEmphasisColorIsCurrentColorInternal() const { | |
return static_cast<bool>(rare_inherited_data_->visited_link_text_emphasis_color_is_current_color_); | |
} | |
void SetVisitedLinkTextEmphasisColorIsCurrentColorInternal(bool v) { | |
if (!(rare_inherited_data_->visited_link_text_emphasis_color_is_current_color_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->visited_link_text_emphasis_color_is_current_color_ = static_cast<unsigned>(v); | |
} | |
// VisitedLinkTextFillColor | |
const Color& VisitedLinkTextFillColorInternal() const { | |
return rare_inherited_data_->visited_link_text_fill_color_; | |
} | |
void SetVisitedLinkTextFillColorInternal(const Color& v) { | |
if (!(rare_inherited_data_->visited_link_text_fill_color_ == v)) | |
rare_inherited_data_.Access()->visited_link_text_fill_color_ = v; | |
} | |
void SetVisitedLinkTextFillColorInternal(Color&& v) { | |
if (!(rare_inherited_data_->visited_link_text_fill_color_ == v)) | |
rare_inherited_data_.Access()->visited_link_text_fill_color_ = std::move(v); | |
} | |
Color& MutableVisitedLinkTextFillColorInternal() { | |
return rare_inherited_data_.Access()->visited_link_text_fill_color_; | |
} | |
// VisitedLinkTextFillColorIsCurrentColor | |
bool VisitedLinkTextFillColorIsCurrentColorInternal() const { | |
return static_cast<bool>(rare_inherited_data_->visited_link_text_fill_color_is_current_color_); | |
} | |
void SetVisitedLinkTextFillColorIsCurrentColorInternal(bool v) { | |
if (!(rare_inherited_data_->visited_link_text_fill_color_is_current_color_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->visited_link_text_fill_color_is_current_color_ = static_cast<unsigned>(v); | |
} | |
// VisitedLinkTextStrokeColor | |
const Color& VisitedLinkTextStrokeColorInternal() const { | |
return rare_inherited_data_->visited_link_text_stroke_color_; | |
} | |
void SetVisitedLinkTextStrokeColorInternal(const Color& v) { | |
if (!(rare_inherited_data_->visited_link_text_stroke_color_ == v)) | |
rare_inherited_data_.Access()->visited_link_text_stroke_color_ = v; | |
} | |
void SetVisitedLinkTextStrokeColorInternal(Color&& v) { | |
if (!(rare_inherited_data_->visited_link_text_stroke_color_ == v)) | |
rare_inherited_data_.Access()->visited_link_text_stroke_color_ = std::move(v); | |
} | |
Color& MutableVisitedLinkTextStrokeColorInternal() { | |
return rare_inherited_data_.Access()->visited_link_text_stroke_color_; | |
} | |
// VisitedLinkTextStrokeColorIsCurrentColor | |
bool VisitedLinkTextStrokeColorIsCurrentColorInternal() const { | |
return static_cast<bool>(rare_inherited_data_->visited_link_text_stroke_color_is_current_color_); | |
} | |
void SetVisitedLinkTextStrokeColorIsCurrentColorInternal(bool v) { | |
if (!(rare_inherited_data_->visited_link_text_stroke_color_is_current_color_ == static_cast<unsigned>(v))) | |
rare_inherited_data_.Access()->visited_link_text_stroke_color_is_current_color_ = static_cast<unsigned>(v); | |
} | |
// width | |
Length& MutableWidthInternal() { | |
return box_data_.Access()->width_; | |
} | |
// WillChangeContents | |
unsigned WillChangeContentsInternal() const { | |
return static_cast<unsigned>(rare_non_inherited_data_->will_change_data_->will_change_contents_); | |
} | |
void SetWillChangeContentsInternal(unsigned v) { | |
if (!(rare_non_inherited_data_->will_change_data_->will_change_contents_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->will_change_data_.Access()->will_change_contents_ = static_cast<unsigned>(v); | |
} | |
// WillChangeProperties | |
const Vector<CSSPropertyID>& WillChangePropertiesInternal() const { | |
return rare_non_inherited_data_->will_change_data_->will_change_properties_; | |
} | |
void SetWillChangePropertiesInternal(const Vector<CSSPropertyID>& v) { | |
if (!(rare_non_inherited_data_->will_change_data_->will_change_properties_ == v)) | |
rare_non_inherited_data_.Access()->will_change_data_.Access()->will_change_properties_ = v; | |
} | |
void SetWillChangePropertiesInternal(Vector<CSSPropertyID>&& v) { | |
if (!(rare_non_inherited_data_->will_change_data_->will_change_properties_ == v)) | |
rare_non_inherited_data_.Access()->will_change_data_.Access()->will_change_properties_ = std::move(v); | |
} | |
Vector<CSSPropertyID>& MutableWillChangePropertiesInternal() { | |
return rare_non_inherited_data_.Access()->will_change_data_.Access()->will_change_properties_; | |
} | |
// WillChangeScrollPosition | |
unsigned WillChangeScrollPositionInternal() const { | |
return static_cast<unsigned>(rare_non_inherited_data_->will_change_data_->will_change_scroll_position_); | |
} | |
void SetWillChangeScrollPositionInternal(unsigned v) { | |
if (!(rare_non_inherited_data_->will_change_data_->will_change_scroll_position_ == static_cast<unsigned>(v))) | |
rare_non_inherited_data_.Access()->will_change_data_.Access()->will_change_scroll_position_ = static_cast<unsigned>(v); | |
} | |
// z-index | |
const int& ZIndexInternal() const { | |
return box_data_->z_index_; | |
} | |
void SetZIndexInternal(const int& v) { | |
if (!(box_data_->z_index_ == v)) | |
box_data_.Access()->z_index_ = v; | |
} | |
void SetZIndexInternal(int&& v) { | |
if (!(box_data_->z_index_ == v)) | |
box_data_.Access()->z_index_ = std::move(v); | |
} | |
int& MutableZIndexInternal() { | |
return box_data_.Access()->z_index_; | |
} | |
// zoom | |
const float& ZoomInternal() const { | |
return visual_data_->zoom_; | |
} | |
void SetZoomInternal(const float& v) { | |
if (!(visual_data_->zoom_ == v)) | |
visual_data_.Access()->zoom_ = v; | |
} | |
void SetZoomInternal(float&& v) { | |
if (!(visual_data_->zoom_ == v)) | |
visual_data_.Access()->zoom_ = std::move(v); | |
} | |
float& MutableZoomInternal() { | |
return visual_data_.Access()->zoom_; | |
} | |
~ComputedStyleBase() = default; | |
// Storage. | |
DataRef<StyleBoxData> box_data_; | |
DataRef<StyleRareInheritedData> rare_inherited_data_; | |
DataRef<StyleRareNonInheritedData> rare_non_inherited_data_; | |
DataRef<StyleSurroundData> surround_data_; | |
DataRef<StyleVisualData> visual_data_; | |
DataRef<StyleBackgroundData> background_data_; | |
DataRef<StyleInheritedData> inherited_data_; | |
private: | |
unsigned pseudo_bits_ : 8; // PseudoId | |
unsigned cursor_ : 6; // ECursor | |
unsigned list_style_type_ : 6; // EListStyleType | |
unsigned style_type_ : 6; // PseudoId | |
unsigned display_ : 5; // EDisplay | |
unsigned affected_by_active_ : 1; // bool | |
unsigned original_display_ : 5; // EDisplay | |
unsigned break_after_ : 4; // EBreakBetween | |
unsigned break_before_ : 4; // EBreakBetween | |
unsigned pointer_events_ : 4; // EPointerEvents | |
unsigned text_align_ : 4; // ETextAlign | |
unsigned vertical_align_ : 4; // EVerticalAlign | |
unsigned overflow_x_ : 3; // EOverflow | |
unsigned overflow_y_ : 3; // EOverflow | |
unsigned affected_by_drag_ : 1; // bool | |
unsigned position_ : 3; // EPosition | |
unsigned unicode_bidi_ : 3; // UnicodeBidi | |
unsigned white_space_ : 3; // EWhiteSpace | |
unsigned break_inside_ : 2; // EBreakInside | |
unsigned clear_ : 2; // EClear | |
unsigned floating_ : 2; // EFloat | |
unsigned inside_link_ : 2; // EInsideLink | |
unsigned overflow_anchor_ : 2; // EOverflowAnchor | |
unsigned text_transform_ : 2; // ETextTransform | |
unsigned transform_box_ : 2; // ETransformBox | |
unsigned visibility_ : 2; // EVisibility | |
unsigned writing_mode_ : 2; // WritingMode | |
unsigned affected_by_focus_within_ : 1; // bool | |
unsigned affected_by_hover_ : 1; // bool | |
unsigned border_collapse_ : 1; // EBorderCollapse | |
unsigned border_collapse_is_inherited_ : 1; // bool | |
unsigned box_direction_ : 1; // EBoxDirection | |
unsigned box_direction_is_inherited_ : 1; // bool | |
unsigned caption_side_ : 1; // ECaptionSide | |
unsigned caption_side_is_inherited_ : 1; // bool | |
unsigned direction_ : 1; // TextDirection | |
unsigned empty_cells_ : 1; // EEmptyCells | |
unsigned empty_cells_is_inherited_ : 1; // bool | |
unsigned empty_state_ : 1; // bool | |
unsigned has_explicitly_inherited_properties_ : 1; // bool | |
unsigned has_rem_units_ : 1; // bool | |
unsigned has_simple_underline_ : 1; // bool | |
unsigned has_variable_reference_from_non_inherited_property_ : 1; // bool | |
unsigned has_viewport_units_ : 1; // bool | |
unsigned is_link_ : 1; // bool | |
unsigned list_style_position_ : 1; // EListStylePosition | |
unsigned list_style_position_is_inherited_ : 1; // bool | |
unsigned pointer_events_is_inherited_ : 1; // bool | |
unsigned print_color_adjust_ : 1; // EPrintColorAdjust | |
unsigned print_color_adjust_is_inherited_ : 1; // bool | |
unsigned rtl_ordering_ : 1; // EOrder | |
unsigned rtl_ordering_is_inherited_ : 1; // bool | |
unsigned table_layout_ : 1; // ETableLayout | |
unsigned text_transform_is_inherited_ : 1; // bool | |
unsigned unique_ : 1; // bool | |
unsigned visibility_is_inherited_ : 1; // bool | |
unsigned white_space_is_inherited_ : 1; // bool | |
}; | |
} // namespace blink | |
#endif // ComputedStyleBase_h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
#ifndef ComputedStyleBaseConstants_h | |
#define ComputedStyleBaseConstants_h | |
namespace blink { | |
// TODO(sashab): Move these enums to their own namespace, or add a CSS prefix, | |
// for consistency and to prevent name conflicts. | |
enum class EBorderCollapse : unsigned { | |
kSeparate, | |
kCollapse, | |
}; | |
enum class EBorderStyle : unsigned { | |
kNone, | |
kHidden, | |
kInset, | |
kGroove, | |
kOutset, | |
kRidge, | |
kDotted, | |
kDashed, | |
kSolid, | |
kDouble, | |
}; | |
enum class EBoxDecorationBreak : unsigned { | |
kSlice, | |
kClone, | |
}; | |
enum class EBoxDirection : unsigned { | |
kNormal, | |
kReverse, | |
}; | |
enum class EBoxSizing : unsigned { | |
kContentBox, | |
kBorderBox, | |
}; | |
enum class EBreakBetween : unsigned { | |
kAuto, | |
kAvoid, | |
kAvoidColumn, | |
kAvoidPage, | |
kColumn, | |
kLeft, | |
kPage, | |
kRecto, | |
kRight, | |
kVerso, | |
}; | |
enum class EBreakInside : unsigned { | |
kAuto, | |
kAvoid, | |
kAvoidColumn, | |
kAvoidPage, | |
}; | |
enum class ECaptionSide : unsigned { | |
kTop, | |
kBottom, | |
}; | |
enum class EClear : unsigned { | |
kNone, | |
kLeft, | |
kRight, | |
kBoth, | |
}; | |
enum class ECursor : unsigned { | |
kAuto, | |
kDefault, | |
kNone, | |
kContextMenu, | |
kHelp, | |
kPointer, | |
kProgress, | |
kWait, | |
kCell, | |
kCrosshair, | |
kText, | |
kVerticalText, | |
kAlias, | |
kCopy, | |
kMove, | |
kNoDrop, | |
kNotAllowed, | |
kEResize, | |
kNResize, | |
kNeResize, | |
kNwResize, | |
kSResize, | |
kSeResize, | |
kSwResize, | |
kWResize, | |
kEwResize, | |
kNsResize, | |
kNeswResize, | |
kNwseResize, | |
kColResize, | |
kRowResize, | |
kAllScroll, | |
kZoomIn, | |
kZoomOut, | |
kWebkitGrab, | |
kWebkitGrabbing, | |
}; | |
enum class EDisplay : unsigned { | |
kInline, | |
kBlock, | |
kListItem, | |
kInlineBlock, | |
kTable, | |
kInlineTable, | |
kTableRowGroup, | |
kTableHeaderGroup, | |
kTableFooterGroup, | |
kTableRow, | |
kTableColumnGroup, | |
kTableColumn, | |
kTableCell, | |
kTableCaption, | |
kWebkitBox, | |
kWebkitInlineBox, | |
kFlex, | |
kInlineFlex, | |
kGrid, | |
kInlineGrid, | |
kContents, | |
kFlowRoot, | |
kNone, | |
}; | |
enum class EDraggableRegionMode : unsigned { | |
kNone, | |
kDrag, | |
kNoDrag, | |
}; | |
enum class EEmptyCells : unsigned { | |
kShow, | |
kHide, | |
}; | |
enum class EFloat : unsigned { | |
kNone, | |
kLeft, | |
kRight, | |
}; | |
enum class EImageRendering : unsigned { | |
kAuto, | |
kOptimizeSpeed, | |
kOptimizeQuality, | |
kWebkitOptimizeContrast, | |
kPixelated, | |
}; | |
enum class EInsideLink : unsigned { | |
kNotInsideLink, | |
kInsideUnvisitedLink, | |
kInsideVisitedLink, | |
}; | |
enum class EIsolation : unsigned { | |
kAuto, | |
kIsolate, | |
}; | |
enum class EListStylePosition : unsigned { | |
kOutside, | |
kInside, | |
}; | |
enum class EListStyleType : unsigned { | |
kDisc, | |
kCircle, | |
kSquare, | |
kDecimal, | |
kDecimalLeadingZero, | |
kArabicIndic, | |
kBengali, | |
kCambodian, | |
kKhmer, | |
kDevanagari, | |
kGujarati, | |
kGurmukhi, | |
kKannada, | |
kLao, | |
kMalayalam, | |
kMongolian, | |
kMyanmar, | |
kOriya, | |
kPersian, | |
kUrdu, | |
kTelugu, | |
kTibetan, | |
kThai, | |
kLowerRoman, | |
kUpperRoman, | |
kLowerGreek, | |
kLowerAlpha, | |
kLowerLatin, | |
kUpperAlpha, | |
kUpperLatin, | |
kCjkEarthlyBranch, | |
kCjkHeavenlyStem, | |
kEthiopicHalehame, | |
kEthiopicHalehameAm, | |
kEthiopicHalehameTiEr, | |
kEthiopicHalehameTiEt, | |
kHangul, | |
kHangulConsonant, | |
kKoreanHangulFormal, | |
kKoreanHanjaFormal, | |
kKoreanHanjaInformal, | |
kHebrew, | |
kArmenian, | |
kLowerArmenian, | |
kUpperArmenian, | |
kGeorgian, | |
kCjkIdeographic, | |
kSimpChineseFormal, | |
kSimpChineseInformal, | |
kTradChineseFormal, | |
kTradChineseInformal, | |
kHiragana, | |
kKatakana, | |
kHiraganaIroha, | |
kKatakanaIroha, | |
kNone, | |
}; | |
enum class EMarginCollapse : unsigned { | |
kCollapse, | |
kSeparate, | |
kDiscard, | |
}; | |
enum class EObjectFit : unsigned { | |
kFill, | |
kContain, | |
kCover, | |
kNone, | |
kScaleDown, | |
}; | |
enum class EOrder : unsigned { | |
kLogical, | |
kVisual, | |
}; | |
enum class EOverflow : unsigned { | |
kVisible, | |
kHidden, | |
kScroll, | |
kAuto, | |
kOverlay, | |
kWebkitPagedX, | |
kWebkitPagedY, | |
}; | |
enum class EOverflowAnchor : unsigned { | |
kVisible, | |
kNone, | |
kAuto, | |
}; | |
enum class EOverflowWrap : unsigned { | |
kNormal, | |
kBreakWord, | |
}; | |
enum class EPointerEvents : unsigned { | |
kNone, | |
kAuto, | |
kStroke, | |
kFill, | |
kPainted, | |
kVisible, | |
kVisibleStroke, | |
kVisibleFill, | |
kVisiblePainted, | |
kBoundingBox, | |
kAll, | |
}; | |
enum class EPosition : unsigned { | |
kStatic, | |
kRelative, | |
kAbsolute, | |
kFixed, | |
kSticky, | |
}; | |
enum class EPrintColorAdjust : unsigned { | |
kEconomy, | |
kExact, | |
}; | |
enum class ESpeak : unsigned { | |
kNone, | |
kNormal, | |
kSpellOut, | |
kDigits, | |
kLiteralPunctuation, | |
kNoPunctuation, | |
}; | |
enum class ETableLayout : unsigned { | |
kAuto, | |
kFixed, | |
}; | |
enum class ETextAlign : unsigned { | |
kLeft, | |
kRight, | |
kCenter, | |
kJustify, | |
kWebkitLeft, | |
kWebkitRight, | |
kWebkitCenter, | |
kStart, | |
kEnd, | |
}; | |
enum class ETextAlignLast : unsigned { | |
kAuto, | |
kStart, | |
kEnd, | |
kLeft, | |
kRight, | |
kCenter, | |
kJustify, | |
}; | |
enum class ETextCombine : unsigned { | |
kNone, | |
kAll, | |
}; | |
enum class ETextOrientation : unsigned { | |
kSideways, | |
kMixed, | |
kUpright, | |
}; | |
enum class ETextSecurity : unsigned { | |
kNone, | |
kDisc, | |
kCircle, | |
kSquare, | |
}; | |
enum class ETextTransform : unsigned { | |
kCapitalize, | |
kUppercase, | |
kLowercase, | |
kNone, | |
}; | |
enum class ETransformBox : unsigned { | |
kBorderBox, | |
kFillBox, | |
kViewBox, | |
}; | |
enum class EUserModify : unsigned { | |
kReadOnly, | |
kReadWrite, | |
kReadWritePlaintextOnly, | |
}; | |
enum class EUserSelect : unsigned { | |
kNone, | |
kText, | |
kAll, | |
}; | |
enum class EVisibility : unsigned { | |
kVisible, | |
kHidden, | |
kCollapse, | |
}; | |
enum class EWhiteSpace : unsigned { | |
kNormal, | |
kPre, | |
kPreWrap, | |
kPreLine, | |
kNowrap, | |
kWebkitNowrap, | |
}; | |
enum class EWordBreak : unsigned { | |
kNormal, | |
kBreakAll, | |
kKeepAll, | |
kBreakWord, | |
}; | |
enum class Hyphens : unsigned { | |
kNone, | |
kManual, | |
kAuto, | |
}; | |
enum class LineBreak : unsigned { | |
kAuto, | |
kLoose, | |
kNormal, | |
kStrict, | |
kAfterWhiteSpace, | |
}; | |
enum class RubyPosition : unsigned { | |
kBefore, | |
kAfter, | |
}; | |
enum class TextEmphasisFill : unsigned { | |
kFilled, | |
kOpen, | |
}; | |
enum class TextEmphasisPosition : unsigned { | |
kOver, | |
kUnder, | |
}; | |
enum class TextIndentLine : unsigned { | |
kFirstLine, | |
kEachLine, | |
}; | |
enum class TextIndentType : unsigned { | |
kNormal, | |
kHanging, | |
}; | |
enum class TextUnderlinePosition : unsigned { | |
kAuto, | |
kUnder, | |
}; | |
} // namespace blink | |
#endif // ComputedStyleBaseConstants_h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2016 The Chromium Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
#include "core/css/cssom/CSSOMKeywords.h" | |
#include "core/css/CSSPropertyIDTemplates.h" | |
#include "core/css/cssom/CSSKeywordValue.h" | |
#include "platform/wtf/HashMap.h" | |
namespace blink { | |
bool CSSOMKeywords::ValidKeywordForProperty(CSSPropertyID id, | |
const CSSKeywordValue& keyword) { | |
CSSValueID valueID = keyword.KeywordValueID(); | |
if (valueID == CSSValueInvalid) { | |
return false; | |
} | |
if (valueID == CSSValueInherit || valueID == CSSValueInitial || | |
valueID == CSSValueUnset) { | |
// These are css-wide keywords that are valid for all properties. | |
return true; | |
} | |
switch (id) { | |
case CSSPropertyBorderBottomStyle: { | |
switch (valueID) { | |
case CSSValueNone: | |
case CSSValueHidden: | |
case CSSValueInset: | |
case CSSValueGroove: | |
case CSSValueOutset: | |
case CSSValueRidge: | |
case CSSValueDotted: | |
case CSSValueDashed: | |
case CSSValueSolid: | |
case CSSValueDouble: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyHeight: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueFitContent: | |
case CSSValueMinContent: | |
case CSSValueMaxContent: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBorderImageSource: { | |
switch (valueID) { | |
case CSSValueNone: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyImageRendering: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueOptimizeSpeed: | |
case CSSValueOptimizeQuality: | |
case CSSValueWebkitOptimizeContrast: | |
case CSSValuePixelated: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBreakBefore: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueAvoid: | |
case CSSValueAvoidColumn: | |
case CSSValueAvoidPage: | |
case CSSValueColumn: | |
case CSSValueLeft: | |
case CSSValuePage: | |
case CSSValueRecto: | |
case CSSValueRight: | |
case CSSValueVerso: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyObjectFit: { | |
switch (valueID) { | |
case CSSValueFill: | |
case CSSValueContain: | |
case CSSValueCover: | |
case CSSValueNone: | |
case CSSValueScaleDown: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWebkitBoxDirection: { | |
switch (valueID) { | |
case CSSValueNormal: | |
case CSSValueReverse: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWebkitUserModify: { | |
switch (valueID) { | |
case CSSValueReadOnly: | |
case CSSValueReadWrite: | |
case CSSValueReadWritePlaintextOnly: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWebkitBoxDecorationBreak: { | |
switch (valueID) { | |
case CSSValueSlice: | |
case CSSValueClone: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBreakAfter: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueAvoid: | |
case CSSValueAvoidColumn: | |
case CSSValueAvoidPage: | |
case CSSValueColumn: | |
case CSSValueLeft: | |
case CSSValuePage: | |
case CSSValueRecto: | |
case CSSValueRight: | |
case CSSValueVerso: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyClear: { | |
switch (valueID) { | |
case CSSValueNone: | |
case CSSValueLeft: | |
case CSSValueRight: | |
case CSSValueBoth: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyTextCombineUpright: { | |
switch (valueID) { | |
case CSSValueNone: | |
case CSSValueAll: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyCaptionSide: { | |
switch (valueID) { | |
case CSSValueTop: | |
case CSSValueBottom: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWebkitPrintColorAdjust: { | |
switch (valueID) { | |
case CSSValueEconomy: | |
case CSSValueExact: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWebkitRubyPosition: { | |
switch (valueID) { | |
case CSSValueBefore: | |
case CSSValueAfter: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyTransform: { | |
switch (valueID) { | |
case CSSValueNone: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWebkitTextEmphasisPosition: { | |
switch (valueID) { | |
case CSSValueOver: | |
case CSSValueUnder: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyTextJustify: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueNone: | |
case CSSValueInterWord: | |
case CSSValueDistribute: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBorderRightWidth: { | |
switch (valueID) { | |
case CSSValueThin: | |
case CSSValueMedium: | |
case CSSValueThick: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWritingMode: { | |
switch (valueID) { | |
case CSSValueHorizontalTb: | |
case CSSValueVerticalRl: | |
case CSSValueVerticalLr: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWebkitTextSecurity: { | |
switch (valueID) { | |
case CSSValueNone: | |
case CSSValueDisc: | |
case CSSValueCircle: | |
case CSSValueSquare: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBorderLeftWidth: { | |
switch (valueID) { | |
case CSSValueThin: | |
case CSSValueMedium: | |
case CSSValueThick: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWebkitLineBreak: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueLoose: | |
case CSSValueNormal: | |
case CSSValueStrict: | |
case CSSValueAfterWhiteSpace: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBackgroundImage: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueNone: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyIsolation: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueIsolate: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBorderTopWidth: { | |
switch (valueID) { | |
case CSSValueThin: | |
case CSSValueMedium: | |
case CSSValueThick: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBottom: { | |
switch (valueID) { | |
case CSSValueAuto: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBorderCollapse: { | |
switch (valueID) { | |
case CSSValueSeparate: | |
case CSSValueCollapse: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyTop: { | |
switch (valueID) { | |
case CSSValueAuto: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyUnicodeBidi: { | |
switch (valueID) { | |
case CSSValueNormal: | |
case CSSValueEmbed: | |
case CSSValueBidiOverride: | |
case CSSValueIsolate: | |
case CSSValuePlaintext: | |
case CSSValueIsolateOverride: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyAnimationIterationCount: { | |
switch (valueID) { | |
case CSSValueInfinite: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyFloat: { | |
switch (valueID) { | |
case CSSValueNone: | |
case CSSValueLeft: | |
case CSSValueRight: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWebkitRtlOrdering: { | |
switch (valueID) { | |
case CSSValueLogical: | |
case CSSValueVisual: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyOverflowX: { | |
switch (valueID) { | |
case CSSValueVisible: | |
case CSSValueHidden: | |
case CSSValueScroll: | |
case CSSValueAuto: | |
case CSSValueOverlay: | |
case CSSValueWebkitPagedX: | |
case CSSValueWebkitPagedY: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyOverflowY: { | |
switch (valueID) { | |
case CSSValueVisible: | |
case CSSValueHidden: | |
case CSSValueScroll: | |
case CSSValueAuto: | |
case CSSValueOverlay: | |
case CSSValueWebkitPagedX: | |
case CSSValueWebkitPagedY: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyHyphens: { | |
switch (valueID) { | |
case CSSValueNone: | |
case CSSValueManual: | |
case CSSValueAuto: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyUserSelect: { | |
switch (valueID) { | |
case CSSValueNone: | |
case CSSValueText: | |
case CSSValueAll: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyPosition: { | |
switch (valueID) { | |
case CSSValueStatic: | |
case CSSValueRelative: | |
case CSSValueAbsolute: | |
case CSSValueFixed: | |
case CSSValueSticky: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWebkitAppRegion: { | |
switch (valueID) { | |
case CSSValueNone: | |
case CSSValueDrag: | |
case CSSValueNoDrag: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWhiteSpace: { | |
switch (valueID) { | |
case CSSValueNormal: | |
case CSSValuePre: | |
case CSSValuePreWrap: | |
case CSSValuePreLine: | |
case CSSValueNowrap: | |
case CSSValueWebkitNowrap: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyOverflowWrap: { | |
switch (valueID) { | |
case CSSValueNormal: | |
case CSSValueBreakWord: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWebkitMarginAfterCollapse: { | |
switch (valueID) { | |
case CSSValueCollapse: | |
case CSSValueSeparate: | |
case CSSValueDiscard: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyTableLayout: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueFixed: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBorderRightStyle: { | |
switch (valueID) { | |
case CSSValueNone: | |
case CSSValueHidden: | |
case CSSValueInset: | |
case CSSValueGroove: | |
case CSSValueOutset: | |
case CSSValueRidge: | |
case CSSValueDotted: | |
case CSSValueDashed: | |
case CSSValueSolid: | |
case CSSValueDouble: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyTextUnderlinePosition: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueUnder: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyLeft: { | |
switch (valueID) { | |
case CSSValueAuto: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWidth: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueFitContent: | |
case CSSValueMinContent: | |
case CSSValueMaxContent: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBreakInside: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueAvoid: | |
case CSSValueAvoidColumn: | |
case CSSValueAvoidPage: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyOverflowAnchor: { | |
switch (valueID) { | |
case CSSValueVisible: | |
case CSSValueNone: | |
case CSSValueAuto: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyListStylePosition: { | |
switch (valueID) { | |
case CSSValueOutside: | |
case CSSValueInside: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWebkitMarginBeforeCollapse: { | |
switch (valueID) { | |
case CSSValueCollapse: | |
case CSSValueSeparate: | |
case CSSValueDiscard: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyPointerEvents: { | |
switch (valueID) { | |
case CSSValueNone: | |
case CSSValueAuto: | |
case CSSValueStroke: | |
case CSSValueFill: | |
case CSSValuePainted: | |
case CSSValueVisible: | |
case CSSValueVisibleStroke: | |
case CSSValueVisibleFill: | |
case CSSValueVisiblePainted: | |
case CSSValueBoundingBox: | |
case CSSValueAll: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBorderLeftStyle: { | |
switch (valueID) { | |
case CSSValueNone: | |
case CSSValueHidden: | |
case CSSValueInset: | |
case CSSValueGroove: | |
case CSSValueOutset: | |
case CSSValueRidge: | |
case CSSValueDotted: | |
case CSSValueDashed: | |
case CSSValueSolid: | |
case CSSValueDouble: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyAnimationDirection: { | |
switch (valueID) { | |
case CSSValueNormal: | |
case CSSValueReverse: | |
case CSSValueAlternate: | |
case CSSValueAlternateReverse: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyTextTransform: { | |
switch (valueID) { | |
case CSSValueCapitalize: | |
case CSSValueUppercase: | |
case CSSValueLowercase: | |
case CSSValueNone: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyRight: { | |
switch (valueID) { | |
case CSSValueAuto: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyDirection: { | |
switch (valueID) { | |
case CSSValueLtr: | |
case CSSValueRtl: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyTextOrientation: { | |
switch (valueID) { | |
case CSSValueSideways: | |
case CSSValueMixed: | |
case CSSValueUpright: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBorderStyle: { | |
switch (valueID) { | |
case CSSValueNone: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyTextAlignLast: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueStart: | |
case CSSValueEnd: | |
case CSSValueLeft: | |
case CSSValueRight: | |
case CSSValueCenter: | |
case CSSValueJustify: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyCursor: { | |
switch (valueID) { | |
case CSSValueAuto: | |
case CSSValueDefault: | |
case CSSValueNone: | |
case CSSValueContextMenu: | |
case CSSValueHelp: | |
case CSSValuePointer: | |
case CSSValueProgress: | |
case CSSValueWait: | |
case CSSValueCell: | |
case CSSValueCrosshair: | |
case CSSValueText: | |
case CSSValueVerticalText: | |
case CSSValueAlias: | |
case CSSValueCopy: | |
case CSSValueMove: | |
case CSSValueNoDrop: | |
case CSSValueNotAllowed: | |
case CSSValueEResize: | |
case CSSValueNResize: | |
case CSSValueNeResize: | |
case CSSValueNwResize: | |
case CSSValueSResize: | |
case CSSValueSeResize: | |
case CSSValueSwResize: | |
case CSSValueWResize: | |
case CSSValueEwResize: | |
case CSSValueNsResize: | |
case CSSValueNeswResize: | |
case CSSValueNwseResize: | |
case CSSValueColResize: | |
case CSSValueRowResize: | |
case CSSValueAllScroll: | |
case CSSValueZoomIn: | |
case CSSValueZoomOut: | |
case CSSValueWebkitGrab: | |
case CSSValueWebkitGrabbing: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBorderBottomWidth: { | |
switch (valueID) { | |
case CSSValueThin: | |
case CSSValueMedium: | |
case CSSValueThick: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyEmptyCells: { | |
switch (valueID) { | |
case CSSValueShow: | |
case CSSValueHide: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBoxSizing: { | |
switch (valueID) { | |
case CSSValueContentBox: | |
case CSSValueBorderBox: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyDisplay: { | |
switch (valueID) { | |
case CSSValueInline: | |
case CSSValueBlock: | |
case CSSValueListItem: | |
case CSSValueInlineBlock: | |
case CSSValueTable: | |
case CSSValueInlineTable: | |
case CSSValueTableRowGroup: | |
case CSSValueTableHeaderGroup: | |
case CSSValueTableFooterGroup: | |
case CSSValueTableRow: | |
case CSSValueTableColumnGroup: | |
case CSSValueTableColumn: | |
case CSSValueTableCell: | |
case CSSValueTableCaption: | |
case CSSValueWebkitBox: | |
case CSSValueWebkitInlineBox: | |
case CSSValueFlex: | |
case CSSValueInlineFlex: | |
case CSSValueGrid: | |
case CSSValueInlineGrid: | |
case CSSValueContents: | |
case CSSValueFlowRoot: | |
case CSSValueNone: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyWordBreak: { | |
switch (valueID) { | |
case CSSValueNormal: | |
case CSSValueBreakAll: | |
case CSSValueKeepAll: | |
case CSSValueBreakWord: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyBorderTopStyle: { | |
switch (valueID) { | |
case CSSValueNone: | |
case CSSValueHidden: | |
case CSSValueInset: | |
case CSSValueGroove: | |
case CSSValueOutset: | |
case CSSValueRidge: | |
case CSSValueDotted: | |
case CSSValueDashed: | |
case CSSValueSolid: | |
case CSSValueDouble: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertySpeak: { | |
switch (valueID) { | |
case CSSValueNone: | |
case CSSValueNormal: | |
case CSSValueSpellOut: | |
case CSSValueDigits: | |
case CSSValueLiteralPunctuation: | |
case CSSValueNoPunctuation: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyListStyleType: { | |
switch (valueID) { | |
case CSSValueDisc: | |
case CSSValueCircle: | |
case CSSValueSquare: | |
case CSSValueDecimal: | |
case CSSValueDecimalLeadingZero: | |
case CSSValueArabicIndic: | |
case CSSValueBengali: | |
case CSSValueCambodian: | |
case CSSValueKhmer: | |
case CSSValueDevanagari: | |
case CSSValueGujarati: | |
case CSSValueGurmukhi: | |
case CSSValueKannada: | |
case CSSValueLao: | |
case CSSValueMalayalam: | |
case CSSValueMongolian: | |
case CSSValueMyanmar: | |
case CSSValueOriya: | |
case CSSValuePersian: | |
case CSSValueUrdu: | |
case CSSValueTelugu: | |
case CSSValueTibetan: | |
case CSSValueThai: | |
case CSSValueLowerRoman: | |
case CSSValueUpperRoman: | |
case CSSValueLowerGreek: | |
case CSSValueLowerAlpha: | |
case CSSValueLowerLatin: | |
case CSSValueUpperAlpha: | |
case CSSValueUpperLatin: | |
case CSSValueCjkEarthlyBranch: | |
case CSSValueCjkHeavenlyStem: | |
case CSSValueEthiopicHalehame: | |
case CSSValueEthiopicHalehameAm: | |
case CSSValueEthiopicHalehameTiEr: | |
case CSSValueEthiopicHalehameTiEt: | |
case CSSValueHangul: | |
case CSSValueHangulConsonant: | |
case CSSValueKoreanHangulFormal: | |
case CSSValueKoreanHanjaFormal: | |
case CSSValueKoreanHanjaInformal: | |
case CSSValueHebrew: | |
case CSSValueArmenian: | |
case CSSValueLowerArmenian: | |
case CSSValueUpperArmenian: | |
case CSSValueGeorgian: | |
case CSSValueCjkIdeographic: | |
case CSSValueSimpChineseFormal: | |
case CSSValueSimpChineseInformal: | |
case CSSValueTradChineseFormal: | |
case CSSValueTradChineseInformal: | |
case CSSValueHiragana: | |
case CSSValueKatakana: | |
case CSSValueHiraganaIroha: | |
case CSSValueKatakanaIroha: | |
case CSSValueNone: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyTextAlign: { | |
switch (valueID) { | |
case CSSValueLeft: | |
case CSSValueRight: | |
case CSSValueCenter: | |
case CSSValueJustify: | |
case CSSValueWebkitLeft: | |
case CSSValueWebkitRight: | |
case CSSValueWebkitCenter: | |
case CSSValueStart: | |
case CSSValueEnd: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyTransformBox: { | |
switch (valueID) { | |
case CSSValueBorderBox: | |
case CSSValueFillBox: | |
case CSSValueViewBox: | |
return true; | |
default: | |
return false; | |
} | |
} | |
case CSSPropertyVisibility: { | |
switch (valueID) { | |
case CSSValueVisible: | |
case CSSValueHidden: | |
case CSSValueCollapse: | |
return true; | |
default: | |
return false; | |
} | |
} | |
default: | |
return false; | |
} | |
} | |
} // namespace blink |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
#include "base/logging.h" | |
#include "core/CSSValueKeywords.h" | |
#include "core/ComputedStyleBaseConstants.h" | |
#include "platform/text/TextDirection.h" | |
#include "platform/text/TextJustify.h" | |
#include "platform/text/UnicodeBidi.h" | |
#include "platform/text/WritingMode.h" | |
namespace blink { | |
// TODO(shend): most enum values are stored contiguously so we just need | |
// a subtraction and static_cast. This is much faster than switches. | |
// Do not use these functions directly, use the non-generated versions | |
// in CSSValueMappings.h | |
namespace detail { | |
template <class T> | |
T cssValueIDToPlatformEnumGenerated(CSSValueID); | |
template <> | |
inline LineBreak cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueAuto: | |
return LineBreak::kAuto; | |
case CSSValueLoose: | |
return LineBreak::kLoose; | |
case CSSValueNormal: | |
return LineBreak::kNormal; | |
case CSSValueStrict: | |
return LineBreak::kStrict; | |
case CSSValueAfterWhiteSpace: | |
return LineBreak::kAfterWhiteSpace; | |
default: | |
NOTREACHED(); | |
return LineBreak::kAuto; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(LineBreak v) { | |
switch (v) { | |
case LineBreak::kAuto: | |
return CSSValueAuto; | |
case LineBreak::kLoose: | |
return CSSValueLoose; | |
case LineBreak::kNormal: | |
return CSSValueNormal; | |
case LineBreak::kStrict: | |
return CSSValueStrict; | |
case LineBreak::kAfterWhiteSpace: | |
return CSSValueAfterWhiteSpace; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EDraggableRegionMode cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNone: | |
return EDraggableRegionMode::kNone; | |
case CSSValueDrag: | |
return EDraggableRegionMode::kDrag; | |
case CSSValueNoDrag: | |
return EDraggableRegionMode::kNoDrag; | |
default: | |
NOTREACHED(); | |
return EDraggableRegionMode::kNone; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EDraggableRegionMode v) { | |
switch (v) { | |
case EDraggableRegionMode::kNone: | |
return CSSValueNone; | |
case EDraggableRegionMode::kDrag: | |
return CSSValueDrag; | |
case EDraggableRegionMode::kNoDrag: | |
return CSSValueNoDrag; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EBoxDecorationBreak cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueSlice: | |
return EBoxDecorationBreak::kSlice; | |
case CSSValueClone: | |
return EBoxDecorationBreak::kClone; | |
default: | |
NOTREACHED(); | |
return EBoxDecorationBreak::kSlice; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EBoxDecorationBreak v) { | |
switch (v) { | |
case EBoxDecorationBreak::kSlice: | |
return CSSValueSlice; | |
case EBoxDecorationBreak::kClone: | |
return CSSValueClone; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EUserModify cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueReadOnly: | |
return EUserModify::kReadOnly; | |
case CSSValueReadWrite: | |
return EUserModify::kReadWrite; | |
case CSSValueReadWritePlaintextOnly: | |
return EUserModify::kReadWritePlaintextOnly; | |
default: | |
NOTREACHED(); | |
return EUserModify::kReadOnly; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EUserModify v) { | |
switch (v) { | |
case EUserModify::kReadOnly: | |
return CSSValueReadOnly; | |
case EUserModify::kReadWrite: | |
return CSSValueReadWrite; | |
case EUserModify::kReadWritePlaintextOnly: | |
return CSSValueReadWritePlaintextOnly; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EBoxDirection cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNormal: | |
return EBoxDirection::kNormal; | |
case CSSValueReverse: | |
return EBoxDirection::kReverse; | |
default: | |
NOTREACHED(); | |
return EBoxDirection::kNormal; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EBoxDirection v) { | |
switch (v) { | |
case EBoxDirection::kNormal: | |
return CSSValueNormal; | |
case EBoxDirection::kReverse: | |
return CSSValueReverse; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EPointerEvents cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNone: | |
return EPointerEvents::kNone; | |
case CSSValueAuto: | |
return EPointerEvents::kAuto; | |
case CSSValueStroke: | |
return EPointerEvents::kStroke; | |
case CSSValueFill: | |
return EPointerEvents::kFill; | |
case CSSValuePainted: | |
return EPointerEvents::kPainted; | |
case CSSValueVisible: | |
return EPointerEvents::kVisible; | |
case CSSValueVisibleStroke: | |
return EPointerEvents::kVisibleStroke; | |
case CSSValueVisibleFill: | |
return EPointerEvents::kVisibleFill; | |
case CSSValueVisiblePainted: | |
return EPointerEvents::kVisiblePainted; | |
case CSSValueBoundingBox: | |
return EPointerEvents::kBoundingBox; | |
case CSSValueAll: | |
return EPointerEvents::kAll; | |
default: | |
NOTREACHED(); | |
return EPointerEvents::kAuto; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EPointerEvents v) { | |
switch (v) { | |
case EPointerEvents::kNone: | |
return CSSValueNone; | |
case EPointerEvents::kAuto: | |
return CSSValueAuto; | |
case EPointerEvents::kStroke: | |
return CSSValueStroke; | |
case EPointerEvents::kFill: | |
return CSSValueFill; | |
case EPointerEvents::kPainted: | |
return CSSValuePainted; | |
case EPointerEvents::kVisible: | |
return CSSValueVisible; | |
case EPointerEvents::kVisibleStroke: | |
return CSSValueVisibleStroke; | |
case EPointerEvents::kVisibleFill: | |
return CSSValueVisibleFill; | |
case EPointerEvents::kVisiblePainted: | |
return CSSValueVisiblePainted; | |
case EPointerEvents::kBoundingBox: | |
return CSSValueBoundingBox; | |
case EPointerEvents::kAll: | |
return CSSValueAll; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline TextDirection cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueLtr: | |
return TextDirection::kLtr; | |
case CSSValueRtl: | |
return TextDirection::kRtl; | |
default: | |
NOTREACHED(); | |
return TextDirection::kLtr; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(TextDirection v) { | |
switch (v) { | |
case TextDirection::kLtr: | |
return CSSValueLtr; | |
case TextDirection::kRtl: | |
return CSSValueRtl; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EBreakInside cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueAuto: | |
return EBreakInside::kAuto; | |
case CSSValueAvoid: | |
return EBreakInside::kAvoid; | |
case CSSValueAvoidColumn: | |
return EBreakInside::kAvoidColumn; | |
case CSSValueAvoidPage: | |
return EBreakInside::kAvoidPage; | |
default: | |
NOTREACHED(); | |
return EBreakInside::kAuto; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EBreakInside v) { | |
switch (v) { | |
case EBreakInside::kAuto: | |
return CSSValueAuto; | |
case EBreakInside::kAvoid: | |
return CSSValueAvoid; | |
case EBreakInside::kAvoidColumn: | |
return CSSValueAvoidColumn; | |
case EBreakInside::kAvoidPage: | |
return CSSValueAvoidPage; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EFloat cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNone: | |
return EFloat::kNone; | |
case CSSValueLeft: | |
return EFloat::kLeft; | |
case CSSValueRight: | |
return EFloat::kRight; | |
default: | |
NOTREACHED(); | |
return EFloat::kNone; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EFloat v) { | |
switch (v) { | |
case EFloat::kNone: | |
return CSSValueNone; | |
case EFloat::kLeft: | |
return CSSValueLeft; | |
case EFloat::kRight: | |
return CSSValueRight; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EImageRendering cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueAuto: | |
return EImageRendering::kAuto; | |
case CSSValueOptimizeSpeed: | |
return EImageRendering::kOptimizeSpeed; | |
case CSSValueOptimizeQuality: | |
return EImageRendering::kOptimizeQuality; | |
case CSSValueWebkitOptimizeContrast: | |
return EImageRendering::kWebkitOptimizeContrast; | |
case CSSValuePixelated: | |
return EImageRendering::kPixelated; | |
default: | |
NOTREACHED(); | |
return EImageRendering::kAuto; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EImageRendering v) { | |
switch (v) { | |
case EImageRendering::kAuto: | |
return CSSValueAuto; | |
case EImageRendering::kOptimizeSpeed: | |
return CSSValueOptimizeSpeed; | |
case EImageRendering::kOptimizeQuality: | |
return CSSValueOptimizeQuality; | |
case EImageRendering::kWebkitOptimizeContrast: | |
return CSSValueWebkitOptimizeContrast; | |
case EImageRendering::kPixelated: | |
return CSSValuePixelated; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EWordBreak cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNormal: | |
return EWordBreak::kNormal; | |
case CSSValueBreakAll: | |
return EWordBreak::kBreakAll; | |
case CSSValueKeepAll: | |
return EWordBreak::kKeepAll; | |
case CSSValueBreakWord: | |
return EWordBreak::kBreakWord; | |
default: | |
NOTREACHED(); | |
return EWordBreak::kNormal; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EWordBreak v) { | |
switch (v) { | |
case EWordBreak::kNormal: | |
return CSSValueNormal; | |
case EWordBreak::kBreakAll: | |
return CSSValueBreakAll; | |
case EWordBreak::kKeepAll: | |
return CSSValueKeepAll; | |
case EWordBreak::kBreakWord: | |
return CSSValueBreakWord; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EMarginCollapse cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueCollapse: | |
return EMarginCollapse::kCollapse; | |
case CSSValueSeparate: | |
return EMarginCollapse::kSeparate; | |
case CSSValueDiscard: | |
return EMarginCollapse::kDiscard; | |
default: | |
NOTREACHED(); | |
return EMarginCollapse::kCollapse; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EMarginCollapse v) { | |
switch (v) { | |
case EMarginCollapse::kCollapse: | |
return CSSValueCollapse; | |
case EMarginCollapse::kSeparate: | |
return CSSValueSeparate; | |
case EMarginCollapse::kDiscard: | |
return CSSValueDiscard; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EPrintColorAdjust cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueEconomy: | |
return EPrintColorAdjust::kEconomy; | |
case CSSValueExact: | |
return EPrintColorAdjust::kExact; | |
default: | |
NOTREACHED(); | |
return EPrintColorAdjust::kEconomy; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EPrintColorAdjust v) { | |
switch (v) { | |
case EPrintColorAdjust::kEconomy: | |
return CSSValueEconomy; | |
case EPrintColorAdjust::kExact: | |
return CSSValueExact; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EOverflowAnchor cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueVisible: | |
return EOverflowAnchor::kVisible; | |
case CSSValueNone: | |
return EOverflowAnchor::kNone; | |
case CSSValueAuto: | |
return EOverflowAnchor::kAuto; | |
default: | |
NOTREACHED(); | |
return EOverflowAnchor::kAuto; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EOverflowAnchor v) { | |
switch (v) { | |
case EOverflowAnchor::kVisible: | |
return CSSValueVisible; | |
case EOverflowAnchor::kNone: | |
return CSSValueNone; | |
case EOverflowAnchor::kAuto: | |
return CSSValueAuto; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EDisplay cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueInline: | |
return EDisplay::kInline; | |
case CSSValueBlock: | |
return EDisplay::kBlock; | |
case CSSValueListItem: | |
return EDisplay::kListItem; | |
case CSSValueInlineBlock: | |
return EDisplay::kInlineBlock; | |
case CSSValueTable: | |
return EDisplay::kTable; | |
case CSSValueInlineTable: | |
return EDisplay::kInlineTable; | |
case CSSValueTableRowGroup: | |
return EDisplay::kTableRowGroup; | |
case CSSValueTableHeaderGroup: | |
return EDisplay::kTableHeaderGroup; | |
case CSSValueTableFooterGroup: | |
return EDisplay::kTableFooterGroup; | |
case CSSValueTableRow: | |
return EDisplay::kTableRow; | |
case CSSValueTableColumnGroup: | |
return EDisplay::kTableColumnGroup; | |
case CSSValueTableColumn: | |
return EDisplay::kTableColumn; | |
case CSSValueTableCell: | |
return EDisplay::kTableCell; | |
case CSSValueTableCaption: | |
return EDisplay::kTableCaption; | |
case CSSValueWebkitBox: | |
return EDisplay::kWebkitBox; | |
case CSSValueWebkitInlineBox: | |
return EDisplay::kWebkitInlineBox; | |
case CSSValueFlex: | |
return EDisplay::kFlex; | |
case CSSValueInlineFlex: | |
return EDisplay::kInlineFlex; | |
case CSSValueGrid: | |
return EDisplay::kGrid; | |
case CSSValueInlineGrid: | |
return EDisplay::kInlineGrid; | |
case CSSValueContents: | |
return EDisplay::kContents; | |
case CSSValueFlowRoot: | |
return EDisplay::kFlowRoot; | |
case CSSValueNone: | |
return EDisplay::kNone; | |
default: | |
NOTREACHED(); | |
return EDisplay::kInline; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EDisplay v) { | |
switch (v) { | |
case EDisplay::kInline: | |
return CSSValueInline; | |
case EDisplay::kBlock: | |
return CSSValueBlock; | |
case EDisplay::kListItem: | |
return CSSValueListItem; | |
case EDisplay::kInlineBlock: | |
return CSSValueInlineBlock; | |
case EDisplay::kTable: | |
return CSSValueTable; | |
case EDisplay::kInlineTable: | |
return CSSValueInlineTable; | |
case EDisplay::kTableRowGroup: | |
return CSSValueTableRowGroup; | |
case EDisplay::kTableHeaderGroup: | |
return CSSValueTableHeaderGroup; | |
case EDisplay::kTableFooterGroup: | |
return CSSValueTableFooterGroup; | |
case EDisplay::kTableRow: | |
return CSSValueTableRow; | |
case EDisplay::kTableColumnGroup: | |
return CSSValueTableColumnGroup; | |
case EDisplay::kTableColumn: | |
return CSSValueTableColumn; | |
case EDisplay::kTableCell: | |
return CSSValueTableCell; | |
case EDisplay::kTableCaption: | |
return CSSValueTableCaption; | |
case EDisplay::kWebkitBox: | |
return CSSValueWebkitBox; | |
case EDisplay::kWebkitInlineBox: | |
return CSSValueWebkitInlineBox; | |
case EDisplay::kFlex: | |
return CSSValueFlex; | |
case EDisplay::kInlineFlex: | |
return CSSValueInlineFlex; | |
case EDisplay::kGrid: | |
return CSSValueGrid; | |
case EDisplay::kInlineGrid: | |
return CSSValueInlineGrid; | |
case EDisplay::kContents: | |
return CSSValueContents; | |
case EDisplay::kFlowRoot: | |
return CSSValueFlowRoot; | |
case EDisplay::kNone: | |
return CSSValueNone; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline ETextOrientation cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueSideways: | |
return ETextOrientation::kSideways; | |
case CSSValueMixed: | |
return ETextOrientation::kMixed; | |
case CSSValueUpright: | |
return ETextOrientation::kUpright; | |
default: | |
NOTREACHED(); | |
return ETextOrientation::kMixed; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(ETextOrientation v) { | |
switch (v) { | |
case ETextOrientation::kSideways: | |
return CSSValueSideways; | |
case ETextOrientation::kMixed: | |
return CSSValueMixed; | |
case ETextOrientation::kUpright: | |
return CSSValueUpright; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EBoxSizing cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueContentBox: | |
return EBoxSizing::kContentBox; | |
case CSSValueBorderBox: | |
return EBoxSizing::kBorderBox; | |
default: | |
NOTREACHED(); | |
return EBoxSizing::kContentBox; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EBoxSizing v) { | |
switch (v) { | |
case EBoxSizing::kContentBox: | |
return CSSValueContentBox; | |
case EBoxSizing::kBorderBox: | |
return CSSValueBorderBox; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EOrder cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueLogical: | |
return EOrder::kLogical; | |
case CSSValueVisual: | |
return EOrder::kVisual; | |
default: | |
NOTREACHED(); | |
return EOrder::kLogical; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EOrder v) { | |
switch (v) { | |
case EOrder::kLogical: | |
return CSSValueLogical; | |
case EOrder::kVisual: | |
return CSSValueVisual; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline Hyphens cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNone: | |
return Hyphens::kNone; | |
case CSSValueManual: | |
return Hyphens::kManual; | |
case CSSValueAuto: | |
return Hyphens::kAuto; | |
default: | |
NOTREACHED(); | |
return Hyphens::kManual; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(Hyphens v) { | |
switch (v) { | |
case Hyphens::kNone: | |
return CSSValueNone; | |
case Hyphens::kManual: | |
return CSSValueManual; | |
case Hyphens::kAuto: | |
return CSSValueAuto; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EWhiteSpace cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNormal: | |
return EWhiteSpace::kNormal; | |
case CSSValuePre: | |
return EWhiteSpace::kPre; | |
case CSSValuePreWrap: | |
return EWhiteSpace::kPreWrap; | |
case CSSValuePreLine: | |
return EWhiteSpace::kPreLine; | |
case CSSValueNowrap: | |
return EWhiteSpace::kNowrap; | |
case CSSValueWebkitNowrap: | |
return EWhiteSpace::kWebkitNowrap; | |
default: | |
NOTREACHED(); | |
return EWhiteSpace::kNormal; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EWhiteSpace v) { | |
switch (v) { | |
case EWhiteSpace::kNormal: | |
return CSSValueNormal; | |
case EWhiteSpace::kPre: | |
return CSSValuePre; | |
case EWhiteSpace::kPreWrap: | |
return CSSValuePreWrap; | |
case EWhiteSpace::kPreLine: | |
return CSSValuePreLine; | |
case EWhiteSpace::kNowrap: | |
return CSSValueNowrap; | |
case EWhiteSpace::kWebkitNowrap: | |
return CSSValueWebkitNowrap; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline ETextTransform cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueCapitalize: | |
return ETextTransform::kCapitalize; | |
case CSSValueUppercase: | |
return ETextTransform::kUppercase; | |
case CSSValueLowercase: | |
return ETextTransform::kLowercase; | |
case CSSValueNone: | |
return ETextTransform::kNone; | |
default: | |
NOTREACHED(); | |
return ETextTransform::kNone; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(ETextTransform v) { | |
switch (v) { | |
case ETextTransform::kCapitalize: | |
return CSSValueCapitalize; | |
case ETextTransform::kUppercase: | |
return CSSValueUppercase; | |
case ETextTransform::kLowercase: | |
return CSSValueLowercase; | |
case ETextTransform::kNone: | |
return CSSValueNone; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EBreakBetween cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueAuto: | |
return EBreakBetween::kAuto; | |
case CSSValueAvoid: | |
return EBreakBetween::kAvoid; | |
case CSSValueAvoidColumn: | |
return EBreakBetween::kAvoidColumn; | |
case CSSValueAvoidPage: | |
return EBreakBetween::kAvoidPage; | |
case CSSValueColumn: | |
return EBreakBetween::kColumn; | |
case CSSValueLeft: | |
return EBreakBetween::kLeft; | |
case CSSValuePage: | |
return EBreakBetween::kPage; | |
case CSSValueRecto: | |
return EBreakBetween::kRecto; | |
case CSSValueRight: | |
return EBreakBetween::kRight; | |
case CSSValueVerso: | |
return EBreakBetween::kVerso; | |
default: | |
NOTREACHED(); | |
return EBreakBetween::kAuto; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EBreakBetween v) { | |
switch (v) { | |
case EBreakBetween::kAuto: | |
return CSSValueAuto; | |
case EBreakBetween::kAvoid: | |
return CSSValueAvoid; | |
case EBreakBetween::kAvoidColumn: | |
return CSSValueAvoidColumn; | |
case EBreakBetween::kAvoidPage: | |
return CSSValueAvoidPage; | |
case EBreakBetween::kColumn: | |
return CSSValueColumn; | |
case EBreakBetween::kLeft: | |
return CSSValueLeft; | |
case EBreakBetween::kPage: | |
return CSSValuePage; | |
case EBreakBetween::kRecto: | |
return CSSValueRecto; | |
case EBreakBetween::kRight: | |
return CSSValueRight; | |
case EBreakBetween::kVerso: | |
return CSSValueVerso; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline ETextCombine cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNone: | |
return ETextCombine::kNone; | |
case CSSValueAll: | |
return ETextCombine::kAll; | |
default: | |
NOTREACHED(); | |
return ETextCombine::kNone; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(ETextCombine v) { | |
switch (v) { | |
case ETextCombine::kNone: | |
return CSSValueNone; | |
case ETextCombine::kAll: | |
return CSSValueAll; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline TextUnderlinePosition cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueAuto: | |
return TextUnderlinePosition::kAuto; | |
case CSSValueUnder: | |
return TextUnderlinePosition::kUnder; | |
default: | |
NOTREACHED(); | |
return TextUnderlinePosition::kAuto; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(TextUnderlinePosition v) { | |
switch (v) { | |
case TextUnderlinePosition::kAuto: | |
return CSSValueAuto; | |
case TextUnderlinePosition::kUnder: | |
return CSSValueUnder; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline ETextAlignLast cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueAuto: | |
return ETextAlignLast::kAuto; | |
case CSSValueStart: | |
return ETextAlignLast::kStart; | |
case CSSValueEnd: | |
return ETextAlignLast::kEnd; | |
case CSSValueLeft: | |
return ETextAlignLast::kLeft; | |
case CSSValueRight: | |
return ETextAlignLast::kRight; | |
case CSSValueCenter: | |
return ETextAlignLast::kCenter; | |
case CSSValueJustify: | |
return ETextAlignLast::kJustify; | |
default: | |
NOTREACHED(); | |
return ETextAlignLast::kAuto; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(ETextAlignLast v) { | |
switch (v) { | |
case ETextAlignLast::kAuto: | |
return CSSValueAuto; | |
case ETextAlignLast::kStart: | |
return CSSValueStart; | |
case ETextAlignLast::kEnd: | |
return CSSValueEnd; | |
case ETextAlignLast::kLeft: | |
return CSSValueLeft; | |
case ETextAlignLast::kRight: | |
return CSSValueRight; | |
case ETextAlignLast::kCenter: | |
return CSSValueCenter; | |
case ETextAlignLast::kJustify: | |
return CSSValueJustify; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline TextEmphasisPosition cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueOver: | |
return TextEmphasisPosition::kOver; | |
case CSSValueUnder: | |
return TextEmphasisPosition::kUnder; | |
default: | |
NOTREACHED(); | |
return TextEmphasisPosition::kOver; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(TextEmphasisPosition v) { | |
switch (v) { | |
case TextEmphasisPosition::kOver: | |
return CSSValueOver; | |
case TextEmphasisPosition::kUnder: | |
return CSSValueUnder; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EBorderStyle cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNone: | |
return EBorderStyle::kNone; | |
case CSSValueHidden: | |
return EBorderStyle::kHidden; | |
case CSSValueInset: | |
return EBorderStyle::kInset; | |
case CSSValueGroove: | |
return EBorderStyle::kGroove; | |
case CSSValueOutset: | |
return EBorderStyle::kOutset; | |
case CSSValueRidge: | |
return EBorderStyle::kRidge; | |
case CSSValueDotted: | |
return EBorderStyle::kDotted; | |
case CSSValueDashed: | |
return EBorderStyle::kDashed; | |
case CSSValueSolid: | |
return EBorderStyle::kSolid; | |
case CSSValueDouble: | |
return EBorderStyle::kDouble; | |
default: | |
NOTREACHED(); | |
return EBorderStyle::kNone; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EBorderStyle v) { | |
switch (v) { | |
case EBorderStyle::kNone: | |
return CSSValueNone; | |
case EBorderStyle::kHidden: | |
return CSSValueHidden; | |
case EBorderStyle::kInset: | |
return CSSValueInset; | |
case EBorderStyle::kGroove: | |
return CSSValueGroove; | |
case EBorderStyle::kOutset: | |
return CSSValueOutset; | |
case EBorderStyle::kRidge: | |
return CSSValueRidge; | |
case EBorderStyle::kDotted: | |
return CSSValueDotted; | |
case EBorderStyle::kDashed: | |
return CSSValueDashed; | |
case EBorderStyle::kSolid: | |
return CSSValueSolid; | |
case EBorderStyle::kDouble: | |
return CSSValueDouble; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline ETransformBox cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueBorderBox: | |
return ETransformBox::kBorderBox; | |
case CSSValueFillBox: | |
return ETransformBox::kFillBox; | |
case CSSValueViewBox: | |
return ETransformBox::kViewBox; | |
default: | |
NOTREACHED(); | |
return ETransformBox::kBorderBox; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(ETransformBox v) { | |
switch (v) { | |
case ETransformBox::kBorderBox: | |
return CSSValueBorderBox; | |
case ETransformBox::kFillBox: | |
return CSSValueFillBox; | |
case ETransformBox::kViewBox: | |
return CSSValueViewBox; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline ECursor cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueAuto: | |
return ECursor::kAuto; | |
case CSSValueDefault: | |
return ECursor::kDefault; | |
case CSSValueNone: | |
return ECursor::kNone; | |
case CSSValueContextMenu: | |
return ECursor::kContextMenu; | |
case CSSValueHelp: | |
return ECursor::kHelp; | |
case CSSValuePointer: | |
return ECursor::kPointer; | |
case CSSValueProgress: | |
return ECursor::kProgress; | |
case CSSValueWait: | |
return ECursor::kWait; | |
case CSSValueCell: | |
return ECursor::kCell; | |
case CSSValueCrosshair: | |
return ECursor::kCrosshair; | |
case CSSValueText: | |
return ECursor::kText; | |
case CSSValueVerticalText: | |
return ECursor::kVerticalText; | |
case CSSValueAlias: | |
return ECursor::kAlias; | |
case CSSValueCopy: | |
return ECursor::kCopy; | |
case CSSValueMove: | |
return ECursor::kMove; | |
case CSSValueNoDrop: | |
return ECursor::kNoDrop; | |
case CSSValueNotAllowed: | |
return ECursor::kNotAllowed; | |
case CSSValueEResize: | |
return ECursor::kEResize; | |
case CSSValueNResize: | |
return ECursor::kNResize; | |
case CSSValueNeResize: | |
return ECursor::kNeResize; | |
case CSSValueNwResize: | |
return ECursor::kNwResize; | |
case CSSValueSResize: | |
return ECursor::kSResize; | |
case CSSValueSeResize: | |
return ECursor::kSeResize; | |
case CSSValueSwResize: | |
return ECursor::kSwResize; | |
case CSSValueWResize: | |
return ECursor::kWResize; | |
case CSSValueEwResize: | |
return ECursor::kEwResize; | |
case CSSValueNsResize: | |
return ECursor::kNsResize; | |
case CSSValueNeswResize: | |
return ECursor::kNeswResize; | |
case CSSValueNwseResize: | |
return ECursor::kNwseResize; | |
case CSSValueColResize: | |
return ECursor::kColResize; | |
case CSSValueRowResize: | |
return ECursor::kRowResize; | |
case CSSValueAllScroll: | |
return ECursor::kAllScroll; | |
case CSSValueZoomIn: | |
return ECursor::kZoomIn; | |
case CSSValueZoomOut: | |
return ECursor::kZoomOut; | |
case CSSValueWebkitGrab: | |
return ECursor::kWebkitGrab; | |
case CSSValueWebkitGrabbing: | |
return ECursor::kWebkitGrabbing; | |
default: | |
NOTREACHED(); | |
return ECursor::kAuto; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(ECursor v) { | |
switch (v) { | |
case ECursor::kAuto: | |
return CSSValueAuto; | |
case ECursor::kDefault: | |
return CSSValueDefault; | |
case ECursor::kNone: | |
return CSSValueNone; | |
case ECursor::kContextMenu: | |
return CSSValueContextMenu; | |
case ECursor::kHelp: | |
return CSSValueHelp; | |
case ECursor::kPointer: | |
return CSSValuePointer; | |
case ECursor::kProgress: | |
return CSSValueProgress; | |
case ECursor::kWait: | |
return CSSValueWait; | |
case ECursor::kCell: | |
return CSSValueCell; | |
case ECursor::kCrosshair: | |
return CSSValueCrosshair; | |
case ECursor::kText: | |
return CSSValueText; | |
case ECursor::kVerticalText: | |
return CSSValueVerticalText; | |
case ECursor::kAlias: | |
return CSSValueAlias; | |
case ECursor::kCopy: | |
return CSSValueCopy; | |
case ECursor::kMove: | |
return CSSValueMove; | |
case ECursor::kNoDrop: | |
return CSSValueNoDrop; | |
case ECursor::kNotAllowed: | |
return CSSValueNotAllowed; | |
case ECursor::kEResize: | |
return CSSValueEResize; | |
case ECursor::kNResize: | |
return CSSValueNResize; | |
case ECursor::kNeResize: | |
return CSSValueNeResize; | |
case ECursor::kNwResize: | |
return CSSValueNwResize; | |
case ECursor::kSResize: | |
return CSSValueSResize; | |
case ECursor::kSeResize: | |
return CSSValueSeResize; | |
case ECursor::kSwResize: | |
return CSSValueSwResize; | |
case ECursor::kWResize: | |
return CSSValueWResize; | |
case ECursor::kEwResize: | |
return CSSValueEwResize; | |
case ECursor::kNsResize: | |
return CSSValueNsResize; | |
case ECursor::kNeswResize: | |
return CSSValueNeswResize; | |
case ECursor::kNwseResize: | |
return CSSValueNwseResize; | |
case ECursor::kColResize: | |
return CSSValueColResize; | |
case ECursor::kRowResize: | |
return CSSValueRowResize; | |
case ECursor::kAllScroll: | |
return CSSValueAllScroll; | |
case ECursor::kZoomIn: | |
return CSSValueZoomIn; | |
case ECursor::kZoomOut: | |
return CSSValueZoomOut; | |
case ECursor::kWebkitGrab: | |
return CSSValueWebkitGrab; | |
case ECursor::kWebkitGrabbing: | |
return CSSValueWebkitGrabbing; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EOverflowWrap cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNormal: | |
return EOverflowWrap::kNormal; | |
case CSSValueBreakWord: | |
return EOverflowWrap::kBreakWord; | |
default: | |
NOTREACHED(); | |
return EOverflowWrap::kNormal; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EOverflowWrap v) { | |
switch (v) { | |
case EOverflowWrap::kNormal: | |
return CSSValueNormal; | |
case EOverflowWrap::kBreakWord: | |
return CSSValueBreakWord; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EOverflow cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueVisible: | |
return EOverflow::kVisible; | |
case CSSValueHidden: | |
return EOverflow::kHidden; | |
case CSSValueScroll: | |
return EOverflow::kScroll; | |
case CSSValueAuto: | |
return EOverflow::kAuto; | |
case CSSValueOverlay: | |
return EOverflow::kOverlay; | |
case CSSValueWebkitPagedX: | |
return EOverflow::kWebkitPagedX; | |
case CSSValueWebkitPagedY: | |
return EOverflow::kWebkitPagedY; | |
default: | |
NOTREACHED(); | |
return EOverflow::kVisible; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EOverflow v) { | |
switch (v) { | |
case EOverflow::kVisible: | |
return CSSValueVisible; | |
case EOverflow::kHidden: | |
return CSSValueHidden; | |
case EOverflow::kScroll: | |
return CSSValueScroll; | |
case EOverflow::kAuto: | |
return CSSValueAuto; | |
case EOverflow::kOverlay: | |
return CSSValueOverlay; | |
case EOverflow::kWebkitPagedX: | |
return CSSValueWebkitPagedX; | |
case EOverflow::kWebkitPagedY: | |
return CSSValueWebkitPagedY; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline ECaptionSide cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueTop: | |
return ECaptionSide::kTop; | |
case CSSValueBottom: | |
return ECaptionSide::kBottom; | |
default: | |
NOTREACHED(); | |
return ECaptionSide::kTop; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(ECaptionSide v) { | |
switch (v) { | |
case ECaptionSide::kTop: | |
return CSSValueTop; | |
case ECaptionSide::kBottom: | |
return CSSValueBottom; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EEmptyCells cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueShow: | |
return EEmptyCells::kShow; | |
case CSSValueHide: | |
return EEmptyCells::kHide; | |
default: | |
NOTREACHED(); | |
return EEmptyCells::kShow; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EEmptyCells v) { | |
switch (v) { | |
case EEmptyCells::kShow: | |
return CSSValueShow; | |
case EEmptyCells::kHide: | |
return CSSValueHide; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline WritingMode cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueHorizontalTb: | |
return WritingMode::kHorizontalTb; | |
case CSSValueVerticalRl: | |
return WritingMode::kVerticalRl; | |
case CSSValueVerticalLr: | |
return WritingMode::kVerticalLr; | |
default: | |
NOTREACHED(); | |
return WritingMode::kHorizontalTb; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(WritingMode v) { | |
switch (v) { | |
case WritingMode::kHorizontalTb: | |
return CSSValueHorizontalTb; | |
case WritingMode::kVerticalRl: | |
return CSSValueVerticalRl; | |
case WritingMode::kVerticalLr: | |
return CSSValueVerticalLr; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline RubyPosition cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueBefore: | |
return RubyPosition::kBefore; | |
case CSSValueAfter: | |
return RubyPosition::kAfter; | |
default: | |
NOTREACHED(); | |
return RubyPosition::kBefore; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(RubyPosition v) { | |
switch (v) { | |
case RubyPosition::kBefore: | |
return CSSValueBefore; | |
case RubyPosition::kAfter: | |
return CSSValueAfter; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline ESpeak cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNone: | |
return ESpeak::kNone; | |
case CSSValueNormal: | |
return ESpeak::kNormal; | |
case CSSValueSpellOut: | |
return ESpeak::kSpellOut; | |
case CSSValueDigits: | |
return ESpeak::kDigits; | |
case CSSValueLiteralPunctuation: | |
return ESpeak::kLiteralPunctuation; | |
case CSSValueNoPunctuation: | |
return ESpeak::kNoPunctuation; | |
default: | |
NOTREACHED(); | |
return ESpeak::kNormal; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(ESpeak v) { | |
switch (v) { | |
case ESpeak::kNone: | |
return CSSValueNone; | |
case ESpeak::kNormal: | |
return CSSValueNormal; | |
case ESpeak::kSpellOut: | |
return CSSValueSpellOut; | |
case ESpeak::kDigits: | |
return CSSValueDigits; | |
case ESpeak::kLiteralPunctuation: | |
return CSSValueLiteralPunctuation; | |
case ESpeak::kNoPunctuation: | |
return CSSValueNoPunctuation; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EVisibility cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueVisible: | |
return EVisibility::kVisible; | |
case CSSValueHidden: | |
return EVisibility::kHidden; | |
case CSSValueCollapse: | |
return EVisibility::kCollapse; | |
default: | |
NOTREACHED(); | |
return EVisibility::kVisible; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EVisibility v) { | |
switch (v) { | |
case EVisibility::kVisible: | |
return CSSValueVisible; | |
case EVisibility::kHidden: | |
return CSSValueHidden; | |
case EVisibility::kCollapse: | |
return CSSValueCollapse; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline UnicodeBidi cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNormal: | |
return UnicodeBidi::kNormal; | |
case CSSValueEmbed: | |
return UnicodeBidi::kEmbed; | |
case CSSValueBidiOverride: | |
return UnicodeBidi::kBidiOverride; | |
case CSSValueIsolate: | |
return UnicodeBidi::kIsolate; | |
case CSSValuePlaintext: | |
return UnicodeBidi::kPlaintext; | |
case CSSValueIsolateOverride: | |
return UnicodeBidi::kIsolateOverride; | |
default: | |
NOTREACHED(); | |
return UnicodeBidi::kNormal; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(UnicodeBidi v) { | |
switch (v) { | |
case UnicodeBidi::kNormal: | |
return CSSValueNormal; | |
case UnicodeBidi::kEmbed: | |
return CSSValueEmbed; | |
case UnicodeBidi::kBidiOverride: | |
return CSSValueBidiOverride; | |
case UnicodeBidi::kIsolate: | |
return CSSValueIsolate; | |
case UnicodeBidi::kPlaintext: | |
return CSSValuePlaintext; | |
case UnicodeBidi::kIsolateOverride: | |
return CSSValueIsolateOverride; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EPosition cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueStatic: | |
return EPosition::kStatic; | |
case CSSValueRelative: | |
return EPosition::kRelative; | |
case CSSValueAbsolute: | |
return EPosition::kAbsolute; | |
case CSSValueFixed: | |
return EPosition::kFixed; | |
case CSSValueSticky: | |
return EPosition::kSticky; | |
default: | |
NOTREACHED(); | |
return EPosition::kStatic; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EPosition v) { | |
switch (v) { | |
case EPosition::kStatic: | |
return CSSValueStatic; | |
case EPosition::kRelative: | |
return CSSValueRelative; | |
case EPosition::kAbsolute: | |
return CSSValueAbsolute; | |
case EPosition::kFixed: | |
return CSSValueFixed; | |
case EPosition::kSticky: | |
return CSSValueSticky; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline ETextAlign cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueLeft: | |
return ETextAlign::kLeft; | |
case CSSValueRight: | |
return ETextAlign::kRight; | |
case CSSValueCenter: | |
return ETextAlign::kCenter; | |
case CSSValueJustify: | |
return ETextAlign::kJustify; | |
case CSSValueWebkitLeft: | |
return ETextAlign::kWebkitLeft; | |
case CSSValueWebkitRight: | |
return ETextAlign::kWebkitRight; | |
case CSSValueWebkitCenter: | |
return ETextAlign::kWebkitCenter; | |
case CSSValueStart: | |
return ETextAlign::kStart; | |
case CSSValueEnd: | |
return ETextAlign::kEnd; | |
default: | |
NOTREACHED(); | |
return ETextAlign::kStart; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(ETextAlign v) { | |
switch (v) { | |
case ETextAlign::kLeft: | |
return CSSValueLeft; | |
case ETextAlign::kRight: | |
return CSSValueRight; | |
case ETextAlign::kCenter: | |
return CSSValueCenter; | |
case ETextAlign::kJustify: | |
return CSSValueJustify; | |
case ETextAlign::kWebkitLeft: | |
return CSSValueWebkitLeft; | |
case ETextAlign::kWebkitRight: | |
return CSSValueWebkitRight; | |
case ETextAlign::kWebkitCenter: | |
return CSSValueWebkitCenter; | |
case ETextAlign::kStart: | |
return CSSValueStart; | |
case ETextAlign::kEnd: | |
return CSSValueEnd; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EListStylePosition cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueOutside: | |
return EListStylePosition::kOutside; | |
case CSSValueInside: | |
return EListStylePosition::kInside; | |
default: | |
NOTREACHED(); | |
return EListStylePosition::kOutside; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EListStylePosition v) { | |
switch (v) { | |
case EListStylePosition::kOutside: | |
return CSSValueOutside; | |
case EListStylePosition::kInside: | |
return CSSValueInside; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline ETableLayout cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueAuto: | |
return ETableLayout::kAuto; | |
case CSSValueFixed: | |
return ETableLayout::kFixed; | |
default: | |
NOTREACHED(); | |
return ETableLayout::kAuto; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(ETableLayout v) { | |
switch (v) { | |
case ETableLayout::kAuto: | |
return CSSValueAuto; | |
case ETableLayout::kFixed: | |
return CSSValueFixed; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline ETextSecurity cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNone: | |
return ETextSecurity::kNone; | |
case CSSValueDisc: | |
return ETextSecurity::kDisc; | |
case CSSValueCircle: | |
return ETextSecurity::kCircle; | |
case CSSValueSquare: | |
return ETextSecurity::kSquare; | |
default: | |
NOTREACHED(); | |
return ETextSecurity::kNone; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(ETextSecurity v) { | |
switch (v) { | |
case ETextSecurity::kNone: | |
return CSSValueNone; | |
case ETextSecurity::kDisc: | |
return CSSValueDisc; | |
case ETextSecurity::kCircle: | |
return CSSValueCircle; | |
case ETextSecurity::kSquare: | |
return CSSValueSquare; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EObjectFit cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueFill: | |
return EObjectFit::kFill; | |
case CSSValueContain: | |
return EObjectFit::kContain; | |
case CSSValueCover: | |
return EObjectFit::kCover; | |
case CSSValueNone: | |
return EObjectFit::kNone; | |
case CSSValueScaleDown: | |
return EObjectFit::kScaleDown; | |
default: | |
NOTREACHED(); | |
return EObjectFit::kFill; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EObjectFit v) { | |
switch (v) { | |
case EObjectFit::kFill: | |
return CSSValueFill; | |
case EObjectFit::kContain: | |
return CSSValueContain; | |
case EObjectFit::kCover: | |
return CSSValueCover; | |
case EObjectFit::kNone: | |
return CSSValueNone; | |
case EObjectFit::kScaleDown: | |
return CSSValueScaleDown; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EClear cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNone: | |
return EClear::kNone; | |
case CSSValueLeft: | |
return EClear::kLeft; | |
case CSSValueRight: | |
return EClear::kRight; | |
case CSSValueBoth: | |
return EClear::kBoth; | |
default: | |
NOTREACHED(); | |
return EClear::kNone; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EClear v) { | |
switch (v) { | |
case EClear::kNone: | |
return CSSValueNone; | |
case EClear::kLeft: | |
return CSSValueLeft; | |
case EClear::kRight: | |
return CSSValueRight; | |
case EClear::kBoth: | |
return CSSValueBoth; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EUserSelect cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueNone: | |
return EUserSelect::kNone; | |
case CSSValueText: | |
return EUserSelect::kText; | |
case CSSValueAll: | |
return EUserSelect::kAll; | |
default: | |
NOTREACHED(); | |
return EUserSelect::kText; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EUserSelect v) { | |
switch (v) { | |
case EUserSelect::kNone: | |
return CSSValueNone; | |
case EUserSelect::kText: | |
return CSSValueText; | |
case EUserSelect::kAll: | |
return CSSValueAll; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline TextJustify cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueAuto: | |
return TextJustify::kAuto; | |
case CSSValueNone: | |
return TextJustify::kNone; | |
case CSSValueInterWord: | |
return TextJustify::kInterWord; | |
case CSSValueDistribute: | |
return TextJustify::kDistribute; | |
default: | |
NOTREACHED(); | |
return TextJustify::kAuto; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(TextJustify v) { | |
switch (v) { | |
case TextJustify::kAuto: | |
return CSSValueAuto; | |
case TextJustify::kNone: | |
return CSSValueNone; | |
case TextJustify::kInterWord: | |
return CSSValueInterWord; | |
case TextJustify::kDistribute: | |
return CSSValueDistribute; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EBorderCollapse cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueSeparate: | |
return EBorderCollapse::kSeparate; | |
case CSSValueCollapse: | |
return EBorderCollapse::kCollapse; | |
default: | |
NOTREACHED(); | |
return EBorderCollapse::kSeparate; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EBorderCollapse v) { | |
switch (v) { | |
case EBorderCollapse::kSeparate: | |
return CSSValueSeparate; | |
case EBorderCollapse::kCollapse: | |
return CSSValueCollapse; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EIsolation cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueAuto: | |
return EIsolation::kAuto; | |
case CSSValueIsolate: | |
return EIsolation::kIsolate; | |
default: | |
NOTREACHED(); | |
return EIsolation::kAuto; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EIsolation v) { | |
switch (v) { | |
case EIsolation::kAuto: | |
return CSSValueAuto; | |
case EIsolation::kIsolate: | |
return CSSValueIsolate; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
template <> | |
inline EListStyleType cssValueIDToPlatformEnumGenerated(CSSValueID v) { | |
switch (v) { | |
case CSSValueDisc: | |
return EListStyleType::kDisc; | |
case CSSValueCircle: | |
return EListStyleType::kCircle; | |
case CSSValueSquare: | |
return EListStyleType::kSquare; | |
case CSSValueDecimal: | |
return EListStyleType::kDecimal; | |
case CSSValueDecimalLeadingZero: | |
return EListStyleType::kDecimalLeadingZero; | |
case CSSValueArabicIndic: | |
return EListStyleType::kArabicIndic; | |
case CSSValueBengali: | |
return EListStyleType::kBengali; | |
case CSSValueCambodian: | |
return EListStyleType::kCambodian; | |
case CSSValueKhmer: | |
return EListStyleType::kKhmer; | |
case CSSValueDevanagari: | |
return EListStyleType::kDevanagari; | |
case CSSValueGujarati: | |
return EListStyleType::kGujarati; | |
case CSSValueGurmukhi: | |
return EListStyleType::kGurmukhi; | |
case CSSValueKannada: | |
return EListStyleType::kKannada; | |
case CSSValueLao: | |
return EListStyleType::kLao; | |
case CSSValueMalayalam: | |
return EListStyleType::kMalayalam; | |
case CSSValueMongolian: | |
return EListStyleType::kMongolian; | |
case CSSValueMyanmar: | |
return EListStyleType::kMyanmar; | |
case CSSValueOriya: | |
return EListStyleType::kOriya; | |
case CSSValuePersian: | |
return EListStyleType::kPersian; | |
case CSSValueUrdu: | |
return EListStyleType::kUrdu; | |
case CSSValueTelugu: | |
return EListStyleType::kTelugu; | |
case CSSValueTibetan: | |
return EListStyleType::kTibetan; | |
case CSSValueThai: | |
return EListStyleType::kThai; | |
case CSSValueLowerRoman: | |
return EListStyleType::kLowerRoman; | |
case CSSValueUpperRoman: | |
return EListStyleType::kUpperRoman; | |
case CSSValueLowerGreek: | |
return EListStyleType::kLowerGreek; | |
case CSSValueLowerAlpha: | |
return EListStyleType::kLowerAlpha; | |
case CSSValueLowerLatin: | |
return EListStyleType::kLowerLatin; | |
case CSSValueUpperAlpha: | |
return EListStyleType::kUpperAlpha; | |
case CSSValueUpperLatin: | |
return EListStyleType::kUpperLatin; | |
case CSSValueCjkEarthlyBranch: | |
return EListStyleType::kCjkEarthlyBranch; | |
case CSSValueCjkHeavenlyStem: | |
return EListStyleType::kCjkHeavenlyStem; | |
case CSSValueEthiopicHalehame: | |
return EListStyleType::kEthiopicHalehame; | |
case CSSValueEthiopicHalehameAm: | |
return EListStyleType::kEthiopicHalehameAm; | |
case CSSValueEthiopicHalehameTiEr: | |
return EListStyleType::kEthiopicHalehameTiEr; | |
case CSSValueEthiopicHalehameTiEt: | |
return EListStyleType::kEthiopicHalehameTiEt; | |
case CSSValueHangul: | |
return EListStyleType::kHangul; | |
case CSSValueHangulConsonant: | |
return EListStyleType::kHangulConsonant; | |
case CSSValueKoreanHangulFormal: | |
return EListStyleType::kKoreanHangulFormal; | |
case CSSValueKoreanHanjaFormal: | |
return EListStyleType::kKoreanHanjaFormal; | |
case CSSValueKoreanHanjaInformal: | |
return EListStyleType::kKoreanHanjaInformal; | |
case CSSValueHebrew: | |
return EListStyleType::kHebrew; | |
case CSSValueArmenian: | |
return EListStyleType::kArmenian; | |
case CSSValueLowerArmenian: | |
return EListStyleType::kLowerArmenian; | |
case CSSValueUpperArmenian: | |
return EListStyleType::kUpperArmenian; | |
case CSSValueGeorgian: | |
return EListStyleType::kGeorgian; | |
case CSSValueCjkIdeographic: | |
return EListStyleType::kCjkIdeographic; | |
case CSSValueSimpChineseFormal: | |
return EListStyleType::kSimpChineseFormal; | |
case CSSValueSimpChineseInformal: | |
return EListStyleType::kSimpChineseInformal; | |
case CSSValueTradChineseFormal: | |
return EListStyleType::kTradChineseFormal; | |
case CSSValueTradChineseInformal: | |
return EListStyleType::kTradChineseInformal; | |
case CSSValueHiragana: | |
return EListStyleType::kHiragana; | |
case CSSValueKatakana: | |
return EListStyleType::kKatakana; | |
case CSSValueHiraganaIroha: | |
return EListStyleType::kHiraganaIroha; | |
case CSSValueKatakanaIroha: | |
return EListStyleType::kKatakanaIroha; | |
case CSSValueNone: | |
return EListStyleType::kNone; | |
default: | |
NOTREACHED(); | |
return EListStyleType::kDisc; | |
} | |
} | |
inline CSSValueID platformEnumToCSSValueIDGenerated(EListStyleType v) { | |
switch (v) { | |
case EListStyleType::kDisc: | |
return CSSValueDisc; | |
case EListStyleType::kCircle: | |
return CSSValueCircle; | |
case EListStyleType::kSquare: | |
return CSSValueSquare; | |
case EListStyleType::kDecimal: | |
return CSSValueDecimal; | |
case EListStyleType::kDecimalLeadingZero: | |
return CSSValueDecimalLeadingZero; | |
case EListStyleType::kArabicIndic: | |
return CSSValueArabicIndic; | |
case EListStyleType::kBengali: | |
return CSSValueBengali; | |
case EListStyleType::kCambodian: | |
return CSSValueCambodian; | |
case EListStyleType::kKhmer: | |
return CSSValueKhmer; | |
case EListStyleType::kDevanagari: | |
return CSSValueDevanagari; | |
case EListStyleType::kGujarati: | |
return CSSValueGujarati; | |
case EListStyleType::kGurmukhi: | |
return CSSValueGurmukhi; | |
case EListStyleType::kKannada: | |
return CSSValueKannada; | |
case EListStyleType::kLao: | |
return CSSValueLao; | |
case EListStyleType::kMalayalam: | |
return CSSValueMalayalam; | |
case EListStyleType::kMongolian: | |
return CSSValueMongolian; | |
case EListStyleType::kMyanmar: | |
return CSSValueMyanmar; | |
case EListStyleType::kOriya: | |
return CSSValueOriya; | |
case EListStyleType::kPersian: | |
return CSSValuePersian; | |
case EListStyleType::kUrdu: | |
return CSSValueUrdu; | |
case EListStyleType::kTelugu: | |
return CSSValueTelugu; | |
case EListStyleType::kTibetan: | |
return CSSValueTibetan; | |
case EListStyleType::kThai: | |
return CSSValueThai; | |
case EListStyleType::kLowerRoman: | |
return CSSValueLowerRoman; | |
case EListStyleType::kUpperRoman: | |
return CSSValueUpperRoman; | |
case EListStyleType::kLowerGreek: | |
return CSSValueLowerGreek; | |
case EListStyleType::kLowerAlpha: | |
return CSSValueLowerAlpha; | |
case EListStyleType::kLowerLatin: | |
return CSSValueLowerLatin; | |
case EListStyleType::kUpperAlpha: | |
return CSSValueUpperAlpha; | |
case EListStyleType::kUpperLatin: | |
return CSSValueUpperLatin; | |
case EListStyleType::kCjkEarthlyBranch: | |
return CSSValueCjkEarthlyBranch; | |
case EListStyleType::kCjkHeavenlyStem: | |
return CSSValueCjkHeavenlyStem; | |
case EListStyleType::kEthiopicHalehame: | |
return CSSValueEthiopicHalehame; | |
case EListStyleType::kEthiopicHalehameAm: | |
return CSSValueEthiopicHalehameAm; | |
case EListStyleType::kEthiopicHalehameTiEr: | |
return CSSValueEthiopicHalehameTiEr; | |
case EListStyleType::kEthiopicHalehameTiEt: | |
return CSSValueEthiopicHalehameTiEt; | |
case EListStyleType::kHangul: | |
return CSSValueHangul; | |
case EListStyleType::kHangulConsonant: | |
return CSSValueHangulConsonant; | |
case EListStyleType::kKoreanHangulFormal: | |
return CSSValueKoreanHangulFormal; | |
case EListStyleType::kKoreanHanjaFormal: | |
return CSSValueKoreanHanjaFormal; | |
case EListStyleType::kKoreanHanjaInformal: | |
return CSSValueKoreanHanjaInformal; | |
case EListStyleType::kHebrew: | |
return CSSValueHebrew; | |
case EListStyleType::kArmenian: | |
return CSSValueArmenian; | |
case EListStyleType::kLowerArmenian: | |
return CSSValueLowerArmenian; | |
case EListStyleType::kUpperArmenian: | |
return CSSValueUpperArmenian; | |
case EListStyleType::kGeorgian: | |
return CSSValueGeorgian; | |
case EListStyleType::kCjkIdeographic: | |
return CSSValueCjkIdeographic; | |
case EListStyleType::kSimpChineseFormal: | |
return CSSValueSimpChineseFormal; | |
case EListStyleType::kSimpChineseInformal: | |
return CSSValueSimpChineseInformal; | |
case EListStyleType::kTradChineseFormal: | |
return CSSValueTradChineseFormal; | |
case EListStyleType::kTradChineseInformal: | |
return CSSValueTradChineseInformal; | |
case EListStyleType::kHiragana: | |
return CSSValueHiragana; | |
case EListStyleType::kKatakana: | |
return CSSValueKatakana; | |
case EListStyleType::kHiraganaIroha: | |
return CSSValueHiraganaIroha; | |
case EListStyleType::kKatakanaIroha: | |
return CSSValueKatakanaIroha; | |
case EListStyleType::kNone: | |
return CSSValueNone; | |
default: | |
NOTREACHED(); | |
return CSSValueNone; | |
} | |
} | |
} // namespace detail | |
} // namespace blink |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment