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

Side by Side Diff: third_party/WebKit/Source/core/dom/QualifiedName.h

Issue 2589273002: Add sparse accessibility attribute interface to Blink (Closed)
Patch Set: Address feedback Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 return a == q.localName(); 195 return a == q.localName();
196 } 196 }
197 inline bool operator!=(const QualifiedName& q, const AtomicString& a) { 197 inline bool operator!=(const QualifiedName& q, const AtomicString& a) {
198 return a != q.localName(); 198 return a != q.localName();
199 } 199 }
200 200
201 inline unsigned hashComponents(const QualifiedNameComponents& buf) { 201 inline unsigned hashComponents(const QualifiedNameComponents& buf) {
202 return StringHasher::hashMemory<sizeof(QualifiedNameComponents)>(&buf); 202 return StringHasher::hashMemory<sizeof(QualifiedNameComponents)>(&buf);
203 } 203 }
204 204
205 struct QualifiedNameHash { 205 struct CORE_EXPORT QualifiedNameHash {
206 STATIC_ONLY(QualifiedNameHash); 206 STATIC_ONLY(QualifiedNameHash);
207 static unsigned hash(const QualifiedName& name) { return hash(name.impl()); } 207 static unsigned hash(const QualifiedName& name) { return hash(name.impl()); }
208 208
209 static unsigned hash(const QualifiedName::QualifiedNameImpl* name) { 209 static unsigned hash(const QualifiedName::QualifiedNameImpl* name) {
210 if (!name->m_existingHash) 210 if (!name->m_existingHash)
211 name->m_existingHash = name->computeHash(); 211 name->m_existingHash = name->computeHash();
212 return name->m_existingHash; 212 return name->m_existingHash;
213 } 213 }
214 214
215 static bool equal(const QualifiedName& a, const QualifiedName& b) { 215 static bool equal(const QualifiedName& a, const QualifiedName& b) {
(...skipping 20 matching lines...) Expand all
236 struct HashTraits<blink::QualifiedName> 236 struct HashTraits<blink::QualifiedName>
237 : SimpleClassHashTraits<blink::QualifiedName> { 237 : SimpleClassHashTraits<blink::QualifiedName> {
238 static const bool emptyValueIsZero = false; 238 static const bool emptyValueIsZero = false;
239 static blink::QualifiedName emptyValue() { 239 static blink::QualifiedName emptyValue() {
240 return blink::QualifiedName::null(); 240 return blink::QualifiedName::null();
241 } 241 }
242 }; 242 };
243 } // namespace WTF 243 } // namespace WTF
244 244
245 #endif 245 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698