| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |