| 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 19 matching lines...) Expand all Loading... |
| 30 explicit LineLayoutItem(LayoutObject* layoutObject) | 30 explicit LineLayoutItem(LayoutObject* layoutObject) |
| 31 : m_layoutObject(layoutObject) | 31 : m_layoutObject(layoutObject) |
| 32 { | 32 { |
| 33 } | 33 } |
| 34 | 34 |
| 35 LineLayoutItem(std::nullptr_t) | 35 LineLayoutItem(std::nullptr_t) |
| 36 : m_layoutObject(0) | 36 : m_layoutObject(0) |
| 37 { | 37 { |
| 38 } | 38 } |
| 39 | 39 |
| 40 void detach() |
| 41 { |
| 42 m_layoutObject = 0; |
| 43 } |
| 44 |
| 40 LineLayoutItem() : m_layoutObject(0) { } | 45 LineLayoutItem() : m_layoutObject(0) { } |
| 41 | 46 |
| 42 // TODO(pilgrim): Remove this. It's only here to make things compile before | 47 // TODO(pilgrim): Remove this. It's only here to make things compile before |
| 43 // switching all of core/layout/line to using the API. | 48 // switching all of core/layout/line to using the API. |
| 44 // https://crbug.com/499321 | 49 // https://crbug.com/499321 |
| 45 operator LayoutObject*() const { return m_layoutObject; } | 50 operator LayoutObject*() const { return m_layoutObject; } |
| 46 | 51 |
| 47 bool isEqual(const LayoutObject* layoutObject) const | 52 bool isEqual(const LayoutObject* layoutObject) const |
| 48 { | 53 { |
| 49 return m_layoutObject == layoutObject; | 54 return m_layoutObject == layoutObject; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 bool isDescendantOf(const LineLayoutItem item) const | 92 bool isDescendantOf(const LineLayoutItem item) const |
| 88 { | 93 { |
| 89 return m_layoutObject->isDescendantOf(item); | 94 return m_layoutObject->isDescendantOf(item); |
| 90 } | 95 } |
| 91 | 96 |
| 92 void updateHitTestResult(HitTestResult& result, const LayoutPoint& point) | 97 void updateHitTestResult(HitTestResult& result, const LayoutPoint& point) |
| 93 { | 98 { |
| 94 return m_layoutObject->updateHitTestResult(result, point); | 99 return m_layoutObject->updateHitTestResult(result, point); |
| 95 } | 100 } |
| 96 | 101 |
| 102 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod
e = 0, bool* wasFixed = nullptr) const |
| 103 { |
| 104 return m_layoutObject->localToAbsoluteQuad(quad, mode, wasFixed); |
| 105 } |
| 106 |
| 97 LineLayoutItem nextSibling() const | 107 LineLayoutItem nextSibling() const |
| 98 { | 108 { |
| 99 return LineLayoutItem(m_layoutObject->nextSibling()); | 109 return LineLayoutItem(m_layoutObject->nextSibling()); |
| 100 } | 110 } |
| 101 | 111 |
| 102 LineLayoutItem previousSibling() const | 112 LineLayoutItem previousSibling() const |
| 103 { | 113 { |
| 104 return LineLayoutItem(m_layoutObject->previousSibling()); | 114 return LineLayoutItem(m_layoutObject->previousSibling()); |
| 105 } | 115 } |
| 106 | 116 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 | 356 |
| 347 private: | 357 private: |
| 348 LayoutObject* m_layoutObject; | 358 LayoutObject* m_layoutObject; |
| 349 | 359 |
| 350 friend class LineLayoutPaintShim; | 360 friend class LineLayoutPaintShim; |
| 351 }; | 361 }; |
| 352 | 362 |
| 353 } // namespace blink | 363 } // namespace blink |
| 354 | 364 |
| 355 #endif // LineLayoutItem_h | 365 #endif // LineLayoutItem_h |
| OLD | NEW |