| 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 29 matching lines...) Expand all Loading... |
| 40 { | 40 { |
| 41 } | 41 } |
| 42 | 42 |
| 43 LineLayoutItem(std::nullptr_t) | 43 LineLayoutItem(std::nullptr_t) |
| 44 : m_layoutObject(0) | 44 : m_layoutObject(0) |
| 45 { | 45 { |
| 46 } | 46 } |
| 47 | 47 |
| 48 LineLayoutItem() : m_layoutObject(0) { } | 48 LineLayoutItem() : m_layoutObject(0) { } |
| 49 | 49 |
| 50 typedef LayoutObject* LineLayoutItem::*UnspecifiedBoolType; | 50 explicit operator bool() const { return m_layoutObject; } |
| 51 operator UnspecifiedBoolType() const { return m_layoutObject ? &LineLayoutIt
em::m_layoutObject : nullptr; } | |
| 52 | 51 |
| 53 bool isEqual(const LayoutObject* layoutObject) const | 52 bool isEqual(const LayoutObject* layoutObject) const |
| 54 { | 53 { |
| 55 return m_layoutObject == layoutObject; | 54 return m_layoutObject == layoutObject; |
| 56 } | 55 } |
| 57 | 56 |
| 58 bool operator==(const LineLayoutItem& other) const | 57 bool operator==(const LineLayoutItem& other) const |
| 59 { | 58 { |
| 60 return m_layoutObject == other.m_layoutObject; | 59 return m_layoutObject == other.m_layoutObject; |
| 61 } | 60 } |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 | 495 |
| 497 template <> | 496 template <> |
| 498 struct HashTraits<blink::LineLayoutItem> : SimpleClassHashTraits<blink::LineLayo
utItem> { | 497 struct HashTraits<blink::LineLayoutItem> : SimpleClassHashTraits<blink::LineLayo
utItem> { |
| 499 STATIC_ONLY(HashTraits); | 498 STATIC_ONLY(HashTraits); |
| 500 }; | 499 }; |
| 501 | 500 |
| 502 } // namespace WTF | 501 } // namespace WTF |
| 503 | 502 |
| 504 | 503 |
| 505 #endif // LineLayoutItem_h | 504 #endif // LineLayoutItem_h |
| OLD | NEW |