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 7d09b8e9c22cf708242edb9795192f6fa288ab10..070e0f622486ea438b8b8fbf22768aaf82dfc4b4 100644 |
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
@@ -489,6 +489,7 @@ bool ComputedStyle::NonInheritedEqual(const ComputedStyle& other) const { |
svg_style_->NonInheritedEqual(*other.svg_style_); |
} |
+// TODO(nainar): This fast path still remains. |
bool ComputedStyle::InheritedDataShared(const ComputedStyle& other) const { |
// This is a fast check that only looks if the data structures are shared. |
// TODO(sashab): Should ComputedStyleBase have an inheritedDataShared method? |
@@ -579,21 +580,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()) |
- return true; |
- } |
+ 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()) |
+ return true; |
- if (surround_.Get() != other.surround_.Get()) { |
- if (surround_->margin_ != other.surround_->margin_ || !OffsetEqual(other) || |
- surround_->padding_ != other.surround_->padding_) |
- return true; |
- } |
+ if (surround_->margin_ != other.surround_->margin_ || !OffsetEqual(other) || |
+ surround_->padding_ != other.surround_->padding_) |
+ return true; |
if (diff.TransformChanged()) |
return true; |
@@ -610,155 +607,149 @@ 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 our border widths change, then we need to layout. Other changes to |
- // borders only necessitate a paint invalidation. |
- if (BorderLeftWidth() != other.BorderLeftWidth() || |
- BorderTopWidth() != other.BorderTopWidth() || |
- BorderBottomWidth() != other.BorderBottomWidth() || |
- BorderRightWidth() != other.BorderRightWidth()) |
- return true; |
+ // If our border widths change, then we need to layout. Other changes to |
+ // borders only necessitate a paint invalidation. |
+ if (BorderLeftWidth() != other.BorderLeftWidth() || |
+ BorderTopWidth() != other.BorderTopWidth() || |
+ BorderBottomWidth() != other.BorderBottomWidth() || |
+ BorderRightWidth() != other.BorderRightWidth()) |
+ return true; |
- if (surround_->padding_ != other.surround_->padding_) |
- return true; |
- } |
+ if (surround_->padding_ != other.surround_->padding_) |
+ return true; |
- 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_->shape_margin_ != |
- other.rare_non_inherited_data_->shape_margin_ || |
- rare_non_inherited_data_->order_ != |
- other.rare_non_inherited_data_->order_ || |
- rare_non_inherited_data_->HasFilters() != |
- other.rare_non_inherited_data_->HasFilters()) |
- return true; |
+ 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_->shape_margin_ != |
+ other.rare_non_inherited_data_->shape_margin_ || |
+ rare_non_inherited_data_->order_ != |
+ other.rare_non_inherited_data_->order_ || |
+ rare_non_inherited_data_->HasFilters() != |
+ other.rare_non_inherited_data_->HasFilters()) |
+ return true; |
- if (rare_non_inherited_data_->grid_.Get() != |
- other.rare_non_inherited_data_->grid_.Get() && |
- *rare_non_inherited_data_->grid_.Get() != |
- *other.rare_non_inherited_data_->grid_.Get()) |
- return true; |
+ if (rare_non_inherited_data_->grid_.Get() != |
+ other.rare_non_inherited_data_->grid_.Get() && |
+ *rare_non_inherited_data_->grid_.Get() != |
+ *other.rare_non_inherited_data_->grid_.Get()) |
+ return true; |
- if (rare_non_inherited_data_->grid_item_.Get() != |
- other.rare_non_inherited_data_->grid_item_.Get() && |
- *rare_non_inherited_data_->grid_item_.Get() != |
- *other.rare_non_inherited_data_->grid_item_.Get()) |
- return true; |
+ if (rare_non_inherited_data_->grid_item_.Get() != |
+ other.rare_non_inherited_data_->grid_item_.Get() && |
+ *rare_non_inherited_data_->grid_item_.Get() != |
+ *other.rare_non_inherited_data_->grid_item_.Get()) |
+ return true; |
- if (rare_non_inherited_data_->deprecated_flexible_box_.Get() != |
- other.rare_non_inherited_data_->deprecated_flexible_box_.Get() && |
- *rare_non_inherited_data_->deprecated_flexible_box_.Get() != |
- *other.rare_non_inherited_data_->deprecated_flexible_box_.Get()) |
- return true; |
+ if (rare_non_inherited_data_->deprecated_flexible_box_.Get() != |
+ other.rare_non_inherited_data_->deprecated_flexible_box_.Get() && |
+ *rare_non_inherited_data_->deprecated_flexible_box_.Get() != |
+ *other.rare_non_inherited_data_->deprecated_flexible_box_.Get()) |
+ return true; |
- if (rare_non_inherited_data_->flexible_box_.Get() != |
- other.rare_non_inherited_data_->flexible_box_.Get() && |
- *rare_non_inherited_data_->flexible_box_.Get() != |
- *other.rare_non_inherited_data_->flexible_box_.Get()) |
- return true; |
+ if (rare_non_inherited_data_->flexible_box_.Get() != |
+ other.rare_non_inherited_data_->flexible_box_.Get() && |
+ *rare_non_inherited_data_->flexible_box_.Get() != |
+ *other.rare_non_inherited_data_->flexible_box_.Get()) |
+ return true; |
- if (rare_non_inherited_data_->multi_col_.Get() != |
- other.rare_non_inherited_data_->multi_col_.Get() && |
- *rare_non_inherited_data_->multi_col_.Get() != |
- *other.rare_non_inherited_data_->multi_col_.Get()) |
- return true; |
+ if (rare_non_inherited_data_->multi_col_.Get() != |
+ other.rare_non_inherited_data_->multi_col_.Get() && |
+ *rare_non_inherited_data_->multi_col_.Get() != |
+ *other.rare_non_inherited_data_->multi_col_.Get()) |
+ return true; |
- // If the counter directives change, trigger a relayout to re-calculate |
- // counter values and rebuild the counter node tree. |
- const CounterDirectiveMap* map_a = |
- rare_non_inherited_data_->counter_directives_.get(); |
- const CounterDirectiveMap* map_b = |
- other.rare_non_inherited_data_->counter_directives_.get(); |
- if (!(map_a == map_b || (map_a && map_b && *map_a == *map_b))) |
- return true; |
+ // If the counter directives change, trigger a relayout to re-calculate |
+ // counter values and rebuild the counter node tree. |
+ const CounterDirectiveMap* map_a = |
+ rare_non_inherited_data_->counter_directives_.get(); |
+ const CounterDirectiveMap* map_b = |
+ other.rare_non_inherited_data_->counter_directives_.get(); |
+ if (!(map_a == map_b || (map_a && map_b && *map_a == *map_b))) |
+ return true; |
- // We only need do layout for opacity changes if adding or losing opacity |
- // could trigger a change |
- // in us being a stacking context. |
- if (IsStackingContext() != other.IsStackingContext() && |
- rare_non_inherited_data_->HasOpacity() != |
- other.rare_non_inherited_data_->HasOpacity()) { |
- // FIXME: We would like to use SimplifiedLayout here, but we can't quite |
- // do that yet. We need to make sure SimplifiedLayout can operate |
- // correctly on LayoutInlines (we will need to add a |
- // selfNeedsSimplifiedLayout bit in order to not get confused and taint |
- // every line). In addition we need to solve the floating object issue |
- // when layers come and go. Right now a full layout is necessary to keep |
- // floating object lists sane. |
- return true; |
- } |
+ // We only need do layout for opacity changes if adding or losing opacity |
+ // could trigger a change |
+ // in us being a stacking context. |
+ if (IsStackingContext() != other.IsStackingContext() && |
+ rare_non_inherited_data_->HasOpacity() != |
+ other.rare_non_inherited_data_->HasOpacity()) { |
+ // FIXME: We would like to use SimplifiedLayout here, but we can't quite |
+ // do that yet. We need to make sure SimplifiedLayout can operate |
+ // correctly on LayoutInlines (we will need to add a |
+ // selfNeedsSimplifiedLayout bit in order to not get confused and taint |
+ // every line). In addition we need to solve the floating object issue |
+ // when layers come and go. Right now a full layout is necessary to keep |
+ // floating object lists sane. |
+ return true; |
} |
- if (rare_inherited_data_.Get() != other.rare_inherited_data_.Get()) { |
- if (rare_inherited_data_->highlight != |
- other.rare_inherited_data_->highlight || |
- rare_inherited_data_->indent != other.rare_inherited_data_->indent || |
- rare_inherited_data_->text_align_last_ != |
- other.rare_inherited_data_->text_align_last_ || |
- rare_inherited_data_->text_indent_line_ != |
- other.rare_inherited_data_->text_indent_line_ || |
- rare_inherited_data_->effective_zoom_ != |
- other.rare_inherited_data_->effective_zoom_ || |
- rare_inherited_data_->word_break != |
- other.rare_inherited_data_->word_break || |
- rare_inherited_data_->overflow_wrap != |
- other.rare_inherited_data_->overflow_wrap || |
- rare_inherited_data_->line_break != |
- other.rare_inherited_data_->line_break || |
- rare_inherited_data_->text_security != |
- other.rare_inherited_data_->text_security || |
- rare_inherited_data_->hyphens != other.rare_inherited_data_->hyphens || |
- rare_inherited_data_->hyphenation_limit_before != |
- other.rare_inherited_data_->hyphenation_limit_before || |
- rare_inherited_data_->hyphenation_limit_after != |
- other.rare_inherited_data_->hyphenation_limit_after || |
- rare_inherited_data_->hyphenation_string != |
- other.rare_inherited_data_->hyphenation_string || |
- rare_inherited_data_->respect_image_orientation_ != |
- other.rare_inherited_data_->respect_image_orientation_ || |
- rare_inherited_data_->ruby_position_ != |
- other.rare_inherited_data_->ruby_position_ || |
- rare_inherited_data_->text_emphasis_mark != |
- other.rare_inherited_data_->text_emphasis_mark || |
- rare_inherited_data_->text_emphasis_position != |
- other.rare_inherited_data_->text_emphasis_position || |
- rare_inherited_data_->text_emphasis_custom_mark != |
- other.rare_inherited_data_->text_emphasis_custom_mark || |
- rare_inherited_data_->text_justify_ != |
- other.rare_inherited_data_->text_justify_ || |
- rare_inherited_data_->text_orientation_ != |
- other.rare_inherited_data_->text_orientation_ || |
- rare_inherited_data_->text_combine_ != |
- other.rare_inherited_data_->text_combine_ || |
- rare_inherited_data_->tab_size_ != |
- other.rare_inherited_data_->tab_size_ || |
- rare_inherited_data_->text_size_adjust_ != |
- other.rare_inherited_data_->text_size_adjust_ || |
- rare_inherited_data_->list_style_image != |
- other.rare_inherited_data_->list_style_image || |
- rare_inherited_data_->line_height_step_ != |
- other.rare_inherited_data_->line_height_step_ || |
- rare_inherited_data_->text_stroke_width != |
- other.rare_inherited_data_->text_stroke_width) |
- return true; |
+ if (rare_inherited_data_->highlight != |
+ other.rare_inherited_data_->highlight || |
+ rare_inherited_data_->indent != other.rare_inherited_data_->indent || |
+ rare_inherited_data_->text_align_last_ != |
+ other.rare_inherited_data_->text_align_last_ || |
+ rare_inherited_data_->text_indent_line_ != |
+ other.rare_inherited_data_->text_indent_line_ || |
+ rare_inherited_data_->effective_zoom_ != |
+ other.rare_inherited_data_->effective_zoom_ || |
+ rare_inherited_data_->word_break != |
+ other.rare_inherited_data_->word_break || |
+ rare_inherited_data_->overflow_wrap != |
+ other.rare_inherited_data_->overflow_wrap || |
+ rare_inherited_data_->line_break != |
+ other.rare_inherited_data_->line_break || |
+ rare_inherited_data_->text_security != |
+ other.rare_inherited_data_->text_security || |
+ rare_inherited_data_->hyphens != other.rare_inherited_data_->hyphens || |
+ rare_inherited_data_->hyphenation_limit_before != |
+ other.rare_inherited_data_->hyphenation_limit_before || |
+ rare_inherited_data_->hyphenation_limit_after != |
+ other.rare_inherited_data_->hyphenation_limit_after || |
+ rare_inherited_data_->hyphenation_string != |
+ other.rare_inherited_data_->hyphenation_string || |
+ rare_inherited_data_->respect_image_orientation_ != |
+ other.rare_inherited_data_->respect_image_orientation_ || |
+ rare_inherited_data_->ruby_position_ != |
+ other.rare_inherited_data_->ruby_position_ || |
+ rare_inherited_data_->text_emphasis_mark != |
+ other.rare_inherited_data_->text_emphasis_mark || |
+ rare_inherited_data_->text_emphasis_position != |
+ other.rare_inherited_data_->text_emphasis_position || |
+ rare_inherited_data_->text_emphasis_custom_mark != |
+ other.rare_inherited_data_->text_emphasis_custom_mark || |
+ rare_inherited_data_->text_justify_ != |
+ other.rare_inherited_data_->text_justify_ || |
+ rare_inherited_data_->text_orientation_ != |
+ other.rare_inherited_data_->text_orientation_ || |
+ rare_inherited_data_->text_combine_ != |
+ other.rare_inherited_data_->text_combine_ || |
+ rare_inherited_data_->tab_size_ != |
+ other.rare_inherited_data_->tab_size_ || |
+ rare_inherited_data_->text_size_adjust_ != |
+ other.rare_inherited_data_->text_size_adjust_ || |
+ rare_inherited_data_->list_style_image != |
+ other.rare_inherited_data_->list_style_image || |
+ rare_inherited_data_->line_height_step_ != |
+ other.rare_inherited_data_->line_height_step_ || |
+ rare_inherited_data_->text_stroke_width != |
+ other.rare_inherited_data_->text_stroke_width) |
+ return true; |
- if (!rare_inherited_data_->ShadowDataEquivalent( |
- *other.rare_inherited_data_.Get())) |
- return true; |
+ if (!rare_inherited_data_->ShadowDataEquivalent( |
+ *other.rare_inherited_data_.Get())) |
+ return true; |
- if (!rare_inherited_data_->QuotesDataEquivalent( |
- *other.rare_inherited_data_.Get())) |
- return true; |
- } |
+ if (!rare_inherited_data_->QuotesDataEquivalent( |
+ *other.rare_inherited_data_.Get())) |
+ return true; |
if (style_inherited_data_->text_autosizing_multiplier != |
other.style_inherited_data_->text_autosizing_multiplier) |
@@ -768,16 +759,14 @@ bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation( |
other.style_inherited_data_->font.LoadingCustomFonts()) |
return true; |
- if (style_inherited_data_.Get() != other.style_inherited_data_.Get()) { |
- if (style_inherited_data_->line_height != |
- other.style_inherited_data_->line_height || |
- style_inherited_data_->font != other.style_inherited_data_->font || |
- style_inherited_data_->horizontal_border_spacing != |
- other.style_inherited_data_->horizontal_border_spacing || |
- style_inherited_data_->vertical_border_spacing != |
- other.style_inherited_data_->vertical_border_spacing) |
- return true; |
- } |
+ if (style_inherited_data_->line_height != |
+ other.style_inherited_data_->line_height || |
+ style_inherited_data_->font != other.style_inherited_data_->font || |
+ style_inherited_data_->horizontal_border_spacing != |
+ other.style_inherited_data_->horizontal_border_spacing || |
+ style_inherited_data_->vertical_border_spacing != |
+ other.style_inherited_data_->vertical_border_spacing) |
+ return true; |
if (BoxDirection() != other.BoxDirection() || |
RtlOrdering() != other.RtlOrdering() || |
@@ -841,62 +830,56 @@ 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()) |
- return true; |
+ 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()) |
+ return true; |
- if (box_->VerticalAlign() != other.box_->VerticalAlign()) |
- return true; |
+ if (box_->VerticalAlign() != other.box_->VerticalAlign()) |
+ return true; |
- if (box_->BoxSizing() != other.box_->BoxSizing()) |
- return true; |
- } |
+ if (box_->BoxSizing() != other.box_->BoxSizing()) |
+ return true; |
if (VerticalAlign() != other.VerticalAlign() || |
GetPosition() != other.GetPosition()) |
return true; |
- if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { |
- if (rare_non_inherited_data_->align_content_ != |
- other.rare_non_inherited_data_->align_content_ || |
- rare_non_inherited_data_->align_items_ != |
- other.rare_non_inherited_data_->align_items_ || |
- rare_non_inherited_data_->align_self_ != |
- other.rare_non_inherited_data_->align_self_ || |
- rare_non_inherited_data_->justify_content_ != |
- other.rare_non_inherited_data_->justify_content_ || |
- rare_non_inherited_data_->justify_items_ != |
- other.rare_non_inherited_data_->justify_items_ || |
- rare_non_inherited_data_->justify_self_ != |
- other.rare_non_inherited_data_->justify_self_ || |
- rare_non_inherited_data_->contain_ != |
- other.rare_non_inherited_data_->contain_) |
- return true; |
- } |
+ if (rare_non_inherited_data_->align_content_ != |
+ other.rare_non_inherited_data_->align_content_ || |
+ rare_non_inherited_data_->align_items_ != |
+ other.rare_non_inherited_data_->align_items_ || |
+ rare_non_inherited_data_->align_self_ != |
+ other.rare_non_inherited_data_->align_self_ || |
+ rare_non_inherited_data_->justify_content_ != |
+ other.rare_non_inherited_data_->justify_content_ || |
+ rare_non_inherited_data_->justify_items_ != |
+ other.rare_non_inherited_data_->justify_items_ || |
+ rare_non_inherited_data_->justify_self_ != |
+ other.rare_non_inherited_data_->justify_self_ || |
+ rare_non_inherited_data_->contain_ != |
+ other.rare_non_inherited_data_->contain_) |
+ return true; |
return false; |
} |
bool ComputedStyle::DiffNeedsPaintInvalidationSubtree( |
const ComputedStyle& other) const { |
- if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { |
- if (rare_non_inherited_data_->effective_blend_mode_ != |
- other.rare_non_inherited_data_->effective_blend_mode_ || |
- rare_non_inherited_data_->isolation_ != |
- other.rare_non_inherited_data_->isolation_) |
- return true; |
+ if (rare_non_inherited_data_->effective_blend_mode_ != |
+ other.rare_non_inherited_data_->effective_blend_mode_ || |
+ rare_non_inherited_data_->isolation_ != |
+ other.rare_non_inherited_data_->isolation_) |
+ return true; |
- if (rare_non_inherited_data_->mask_ != |
- other.rare_non_inherited_data_->mask_ || |
- rare_non_inherited_data_->mask_box_image_ != |
- other.rare_non_inherited_data_->mask_box_image_) |
- return true; |
- } |
+ if (rare_non_inherited_data_->mask_ != |
+ other.rare_non_inherited_data_->mask_ || |
+ rare_non_inherited_data_->mask_box_image_ != |
+ other.rare_non_inherited_data_->mask_box_image_) |
+ return true; |
return false; |
} |
@@ -910,45 +893,40 @@ bool ComputedStyle::DiffNeedsPaintInvalidationObject( |
*background_ != *other.background_) |
return true; |
- if (rare_inherited_data_.Get() != other.rare_inherited_data_.Get()) { |
- if (rare_inherited_data_->user_modify != |
- other.rare_inherited_data_->user_modify || |
- rare_inherited_data_->user_select != |
- other.rare_inherited_data_->user_select || |
- rare_inherited_data_->image_rendering_ != |
- other.rare_inherited_data_->image_rendering_) |
- return true; |
- } |
+ if (rare_inherited_data_->user_modify != |
+ other.rare_inherited_data_->user_modify || |
+ rare_inherited_data_->user_select != |
+ other.rare_inherited_data_->user_select || |
+ rare_inherited_data_->image_rendering_ != |
+ other.rare_inherited_data_->image_rendering_) |
+ 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 || |
- rare_non_inherited_data_->object_fit_ != |
- other.rare_non_inherited_data_->object_fit_ || |
- rare_non_inherited_data_->object_position_ != |
- other.rare_non_inherited_data_->object_position_ || |
- !rare_non_inherited_data_->ShadowDataEquivalent( |
- *other.rare_non_inherited_data_.Get()) || |
- !rare_non_inherited_data_->ShapeOutsideDataEquivalent( |
- *other.rare_non_inherited_data_.Get()) || |
- !rare_non_inherited_data_->ClipPathDataEquivalent( |
- *other.rare_non_inherited_data_.Get()) || |
- !rare_non_inherited_data_->outline_.VisuallyEqual( |
- other.rare_non_inherited_data_->outline_) || |
- (VisitedLinkBorderLeftColor() != other.VisitedLinkBorderLeftColor() && |
- BorderLeftWidth()) || |
- (VisitedLinkBorderRightColor() != other.VisitedLinkBorderRightColor() && |
- BorderRightWidth()) || |
- (VisitedLinkBorderBottomColor() != |
- other.VisitedLinkBorderBottomColor() && |
- BorderBottomWidth()) || |
- (VisitedLinkBorderTopColor() != other.VisitedLinkBorderTopColor() && |
- BorderTopWidth()) || |
- (VisitedLinkOutlineColor() != other.VisitedLinkOutlineColor() && |
- OutlineWidth()) || |
- (VisitedLinkBackgroundColor() != other.VisitedLinkBackgroundColor())) |
- return true; |
- } |
+ 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_ != |
+ other.rare_non_inherited_data_->object_position_ || |
+ !rare_non_inherited_data_->ShadowDataEquivalent( |
+ *other.rare_non_inherited_data_.Get()) || |
+ !rare_non_inherited_data_->ShapeOutsideDataEquivalent( |
+ *other.rare_non_inherited_data_.Get()) || |
+ !rare_non_inherited_data_->ClipPathDataEquivalent( |
+ *other.rare_non_inherited_data_.Get()) || |
+ !rare_non_inherited_data_->outline_.VisuallyEqual( |
+ other.rare_non_inherited_data_->outline_) || |
+ (VisitedLinkBorderLeftColor() != other.VisitedLinkBorderLeftColor() && |
+ BorderLeftWidth()) || |
+ (VisitedLinkBorderRightColor() != other.VisitedLinkBorderRightColor() && |
+ BorderRightWidth()) || |
+ (VisitedLinkBorderBottomColor() != other.VisitedLinkBorderBottomColor() && |
+ BorderBottomWidth()) || |
+ (VisitedLinkBorderTopColor() != other.VisitedLinkBorderTopColor() && |
+ BorderTopWidth()) || |
+ (VisitedLinkOutlineColor() != other.VisitedLinkOutlineColor() && |
+ OutlineWidth()) || |
+ (VisitedLinkBackgroundColor() != other.VisitedLinkBackgroundColor())) |
+ return true; |
if (Resize() != other.Resize()) |
return true; |
@@ -1017,42 +995,40 @@ void ComputedStyle::UpdatePropertySpecificDifferences( |
IsStackingContext() != other.IsStackingContext()) |
diff.SetZIndexChanged(); |
- if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { |
- // It's possible for the old and new style transform data to be equivalent |
- // while hasTransform() differs, as it checks a number of conditions aside |
- // from just the matrix, including but not limited to animation state. |
- if (HasTransform() != other.HasTransform() || |
- !TransformDataEquivalent(other) || |
- rare_non_inherited_data_->perspective_ != |
- other.rare_non_inherited_data_->perspective_ || |
- rare_non_inherited_data_->perspective_origin_ != |
- other.rare_non_inherited_data_->perspective_origin_) |
- diff.SetTransformChanged(); |
- |
- if (rare_non_inherited_data_->opacity != |
- other.rare_non_inherited_data_->opacity) |
- diff.SetOpacityChanged(); |
- |
- if (rare_non_inherited_data_->filter_ != |
- other.rare_non_inherited_data_->filter_) |
- diff.SetFilterChanged(); |
- |
- if (!rare_non_inherited_data_->ShadowDataEquivalent( |
- *other.rare_non_inherited_data_.Get())) |
- diff.SetNeedsRecomputeOverflow(); |
- |
- if (rare_non_inherited_data_->backdrop_filter_ != |
- other.rare_non_inherited_data_->backdrop_filter_) |
- diff.SetBackdropFilterChanged(); |
- |
- if (!rare_non_inherited_data_->ReflectionDataEquivalent( |
- *other.rare_non_inherited_data_.Get())) |
- diff.SetFilterChanged(); |
- |
- if (!rare_non_inherited_data_->outline_.VisuallyEqual( |
- other.rare_non_inherited_data_->outline_)) |
- diff.SetNeedsRecomputeOverflow(); |
- } |
+ // It's possible for the old and new style transform data to be equivalent |
+ // while hasTransform() differs, as it checks a number of conditions aside |
+ // from just the matrix, including but not limited to animation state. |
+ if (HasTransform() != other.HasTransform() || |
+ !TransformDataEquivalent(other) || |
+ rare_non_inherited_data_->perspective_ != |
+ other.rare_non_inherited_data_->perspective_ || |
+ rare_non_inherited_data_->perspective_origin_ != |
+ other.rare_non_inherited_data_->perspective_origin_) |
+ diff.SetTransformChanged(); |
+ |
+ if (rare_non_inherited_data_->opacity != |
+ other.rare_non_inherited_data_->opacity) |
+ diff.SetOpacityChanged(); |
+ |
+ if (rare_non_inherited_data_->filter_ != |
+ other.rare_non_inherited_data_->filter_) |
+ diff.SetFilterChanged(); |
+ |
+ if (!rare_non_inherited_data_->ShadowDataEquivalent( |
+ *other.rare_non_inherited_data_.Get())) |
+ diff.SetNeedsRecomputeOverflow(); |
+ |
+ if (rare_non_inherited_data_->backdrop_filter_ != |
+ other.rare_non_inherited_data_->backdrop_filter_) |
+ diff.SetBackdropFilterChanged(); |
+ |
+ if (!rare_non_inherited_data_->ReflectionDataEquivalent( |
+ *other.rare_non_inherited_data_.Get())) |
+ diff.SetFilterChanged(); |
+ |
+ if (!rare_non_inherited_data_->outline_.VisuallyEqual( |
+ other.rare_non_inherited_data_->outline_)) |
+ diff.SetNeedsRecomputeOverflow(); |
if (!surround_->border_.VisualOverflowEqual(other.surround_->border_)) |
diff.SetNeedsRecomputeOverflow(); |
@@ -1064,9 +1040,7 @@ void ComputedStyle::UpdatePropertySpecificDifferences( |
has_simple_underline_ != other.has_simple_underline_ || |
visual_->text_decoration != other.visual_->text_decoration) { |
diff.SetTextDecorationOrColorChanged(); |
- } else if (rare_non_inherited_data_.Get() != |
- other.rare_non_inherited_data_.Get() && |
- (rare_non_inherited_data_->text_decoration_style_ != |
+ } else if ((rare_non_inherited_data_->text_decoration_style_ != |
other.rare_non_inherited_data_->text_decoration_style_ || |
rare_non_inherited_data_->text_decoration_color_ != |
other.rare_non_inherited_data_->text_decoration_color_ || |
@@ -1074,8 +1048,7 @@ void ComputedStyle::UpdatePropertySpecificDifferences( |
other.rare_non_inherited_data_ |
->visited_link_text_decoration_color_)) { |
diff.SetTextDecorationOrColorChanged(); |
- } else if (rare_inherited_data_.Get() != other.rare_inherited_data_.Get() && |
- (rare_inherited_data_->TextFillColor() != |
+ } else if ((rare_inherited_data_->TextFillColor() != |
other.rare_inherited_data_->TextFillColor() || |
rare_inherited_data_->TextStrokeColor() != |
other.rare_inherited_data_->TextStrokeColor() || |