Commit 22b71109 authored by shend's avatar shend Committed by Commit Bot

Rename StyleRareNonInheritedData members.

This patch renames some StyleRareNonInheritedData members so that they
match the format expected by the generator.

BUG=628043

Review-Url: https://codereview.chromium.org/2911403002
Cr-Commit-Position: refs/heads/master@{#475814}
parent dfeea2c1
......@@ -570,14 +570,14 @@ bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation(
if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) {
if (rare_non_inherited_data_->appearance_ !=
other.rare_non_inherited_data_->appearance_ ||
rare_non_inherited_data_->margin_before_collapse !=
other.rare_non_inherited_data_->margin_before_collapse ||
rare_non_inherited_data_->margin_after_collapse !=
other.rare_non_inherited_data_->margin_after_collapse ||
rare_non_inherited_data_->line_clamp !=
other.rare_non_inherited_data_->line_clamp ||
rare_non_inherited_data_->text_overflow !=
other.rare_non_inherited_data_->text_overflow ||
rare_non_inherited_data_->margin_before_collapse_ !=
other.rare_non_inherited_data_->margin_before_collapse_ ||
rare_non_inherited_data_->margin_after_collapse_ !=
other.rare_non_inherited_data_->margin_after_collapse_ ||
rare_non_inherited_data_->line_clamp_ !=
other.rare_non_inherited_data_->line_clamp_ ||
rare_non_inherited_data_->text_overflow_ !=
other.rare_non_inherited_data_->text_overflow_ ||
rare_non_inherited_data_->shape_margin_ !=
other.rare_non_inherited_data_->shape_margin_ ||
rare_non_inherited_data_->order_ !=
......@@ -745,8 +745,8 @@ bool ComputedStyle::DiffNeedsPaintInvalidationObject(
return true;
if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) {
if (rare_non_inherited_data_->user_drag !=
other.rare_non_inherited_data_->user_drag ||
if (rare_non_inherited_data_->user_drag_ !=
other.rare_non_inherited_data_->user_drag_ ||
rare_non_inherited_data_->object_fit_ !=
other.rare_non_inherited_data_->object_fit_ ||
rare_non_inherited_data_->object_position_ !=
......@@ -852,8 +852,8 @@ void ComputedStyle::UpdatePropertySpecificDifferences(
}
if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) {
if (rare_non_inherited_data_->opacity !=
other.rare_non_inherited_data_->opacity)
if (rare_non_inherited_data_->opacity_ !=
other.rare_non_inherited_data_->opacity_)
diff.SetOpacityChanged();
}
......
......@@ -1034,10 +1034,10 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
}
EMarginCollapse MarginAfterCollapse() const {
return static_cast<EMarginCollapse>(
rare_non_inherited_data_->margin_after_collapse);
rare_non_inherited_data_->margin_after_collapse_);
}
void SetMarginBeforeCollapse(EMarginCollapse c) {
SET_VAR(rare_non_inherited_data_, margin_before_collapse, c);
SET_VAR(rare_non_inherited_data_, margin_before_collapse_, c);
}
// -webkit-margin-after-collapse (aka -webkit-margin-bottom-collapse)
......@@ -1046,10 +1046,10 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
}
EMarginCollapse MarginBeforeCollapse() const {
return static_cast<EMarginCollapse>(
rare_non_inherited_data_->margin_before_collapse);
rare_non_inherited_data_->margin_before_collapse_);
}
void SetMarginAfterCollapse(EMarginCollapse c) {
SET_VAR(rare_non_inherited_data_, margin_after_collapse, c);
SET_VAR(rare_non_inherited_data_, margin_after_collapse_, c);
}
// mix-blend-mode
......@@ -1137,10 +1137,10 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
// opacity (aka -webkit-opacity)
static float InitialOpacity() { return 1.0f; }
float Opacity() const { return rare_non_inherited_data_->opacity; }
float Opacity() const { return rare_non_inherited_data_->opacity_; }
void SetOpacity(float f) {
float v = clampTo<float>(f, 0, 1);
SET_VAR(rare_non_inherited_data_, opacity, v);
SET_VAR(rare_non_inherited_data_, opacity_, v);
}
// order (aka -webkit-order)
......@@ -1266,10 +1266,10 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
}
ETransformStyle3D TransformStyle3D() const {
return static_cast<ETransformStyle3D>(
rare_non_inherited_data_->transform_style3d_);
rare_non_inherited_data_->transform_style_3d_);
}
void SetTransformStyle3D(ETransformStyle3D b) {
SET_VAR(rare_non_inherited_data_, transform_style3d_, b);
SET_VAR(rare_non_inherited_data_, transform_style_3d_, b);
}
// -webkit-transform-origin-x
......@@ -1501,10 +1501,10 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
// text-overflow
static TextOverflow InitialTextOverflow() { return kTextOverflowClip; }
TextOverflow GetTextOverflow() const {
return static_cast<TextOverflow>(rare_non_inherited_data_->text_overflow);
return static_cast<TextOverflow>(rare_non_inherited_data_->text_overflow_);
}
void SetTextOverflow(TextOverflow overflow) {
SET_VAR(rare_non_inherited_data_, text_overflow, overflow);
SET_VAR(rare_non_inherited_data_, text_overflow_, overflow);
}
// touch-action
......@@ -1735,10 +1735,10 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
// -webkit-line-clamp
static LineClampValue InitialLineClamp() { return LineClampValue(); }
const LineClampValue& LineClamp() const {
return rare_non_inherited_data_->line_clamp;
return rare_non_inherited_data_->line_clamp_;
}
void SetLineClamp(LineClampValue c) {
SET_VAR(rare_non_inherited_data_, line_clamp, c);
SET_VAR(rare_non_inherited_data_, line_clamp_, c);
}
// -webkit-ruby-position
......@@ -1768,10 +1768,10 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
// -webkit-user-drag
static EUserDrag InitialUserDrag() { return DRAG_AUTO; }
EUserDrag UserDrag() const {
return static_cast<EUserDrag>(rare_non_inherited_data_->user_drag);
return static_cast<EUserDrag>(rare_non_inherited_data_->user_drag_);
}
void SetUserDrag(EUserDrag d) {
SET_VAR(rare_non_inherited_data_, user_drag, d);
SET_VAR(rare_non_inherited_data_, user_drag_, d);
}
// -webkit-user-modify
......
......@@ -71,13 +71,13 @@ static_assert(sizeof(StyleRareNonInheritedData) ==
"StyleRareNonInheritedData_should_stay_small");
StyleRareNonInheritedData::StyleRareNonInheritedData()
: opacity(ComputedStyle::InitialOpacity()),
: opacity_(ComputedStyle::InitialOpacity()),
perspective_(ComputedStyle::InitialPerspective()),
shape_image_threshold_(ComputedStyle::InitialShapeImageThreshold()),
order_(ComputedStyle::InitialOrder()),
perspective_origin_(ComputedStyle::InitialPerspectiveOrigin()),
object_position_(ComputedStyle::InitialObjectPosition()),
line_clamp(ComputedStyle::InitialLineClamp()),
line_clamp_(ComputedStyle::InitialLineClamp()),
draggable_region_mode_(static_cast<unsigned>(kDraggableRegionNone)),
shape_outside_(ComputedStyle::InitialShapeOutside()),
clip_path_(ComputedStyle::InitialClipPath()),
......@@ -101,12 +101,12 @@ StyleRareNonInheritedData::StyleRareNonInheritedData()
justify_items_(ComputedStyle::InitialSelfAlignment()),
justify_self_(ComputedStyle::InitialSelfAlignment()),
page_size_type_(static_cast<unsigned>(PageSizeType::kAuto)),
transform_style3d_(ComputedStyle::InitialTransformStyle3D()),
transform_style_3d_(ComputedStyle::InitialTransformStyle3D()),
backface_visibility_(ComputedStyle::InitialBackfaceVisibility()),
user_drag(ComputedStyle::InitialUserDrag()),
text_overflow(ComputedStyle::InitialTextOverflow()),
margin_before_collapse(kMarginCollapseCollapse),
margin_after_collapse(kMarginCollapseCollapse),
user_drag_(ComputedStyle::InitialUserDrag()),
text_overflow_(ComputedStyle::InitialTextOverflow()),
margin_before_collapse_(kMarginCollapseCollapse),
margin_after_collapse_(kMarginCollapseCollapse),
appearance_(ComputedStyle::InitialAppearance()),
text_decoration_style_(ComputedStyle::InitialTextDecorationStyle()),
has_current_opacity_animation_(false),
......@@ -135,13 +135,13 @@ StyleRareNonInheritedData::StyleRareNonInheritedData()
StyleRareNonInheritedData::StyleRareNonInheritedData(
const StyleRareNonInheritedData& o)
: RefCounted<StyleRareNonInheritedData>(),
opacity(o.opacity),
opacity_(o.opacity_),
perspective_(o.perspective_),
shape_image_threshold_(o.shape_image_threshold_),
order_(o.order_),
perspective_origin_(o.perspective_origin_),
object_position_(o.object_position_),
line_clamp(o.line_clamp),
line_clamp_(o.line_clamp_),
draggable_region_mode_(o.draggable_region_mode_),
deprecated_flexible_box_(o.deprecated_flexible_box_),
flexible_box_(o.flexible_box_),
......@@ -184,12 +184,12 @@ StyleRareNonInheritedData::StyleRareNonInheritedData(
justify_items_(o.justify_items_),
justify_self_(o.justify_self_),
page_size_type_(o.page_size_type_),
transform_style3d_(o.transform_style3d_),
transform_style_3d_(o.transform_style_3d_),
backface_visibility_(o.backface_visibility_),
user_drag(o.user_drag),
text_overflow(o.text_overflow),
margin_before_collapse(o.margin_before_collapse),
margin_after_collapse(o.margin_after_collapse),
user_drag_(o.user_drag_),
text_overflow_(o.text_overflow_),
margin_before_collapse_(o.margin_before_collapse_),
margin_after_collapse_(o.margin_after_collapse_),
appearance_(o.appearance_),
text_decoration_style_(o.text_decoration_style_),
has_current_opacity_animation_(o.has_current_opacity_animation_),
......@@ -225,10 +225,11 @@ StyleRareNonInheritedData::~StyleRareNonInheritedData() {}
bool StyleRareNonInheritedData::operator==(
const StyleRareNonInheritedData& o) const {
return opacity == o.opacity && perspective_ == o.perspective_ &&
return opacity_ == o.opacity_ && perspective_ == o.perspective_ &&
shape_image_threshold_ == o.shape_image_threshold_ &&
order_ == o.order_ && perspective_origin_ == o.perspective_origin_ &&
object_position_ == o.object_position_ && line_clamp == o.line_clamp &&
object_position_ == o.object_position_ &&
line_clamp_ == o.line_clamp_ &&
draggable_region_mode_ == o.draggable_region_mode_ &&
deprecated_flexible_box_ == o.deprecated_flexible_box_ &&
flexible_box_ == o.flexible_box_ && multi_col_ == o.multi_col_ &&
......@@ -265,11 +266,11 @@ bool StyleRareNonInheritedData::operator==(
justify_items_ == o.justify_items_ &&
justify_self_ == o.justify_self_ &&
page_size_type_ == o.page_size_type_ &&
transform_style3d_ == o.transform_style3d_ &&
transform_style_3d_ == o.transform_style_3d_ &&
backface_visibility_ == o.backface_visibility_ &&
user_drag == o.user_drag && text_overflow == o.text_overflow &&
margin_before_collapse == o.margin_before_collapse &&
margin_after_collapse == o.margin_after_collapse &&
user_drag_ == o.user_drag_ && text_overflow_ == o.text_overflow_ &&
margin_before_collapse_ == o.margin_before_collapse_ &&
margin_after_collapse_ == o.margin_after_collapse_ &&
appearance_ == o.appearance_ &&
text_decoration_style_ == o.text_decoration_style_ &&
has_current_opacity_animation_ == o.has_current_opacity_animation_ &&
......
......@@ -86,7 +86,7 @@ class CORE_EXPORT StyleRareNonInheritedData
return !(*this == o);
}
float opacity; // Whether or not we're transparent.
float opacity_; // Whether or not we're transparent.
float perspective_;
float shape_image_threshold_;
......@@ -96,7 +96,7 @@ class CORE_EXPORT StyleRareNonInheritedData
LengthPoint perspective_origin_;
LengthPoint object_position_;
LineClampValue line_clamp; // An Apple extension.
LineClampValue line_clamp_; // An Apple extension.
unsigned draggable_region_mode_ : 2; // DraggableRegionMode
DataRef<StyleDeprecatedFlexibleBoxData>
......@@ -159,14 +159,14 @@ class CORE_EXPORT StyleRareNonInheritedData
StyleSelfAlignmentData justify_self_;
unsigned page_size_type_ : 2; // PageSizeType
unsigned transform_style3d_ : 1; // ETransformStyle3D
unsigned transform_style_3d_ : 1; // ETransformStyle3D
unsigned backface_visibility_ : 1; // EBackfaceVisibility
unsigned user_drag : 2; // EUserDrag
unsigned text_overflow : 1; // Whether or not lines that spill out should be
// truncated with "..."
unsigned margin_before_collapse : 2; // EMarginCollapse
unsigned margin_after_collapse : 2; // EMarginCollapse
unsigned user_drag_ : 2; // EUserDrag
unsigned text_overflow_ : 1; // Whether or not lines that spill out should be
// truncated with "..."
unsigned margin_before_collapse_ : 2; // EMarginCollapse
unsigned margin_after_collapse_ : 2; // EMarginCollapse
unsigned appearance_ : 6; // EAppearance
unsigned text_decoration_style_ : 3; // TextDecorationStyle
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment