Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2900973004: Move code in ComputedStyle::UpdatePropertySpecificDifferences to generate diffing helpers (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b5ab770317cabc093a7b0c1be6f5ba91342dfac2..689ec4b99fb6cb7784d5ad207a8bb1bf71ee593a 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -978,80 +978,65 @@ void ComputedStyle::UpdatePropertySpecificDifferences(
}
if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) {
- if (rare_non_inherited_data_->filter_ !=
- other.rare_non_inherited_data_->filter_)
+ if ((rare_non_inherited_data_->filter_ !=
+ other.rare_non_inherited_data_->filter_) ||
+ !rare_non_inherited_data_->ReflectionDataEquivalent(
+ *other.rare_non_inherited_data_.Get()))
diff.SetFilterChanged();
}
if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) {
if (!rare_non_inherited_data_->ShadowDataEquivalent(
- *other.rare_non_inherited_data_.Get()))
+ *other.rare_non_inherited_data_.Get()) ||
+ !rare_non_inherited_data_->outline_.VisuallyEqual(
+ other.rare_non_inherited_data_->outline_))
diff.SetNeedsRecomputeOverflow();
}
+ if (!BorderVisualOverflowEqual(other))
+ diff.SetNeedsRecomputeOverflow();
+
if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) {
if (rare_non_inherited_data_->backdrop_filter_ !=
other.rare_non_inherited_data_->backdrop_filter_)
diff.SetBackdropFilterChanged();
}
- if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) {
- if (!rare_non_inherited_data_->ReflectionDataEquivalent(
- *other.rare_non_inherited_data_.Get()))
- diff.SetFilterChanged();
- }
-
- if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) {
- if (!rare_non_inherited_data_->outline_.VisuallyEqual(
- other.rare_non_inherited_data_->outline_))
- diff.SetNeedsRecomputeOverflow();
- }
-
- if (!BorderVisualOverflowEqual(other))
- diff.SetNeedsRecomputeOverflow();
-
if (!diff.NeedsFullPaintInvalidation()) {
- if (inherited_data_->color_ != other.inherited_data_->color_ ||
- inherited_data_->visited_link_color_ !=
- other.inherited_data_->visited_link_color_ ||
- HasSimpleUnderlineInternal() != other.HasSimpleUnderlineInternal() ||
- visual_data_->text_decoration_ !=
- other.visual_data_->text_decoration_) {
+ if ((inherited_data_->color_ != other.inherited_data_->color_ ||
+ inherited_data_->visited_link_color_ !=
+ other.inherited_data_->visited_link_color_ ||
+ HasSimpleUnderlineInternal() != other.HasSimpleUnderlineInternal() ||
+ visual_data_->text_decoration_ !=
+ other.visual_data_->text_decoration_) ||
+ (rare_non_inherited_data_.Get() !=
+ other.rare_non_inherited_data_.Get() &&
+ (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_ ||
+ rare_non_inherited_data_->visited_link_text_decoration_color_ !=
+ other.rare_non_inherited_data_
+ ->visited_link_text_decoration_color_)) ||
+ (rare_inherited_data_.Get() != other.rare_inherited_data_.Get() &&
+ (TextFillColor() != other.TextFillColor() ||
+ TextStrokeColor() != other.TextStrokeColor() ||
+ TextEmphasisColor() != other.TextEmphasisColor() ||
+ VisitedLinkTextFillColor() != other.VisitedLinkTextFillColor() ||
+ VisitedLinkTextStrokeColor() != other.VisitedLinkTextStrokeColor() ||
+ VisitedLinkTextEmphasisColor() !=
+ other.VisitedLinkTextEmphasisColor() ||
+ rare_inherited_data_->text_emphasis_fill_ !=
+ other.rare_inherited_data_->text_emphasis_fill_ ||
+ rare_inherited_data_->text_underline_position_ !=
+ other.rare_inherited_data_->text_underline_position_ ||
+ rare_inherited_data_->text_decoration_skip_ !=
+ other.rare_inherited_data_->text_decoration_skip_ ||
+ rare_inherited_data_->applied_text_decorations_ !=
+ other.rare_inherited_data_->applied_text_decorations_ ||
+ CaretColor() != CaretColor() ||
+ VisitedLinkCaretColor() != other.VisitedLinkCaretColor()))) {
diff.SetTextDecorationOrColorChanged();
- } else {
- if (rare_non_inherited_data_.Get() !=
- other.rare_non_inherited_data_.Get() &&
- (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_ ||
- rare_non_inherited_data_->visited_link_text_decoration_color_ !=
- other.rare_non_inherited_data_
- ->visited_link_text_decoration_color_)) {
- diff.SetTextDecorationOrColorChanged();
- } else {
- if (rare_inherited_data_.Get() != other.rare_inherited_data_.Get() &&
- (TextFillColor() != other.TextFillColor() ||
- TextStrokeColor() != other.TextStrokeColor() ||
- TextEmphasisColor() != other.TextEmphasisColor() ||
- VisitedLinkTextFillColor() != other.VisitedLinkTextFillColor() ||
- VisitedLinkTextStrokeColor() !=
- other.VisitedLinkTextStrokeColor() ||
- VisitedLinkTextEmphasisColor() !=
- other.VisitedLinkTextEmphasisColor() ||
- rare_inherited_data_->text_emphasis_fill_ !=
- other.rare_inherited_data_->text_emphasis_fill_ ||
- rare_inherited_data_->text_underline_position_ !=
- other.rare_inherited_data_->text_underline_position_ ||
- rare_inherited_data_->text_decoration_skip_ !=
- other.rare_inherited_data_->text_decoration_skip_ ||
- rare_inherited_data_->applied_text_decorations_ !=
- other.rare_inherited_data_->applied_text_decorations_ ||
- CaretColor() != CaretColor() ||
- VisitedLinkCaretColor() != other.VisitedLinkCaretColor())) {
- diff.SetTextDecorationOrColorChanged();
- }
- }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698