| Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| index 109f612f5bc12845416066515750cfcf795dd3bd..6864f7d5337cd7d43f4b1c7923ccb44aec98803c 100644
|
| --- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| +++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| @@ -114,10 +114,10 @@ PassRefPtr<ComputedStyle> ComputedStyle::Clone(const ComputedStyle& other) {
|
|
|
| ALWAYS_INLINE ComputedStyle::ComputedStyle()
|
| : ComputedStyleBase(), RefCounted<ComputedStyle>() {
|
| - box_.Init();
|
| - visual_.Init();
|
| - background_.Init();
|
| - surround_.Init();
|
| + box_data_.Init();
|
| + visual_data_.Init();
|
| + background_data_.Init();
|
| + surround_data_.Init();
|
| rare_non_inherited_data_.Init();
|
| rare_non_inherited_data_.Access()->deprecated_flexible_box_.Init();
|
| rare_non_inherited_data_.Access()->flexible_box_.Init();
|
| @@ -137,10 +137,10 @@ ALWAYS_INLINE ComputedStyle::ComputedStyle()
|
| ALWAYS_INLINE ComputedStyle::ComputedStyle(const ComputedStyle& o)
|
| : ComputedStyleBase(o),
|
| RefCounted<ComputedStyle>(),
|
| - box_(o.box_),
|
| - visual_(o.visual_),
|
| - background_(o.background_),
|
| - surround_(o.surround_),
|
| + box_data_(o.box_data_),
|
| + visual_data_(o.visual_data_),
|
| + background_data_(o.background_data_),
|
| + surround_data_(o.surround_data_),
|
| rare_non_inherited_data_(o.rare_non_inherited_data_),
|
| rare_inherited_data_(o.rare_inherited_data_),
|
| style_inherited_data_(o.style_inherited_data_),
|
| @@ -333,10 +333,10 @@ void ComputedStyle::InheritFrom(const ComputedStyle& inherit_parent,
|
|
|
| void ComputedStyle::CopyNonInheritedFromCached(const ComputedStyle& other) {
|
| ComputedStyleBase::CopyNonInheritedFromCached(other);
|
| - box_ = other.box_;
|
| - visual_ = other.visual_;
|
| - background_ = other.background_;
|
| - surround_ = other.surround_;
|
| + box_data_ = other.box_data_;
|
| + visual_data_ = other.visual_data_;
|
| + background_data_ = other.background_data_;
|
| + surround_data_ = other.surround_data_;
|
| rare_non_inherited_data_ = other.rare_non_inherited_data_;
|
|
|
| // The flags are copied one-by-one because they contain
|
| @@ -482,9 +482,10 @@ bool ComputedStyle::NonInheritedEqual(const ComputedStyle& other) const {
|
| other.OriginalDisplay() && // Not generated in ComputedStyleBase
|
| VerticalAlign() == other.VerticalAlign() && // Not generated in
|
| // ComputedStyleBase
|
| - box_ == other.box_ &&
|
| - visual_ == other.visual_ && background_ == other.background_ &&
|
| - surround_ == other.surround_ &&
|
| + box_data_ == other.box_data_ &&
|
| + visual_data_ == other.visual_data_ &&
|
| + background_data_ == other.background_data_ &&
|
| + surround_data_ == other.surround_data_ &&
|
| rare_non_inherited_data_ == other.rare_non_inherited_data_ &&
|
| svg_style_->NonInheritedEqual(*other.svg_style_);
|
| }
|
| @@ -578,17 +579,17 @@ bool ComputedStyle::ScrollAnchorDisablingPropertyChanged(
|
| if (GetPosition() != other.GetPosition())
|
| return true;
|
|
|
| - if (box_.Get() != other.box_.Get()) {
|
| - if (box_->Width() != other.box_->Width() ||
|
| - box_->MinWidth() != other.box_->MinWidth() ||
|
| - box_->MaxWidth() != other.box_->MaxWidth() ||
|
| - box_->Height() != other.box_->Height() ||
|
| - box_->MinHeight() != other.box_->MinHeight() ||
|
| - box_->MaxHeight() != other.box_->MaxHeight())
|
| + if (box_data_.Get() != other.box_data_.Get()) {
|
| + if (box_data_->Width() != other.box_data_->Width() ||
|
| + box_data_->MinWidth() != other.box_data_->MinWidth() ||
|
| + box_data_->MaxWidth() != other.box_data_->MaxWidth() ||
|
| + box_data_->Height() != other.box_data_->Height() ||
|
| + box_data_->MinHeight() != other.box_data_->MinHeight() ||
|
| + box_data_->MaxHeight() != other.box_data_->MaxHeight())
|
| return true;
|
| }
|
|
|
| - if (surround_.Get() != other.surround_.Get()) {
|
| + if (surround_data_.Get() != other.surround_data_.Get()) {
|
| if (!MarginEqual(other) || !OffsetEqual(other) || !PaddingEqual(other))
|
| return true;
|
| }
|
| @@ -608,7 +609,7 @@ bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation(
|
| // - or the layoutObject knows how to exactly invalidate paints caused by the
|
| // layout change instead of forced full paint invalidation.
|
|
|
| - if (surround_.Get() != other.surround_.Get()) {
|
| + if (surround_data_.Get() != other.surround_data_.Get()) {
|
| // If our border widths change, then we need to layout. Other changes to
|
| // borders only necessitate a paint invalidation.
|
| if (BorderLeftWidth() != other.BorderLeftWidth() ||
|
| @@ -839,19 +840,19 @@ bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation(
|
| }
|
|
|
| bool ComputedStyle::DiffNeedsFullLayout(const ComputedStyle& other) const {
|
| - if (box_.Get() != other.box_.Get()) {
|
| - if (box_->Width() != other.box_->Width() ||
|
| - box_->MinWidth() != other.box_->MinWidth() ||
|
| - box_->MaxWidth() != other.box_->MaxWidth() ||
|
| - box_->Height() != other.box_->Height() ||
|
| - box_->MinHeight() != other.box_->MinHeight() ||
|
| - box_->MaxHeight() != other.box_->MaxHeight())
|
| + if (box_data_.Get() != other.box_data_.Get()) {
|
| + if (box_data_->Width() != other.box_data_->Width() ||
|
| + box_data_->MinWidth() != other.box_data_->MinWidth() ||
|
| + box_data_->MaxWidth() != other.box_data_->MaxWidth() ||
|
| + box_data_->Height() != other.box_data_->Height() ||
|
| + box_data_->MinHeight() != other.box_data_->MinHeight() ||
|
| + box_data_->MaxHeight() != other.box_data_->MaxHeight())
|
| return true;
|
|
|
| - if (box_->VerticalAlign() != other.box_->VerticalAlign())
|
| + if (box_data_->VerticalAlign() != other.box_data_->VerticalAlign())
|
| return true;
|
|
|
| - if (box_->BoxSizing() != other.box_->BoxSizing())
|
| + if (box_data_->BoxSizing() != other.box_data_->BoxSizing())
|
| return true;
|
| }
|
|
|
| @@ -905,7 +906,7 @@ bool ComputedStyle::DiffNeedsPaintInvalidationObject(
|
| PrintColorAdjust() != other.PrintColorAdjust() ||
|
| InsideLink() != other.InsideLink() ||
|
| !Border().VisuallyEqual(other.Border()) ||
|
| - *background_ != *other.background_)
|
| + *background_data_ != *other.background_data_)
|
| return true;
|
|
|
| if (rare_inherited_data_.Get() != other.rare_inherited_data_.Get()) {
|
| @@ -1011,7 +1012,7 @@ bool ComputedStyle::DiffNeedsVisualRectUpdate(
|
| void ComputedStyle::UpdatePropertySpecificDifferences(
|
| const ComputedStyle& other,
|
| StyleDifference& diff) const {
|
| - if (box_->ZIndex() != other.box_->ZIndex() ||
|
| + if (box_data_->ZIndex() != other.box_data_->ZIndex() ||
|
| IsStackingContext() != other.IsStackingContext())
|
| diff.SetZIndexChanged();
|
|
|
| @@ -1060,7 +1061,7 @@ void ComputedStyle::UpdatePropertySpecificDifferences(
|
| style_inherited_data_->visited_link_color !=
|
| other.style_inherited_data_->visited_link_color ||
|
| HasSimpleUnderlineInternal() != other.HasSimpleUnderlineInternal() ||
|
| - visual_->text_decoration != other.visual_->text_decoration) {
|
| + visual_data_->text_decoration != other.visual_data_->text_decoration) {
|
| diff.SetTextDecorationOrColorChanged();
|
| } else if (rare_non_inherited_data_.Get() !=
|
| other.rare_non_inherited_data_.Get() &&
|
| @@ -1102,11 +1103,11 @@ void ComputedStyle::UpdatePropertySpecificDifferences(
|
| }
|
| }
|
|
|
| - bool has_clip = HasOutOfFlowPosition() && !visual_->has_auto_clip;
|
| + bool has_clip = HasOutOfFlowPosition() && !visual_data_->has_auto_clip;
|
| bool other_has_clip =
|
| - other.HasOutOfFlowPosition() && !other.visual_->has_auto_clip;
|
| + other.HasOutOfFlowPosition() && !other.visual_data_->has_auto_clip;
|
| if (has_clip != other_has_clip ||
|
| - (has_clip && visual_->clip != other.visual_->clip))
|
| + (has_clip && visual_data_->clip != other.visual_data_->clip))
|
| diff.SetCSSClipChanged();
|
| }
|
|
|
| @@ -2392,31 +2393,31 @@ LayoutRectOutsets ComputedStyle::ImageOutsets(
|
| void ComputedStyle::SetBorderImageSource(StyleImage* image) {
|
| if (Border().image_.GetImage() == image)
|
| return;
|
| - surround_.Access()->border_.image_.SetImage(image);
|
| + surround_data_.Access()->border_.image_.SetImage(image);
|
| }
|
|
|
| void ComputedStyle::SetBorderImageSlices(const LengthBox& slices) {
|
| if (Border().image_.ImageSlices() == slices)
|
| return;
|
| - surround_.Access()->border_.image_.SetImageSlices(slices);
|
| + surround_data_.Access()->border_.image_.SetImageSlices(slices);
|
| }
|
|
|
| void ComputedStyle::SetBorderImageSlicesFill(bool fill) {
|
| if (Border().image_.Fill() == fill)
|
| return;
|
| - surround_.Access()->border_.image_.SetFill(fill);
|
| + surround_data_.Access()->border_.image_.SetFill(fill);
|
| }
|
|
|
| void ComputedStyle::SetBorderImageWidth(const BorderImageLengthBox& slices) {
|
| if (Border().image_.BorderSlices() == slices)
|
| return;
|
| - surround_.Access()->border_.image_.SetBorderSlices(slices);
|
| + surround_data_.Access()->border_.image_.SetBorderSlices(slices);
|
| }
|
|
|
| void ComputedStyle::SetBorderImageOutset(const BorderImageLengthBox& outset) {
|
| if (Border().image_.Outset() == outset)
|
| return;
|
| - surround_.Access()->border_.image_.SetOutset(outset);
|
| + surround_data_.Access()->border_.image_.SetOutset(outset);
|
| }
|
|
|
| bool ComputedStyle::BorderObscuresBackground() const {
|
|
|