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

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

Issue 2884153002: Move RareInheritedData (Quotes|Shadow)DataEquivalent to ComputedStyle. (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
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 0b2cb1d71165e49ed49da0b8e1968d63e7b384f8..0cfee95a6289c20113430146391a3b47557707db 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -724,12 +724,10 @@ bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation(
other.rare_inherited_data_->text_stroke_width_)
return true;
- if (!rare_inherited_data_->ShadowDataEquivalent(
- *other.rare_inherited_data_.Get()))
+ if (!TextShadowDataEquivalent(other))
return true;
- if (!rare_inherited_data_->QuotesDataEquivalent(
- *other.rare_inherited_data_.Get()))
+ if (!QuotesDataEquivalent(other))
return true;
}
@@ -1113,6 +1111,10 @@ void ComputedStyle::SetQuotes(PassRefPtr<QuotesData> q) {
rare_inherited_data_.Access()->quotes_ = std::move(q);
}
+bool ComputedStyle::QuotesDataEquivalent(const ComputedStyle& other) const {
+ return DataEquivalent(Quotes(), other.Quotes());
+}
+
void ComputedStyle::ClearCursorList() {
if (rare_inherited_data_->cursor_data_)
rare_inherited_data_.Access()->cursor_data_ = nullptr;
@@ -1378,6 +1380,10 @@ void ComputedStyle::SetTextShadow(PassRefPtr<ShadowList> s) {
rare_inherited_data_.Access()->text_shadow_ = std::move(s);
}
+bool ComputedStyle::TextShadowDataEquivalent(const ComputedStyle& other) const {
+ return DataEquivalent(TextShadow(), other.TextShadow());
+}
+
void ComputedStyle::SetBoxShadow(PassRefPtr<ShadowList> s) {
rare_non_inherited_data_.Access()->box_shadow_ = std::move(s);
}
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/StyleRareInheritedData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698