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

Side by Side 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, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/StyleRareNonInheritedData.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 QuoteContentData(QuoteType quote) : quote_(quote) {} 193 QuoteContentData(QuoteType quote) : quote_(quote) {}
194 194
195 ContentData* CloneInternal() const override { return Create(Quote()); } 195 ContentData* CloneInternal() const override { return Create(Quote()); }
196 196
197 QuoteType quote_; 197 QuoteType quote_;
198 }; 198 };
199 199
200 DEFINE_CONTENT_DATA_TYPE_CASTS(Quote); 200 DEFINE_CONTENT_DATA_TYPE_CASTS(Quote);
201 201
202 inline bool operator==(const ContentData& a, const ContentData& b) { 202 inline bool operator==(const ContentData& a, const ContentData& b) {
203 return a.Equals(b); 203 const ContentData* ptr_a = &a;
204 } 204 const ContentData* ptr_b = &b;
205 205
206 inline bool operator!=(const ContentData& a, const ContentData& b) { 206 while (ptr_a && ptr_b && ptr_a->Equals(*ptr_b)) {
207 return !(a == b); 207 ptr_a = ptr_a->Next();
208 ptr_b = ptr_b->Next();
209 }
210
211 return !ptr_a && !ptr_b;
208 } 212 }
209 213
210 } // namespace blink 214 } // namespace blink
211 215
212 #endif // ContentData_h 216 #endif // ContentData_h
OLDNEW
« 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