| 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 #include "core/layout/LayoutText.h" | 10 #include "core/layout/LayoutText.h" |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 static unsigned hash(const LineLayoutItem& key) { | 312 static unsigned hash(const LineLayoutItem& key) { |
| 313 return WTF::PtrHash<LayoutObject>::hash(key.m_layoutObject); | 313 return WTF::PtrHash<LayoutObject>::hash(key.m_layoutObject); |
| 314 } | 314 } |
| 315 static bool equal(const LineLayoutItem& a, const LineLayoutItem& b) { | 315 static bool equal(const LineLayoutItem& a, const LineLayoutItem& b) { |
| 316 return WTF::PtrHash<LayoutObject>::equal(a.m_layoutObject, | 316 return WTF::PtrHash<LayoutObject>::equal(a.m_layoutObject, |
| 317 b.m_layoutObject); | 317 b.m_layoutObject); |
| 318 } | 318 } |
| 319 static const bool safeToCompareToEmptyOrDeleted = true; | 319 static const bool safeToCompareToEmptyOrDeleted = true; |
| 320 }; | 320 }; |
| 321 | 321 |
| 322 #ifndef NDEBUG | 322 #if DCHECK_IS_ON() |
| 323 | 323 |
| 324 const char* name() const { return m_layoutObject->name(); } | 324 const char* name() const { return m_layoutObject->name(); } |
| 325 | 325 |
| 326 // Intentionally returns a void* to avoid exposing LayoutObject* to the line | 326 // Intentionally returns a void* to avoid exposing LayoutObject* to the line |
| 327 // layout code. | 327 // layout code. |
| 328 void* debugPointer() const { return m_layoutObject; } | 328 void* debugPointer() const { return m_layoutObject; } |
| 329 | 329 |
| 330 void showTreeForThis() const { m_layoutObject->showTreeForThis(); } | 330 void showTreeForThis() const { m_layoutObject->showTreeForThis(); } |
| 331 | 331 |
| 332 String decoratedName() const { return m_layoutObject->decoratedName(); } | 332 String decoratedName() const { return m_layoutObject->decoratedName(); } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 358 | 358 |
| 359 template <> | 359 template <> |
| 360 struct HashTraits<blink::LineLayoutItem> | 360 struct HashTraits<blink::LineLayoutItem> |
| 361 : SimpleClassHashTraits<blink::LineLayoutItem> { | 361 : SimpleClassHashTraits<blink::LineLayoutItem> { |
| 362 STATIC_ONLY(HashTraits); | 362 STATIC_ONLY(HashTraits); |
| 363 }; | 363 }; |
| 364 | 364 |
| 365 } // namespace WTF | 365 } // namespace WTF |
| 366 | 366 |
| 367 #endif // LineLayoutItem_h | 367 #endif // LineLayoutItem_h |
| OLD | NEW |