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