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 |
11 #include "platform/LayoutUnit.h" | 11 #include "platform/LayoutUnit.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class ComputedStyle; | 15 class ComputedStyle; |
16 class Document; | 16 class Document; |
17 class HitTestRequest; | 17 class HitTestRequest; |
18 class HitTestLocation; | 18 class HitTestLocation; |
19 class LayoutObject; | 19 class LayoutObject; |
20 class LineLayoutBox; | 20 class LineLayoutBox; |
| 21 class LineLayoutBoxModel; |
21 | 22 |
22 enum HitTestFilter; | 23 enum HitTestFilter; |
23 | 24 |
24 class LineLayoutItem { | 25 class LineLayoutItem { |
25 public: | 26 public: |
26 explicit LineLayoutItem(LayoutObject* layoutObject) | 27 explicit LineLayoutItem(LayoutObject* layoutObject) |
27 : m_layoutObject(layoutObject) | 28 : m_layoutObject(layoutObject) |
28 { | 29 { |
29 } | 30 } |
30 | 31 |
(...skipping 23 matching lines...) Expand all Loading... |
54 { | 55 { |
55 return m_layoutObject->nonPseudoNode(); | 56 return m_layoutObject->nonPseudoNode(); |
56 } | 57 } |
57 | 58 |
58 LineLayoutItem parent() const | 59 LineLayoutItem parent() const |
59 { | 60 { |
60 return LineLayoutItem(m_layoutObject->parent()); | 61 return LineLayoutItem(m_layoutObject->parent()); |
61 } | 62 } |
62 | 63 |
63 // Implemented in LineLayoutBox.h | 64 // Implemented in LineLayoutBox.h |
64 // Intentionally returns a Box instead of a Block to avoid exposing LayoutBl
ock | 65 // Intentionally returns a LineLayoutBox to avoid exposing LayoutBlock |
65 // to the line layout code. | 66 // to the line layout code. |
66 LineLayoutBox containingBlock() const; | 67 LineLayoutBox containingBlock() const; |
67 | 68 |
| 69 // Implemented in LineLayoutBoxModel.h |
| 70 // Intentionally returns a LineLayoutBoxModel to avoid exposing LayoutBoxMod
elObject |
| 71 // to the line layout code. |
| 72 LineLayoutBoxModel enclosingBoxModelObject() const; |
| 73 |
68 LineLayoutItem container() const | 74 LineLayoutItem container() const |
69 { | 75 { |
70 return LineLayoutItem(m_layoutObject->container()); | 76 return LineLayoutItem(m_layoutObject->container()); |
71 } | 77 } |
72 | 78 |
73 bool isDescendantOf(const LineLayoutItem item) const | 79 bool isDescendantOf(const LineLayoutItem item) const |
74 { | 80 { |
75 return m_layoutObject->isDescendantOf(item); | 81 return m_layoutObject->isDescendantOf(item); |
76 } | 82 } |
77 | 83 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 LayoutObject* layoutObject() { return m_layoutObject; } | 321 LayoutObject* layoutObject() { return m_layoutObject; } |
316 const LayoutObject* layoutObject() const { return m_layoutObject; } | 322 const LayoutObject* layoutObject() const { return m_layoutObject; } |
317 | 323 |
318 private: | 324 private: |
319 LayoutObject* m_layoutObject; | 325 LayoutObject* m_layoutObject; |
320 }; | 326 }; |
321 | 327 |
322 } // namespace blink | 328 } // namespace blink |
323 | 329 |
324 #endif // LineLayoutItem_h | 330 #endif // LineLayoutItem_h |
OLD | NEW |