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

Unified Diff: third_party/WebKit/Source/core/style/ContentData.h

Issue 2904723002: Change ContentData::operator== to iterate through whole list. (Closed)
Patch Set: Rebase 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 | third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/ContentData.h
diff --git a/third_party/WebKit/Source/core/style/ContentData.h b/third_party/WebKit/Source/core/style/ContentData.h
index b7a1df0bdb9364a1af5ef39b7433d86970cc4f0e..7d4b842777fa9658c6e275f877fc8a7bd3549008 100644
--- a/third_party/WebKit/Source/core/style/ContentData.h
+++ b/third_party/WebKit/Source/core/style/ContentData.h
@@ -200,11 +200,15 @@ class QuoteContentData final : public ContentData {
DEFINE_CONTENT_DATA_TYPE_CASTS(Quote);
inline bool operator==(const ContentData& a, const ContentData& b) {
- return a.Equals(b);
-}
+ const ContentData* ptr_a = &a;
+ const ContentData* ptr_b = &b;
+
+ while (ptr_a && ptr_b && ptr_a->Equals(*ptr_b)) {
+ ptr_a = ptr_a->Next();
+ ptr_b = ptr_b->Next();
+ }
-inline bool operator!=(const ContentData& a, const ContentData& b) {
- return !(a == b);
+ return !ptr_a && !ptr_b;
}
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698