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

Side by Side Diff: third_party/WebKit/Source/core/layout/api/LineLayoutItem.h

Issue 1839003002: WTF: De-specialize PtrHash<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove extra equal() definitions. Created 4 years, 8 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LineLayoutItem_h 5 #ifndef LineLayoutItem_h
6 #define LineLayoutItem_h 6 #define LineLayoutItem_h
7 7
8 #include "core/layout/LayoutObject.h" 8 #include "core/layout/LayoutObject.h"
9 #include "core/layout/LayoutObjectInlines.h" 9 #include "core/layout/LayoutObjectInlines.h"
10 10
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 return m_layoutObject->visualRect(); 415 return m_layoutObject->visualRect();
416 } 416 }
417 417
418 bool isHashTableDeletedValue() const 418 bool isHashTableDeletedValue() const
419 { 419 {
420 return m_layoutObject == kHashTableDeletedValue; 420 return m_layoutObject == kHashTableDeletedValue;
421 } 421 }
422 422
423 struct LineLayoutItemHash { 423 struct LineLayoutItemHash {
424 STATIC_ONLY(LineLayoutItemHash); 424 STATIC_ONLY(LineLayoutItemHash);
425 static unsigned hash(const LineLayoutItem& key) { return WTF::PtrHash<La youtObject*>::hash(key.m_layoutObject); } 425 static unsigned hash(const LineLayoutItem& key) { return WTF::PtrHash<La youtObject>::hash(key.m_layoutObject); }
426 static bool equal(const LineLayoutItem& a, const LineLayoutItem& b) 426 static bool equal(const LineLayoutItem& a, const LineLayoutItem& b)
427 { 427 {
428 return WTF::PtrHash<LayoutObject*>::equal(a.m_layoutObject, b.m_layo utObject); 428 return WTF::PtrHash<LayoutObject>::equal(a.m_layoutObject, b.m_layou tObject);
429 } 429 }
430 static const bool safeToCompareToEmptyOrDeleted = true; 430 static const bool safeToCompareToEmptyOrDeleted = true;
431 }; 431 };
432 432
433 #ifndef NDEBUG 433 #ifndef NDEBUG
434 434
435 const char* name() const 435 const char* name() const
436 { 436 {
437 return m_layoutObject->name(); 437 return m_layoutObject->name();
438 } 438 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 481
482 template <> 482 template <>
483 struct HashTraits<blink::LineLayoutItem> : SimpleClassHashTraits<blink::LineLayo utItem> { 483 struct HashTraits<blink::LineLayoutItem> : SimpleClassHashTraits<blink::LineLayo utItem> {
484 STATIC_ONLY(HashTraits); 484 STATIC_ONLY(HashTraits);
485 }; 485 };
486 486
487 } // namespace WTF 487 } // namespace WTF
488 488
489 489
490 #endif // LineLayoutItem_h 490 #endif // LineLayoutItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698