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 LineLayoutBlockFlow_h | 5 #ifndef LineLayoutBlockFlow_h |
6 #define LineLayoutBlockFlow_h | 6 #define LineLayoutBlockFlow_h |
7 | 7 |
8 #include "core/layout/FloatingObjects.h" | 8 #include "core/layout/FloatingObjects.h" |
9 #include "core/layout/LayoutBlockFlow.h" | 9 #include "core/layout/LayoutBlockFlow.h" |
10 #include "core/layout/api/LineLayoutBox.h" | 10 #include "core/layout/api/LineLayoutBox.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 LineLayoutItem firstChild() const | 37 LineLayoutItem firstChild() const |
38 { | 38 { |
39 return LineLayoutItem(toBlockFlow()->firstChild()); | 39 return LineLayoutItem(toBlockFlow()->firstChild()); |
40 } | 40 } |
41 LineLayoutItem lastChild() const | 41 LineLayoutItem lastChild() const |
42 { | 42 { |
43 return LineLayoutItem(toBlockFlow()->lastChild()); | 43 return LineLayoutItem(toBlockFlow()->lastChild()); |
44 } | 44 } |
45 | 45 |
46 LayoutUnit startAlignedOffsetForLine(LayoutUnit position, bool shouldIndentT
ext) | 46 LayoutUnit startAlignedOffsetForLine(LayoutUnit position, IndentTextOrNot in
dentText) |
47 { | 47 { |
48 return toBlockFlow()->startAlignedOffsetForLine(position, shouldIndentTe
xt); | 48 return toBlockFlow()->startAlignedOffsetForLine(position, indentText); |
49 } | 49 } |
50 | 50 |
51 LayoutUnit textIndentOffset() const | 51 LayoutUnit textIndentOffset() const |
52 { | 52 { |
53 return toBlockFlow()->textIndentOffset(); | 53 return toBlockFlow()->textIndentOffset(); |
54 } | 54 } |
55 | 55 |
56 LayoutUnit logicalWidthForChild(const LayoutBox& child) const | 56 LayoutUnit logicalWidthForChild(const LayoutBox& child) const |
57 { | 57 { |
58 return toBlockFlow()->logicalWidthForChild(child); | 58 return toBlockFlow()->logicalWidthForChild(child); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 LayoutUnit minLineHeightForReplacedObject(bool isFirstLine, LayoutUnit repla
cedHeight) const | 101 LayoutUnit minLineHeightForReplacedObject(bool isFirstLine, LayoutUnit repla
cedHeight) const |
102 { | 102 { |
103 return toBlockFlow()->minLineHeightForReplacedObject(isFirstLine, replac
edHeight); | 103 return toBlockFlow()->minLineHeightForReplacedObject(isFirstLine, replac
edHeight); |
104 } | 104 } |
105 | 105 |
106 void setStaticInlinePositionForChild(LineLayoutBox box, LayoutUnit inlinePos
ition) | 106 void setStaticInlinePositionForChild(LineLayoutBox box, LayoutUnit inlinePos
ition) |
107 { | 107 { |
108 toBlockFlow()->setStaticInlinePositionForChild(*toLayoutBox(box), inline
Position); | 108 toBlockFlow()->setStaticInlinePositionForChild(*toLayoutBox(box), inline
Position); |
109 } | 109 } |
110 | 110 |
111 void updateStaticInlinePositionForChild(LineLayoutBox box, LayoutUnit logica
lTop, bool shouldIndentText = false) | 111 void updateStaticInlinePositionForChild(LineLayoutBox box, LayoutUnit logica
lTop, IndentTextOrNot indentText = DoNotIndentText) |
112 { | 112 { |
113 toBlockFlow()->updateStaticInlinePositionForChild(*toLayoutBox(box), log
icalTop, shouldIndentText); | 113 toBlockFlow()->updateStaticInlinePositionForChild(*toLayoutBox(box), log
icalTop, indentText); |
114 } | 114 } |
115 | 115 |
116 FloatingObject* insertFloatingObject(LayoutBox& box) | 116 FloatingObject* insertFloatingObject(LayoutBox& box) |
117 { | 117 { |
118 return toBlockFlow()->insertFloatingObject(box); | 118 return toBlockFlow()->insertFloatingObject(box); |
119 } | 119 } |
120 | 120 |
121 FloatingObject* insertFloatingObject(LineLayoutBox box) | 121 FloatingObject* insertFloatingObject(LineLayoutBox box) |
122 { | 122 { |
123 return toBlockFlow()->insertFloatingObject(*toLayoutBox(box)); | 123 return toBlockFlow()->insertFloatingObject(*toLayoutBox(box)); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 LayoutUnit logicalRightForFloat(const FloatingObject& floatingObject) const | 161 LayoutUnit logicalRightForFloat(const FloatingObject& floatingObject) const |
162 { | 162 { |
163 return toBlockFlow()->logicalRightForFloat(floatingObject); | 163 return toBlockFlow()->logicalRightForFloat(floatingObject); |
164 } | 164 } |
165 | 165 |
166 LayoutUnit logicalWidthForFloat(const FloatingObject& floatingObject) const | 166 LayoutUnit logicalWidthForFloat(const FloatingObject& floatingObject) const |
167 { | 167 { |
168 return toBlockFlow()->logicalWidthForFloat(floatingObject); | 168 return toBlockFlow()->logicalWidthForFloat(floatingObject); |
169 } | 169 } |
170 | 170 |
171 LayoutUnit logicalRightOffsetForLine(LayoutUnit position, bool shouldIndentT
ext, LayoutUnit logicalHeight = 0) const | 171 LayoutUnit logicalRightOffsetForLine(LayoutUnit position, IndentTextOrNot in
dentText, LayoutUnit logicalHeight = 0) const |
172 { | 172 { |
173 return toBlockFlow()->logicalRightOffsetForLine(position, shouldIndentTe
xt, logicalHeight); | 173 return toBlockFlow()->logicalRightOffsetForLine(position, indentText, lo
gicalHeight); |
174 } | 174 } |
175 | 175 |
176 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, bool shouldIndentTe
xt, LayoutUnit logicalHeight = 0) const | 176 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, IndentTextOrNot ind
entText, LayoutUnit logicalHeight = 0) const |
177 { | 177 { |
178 return toBlockFlow()->logicalLeftOffsetForLine(position, shouldIndentTex
t, logicalHeight); | 178 return toBlockFlow()->logicalLeftOffsetForLine(position, indentText, log
icalHeight); |
179 } | 179 } |
180 | 180 |
181 private: | 181 private: |
182 LayoutBlockFlow* toBlockFlow() { return toLayoutBlockFlow(layoutObject()); }
; | 182 LayoutBlockFlow* toBlockFlow() { return toLayoutBlockFlow(layoutObject()); }
; |
183 const LayoutBlockFlow* toBlockFlow() const { return toLayoutBlockFlow(layout
Object()); }; | 183 const LayoutBlockFlow* toBlockFlow() const { return toLayoutBlockFlow(layout
Object()); }; |
184 }; | 184 }; |
185 | 185 |
186 } // namespace blink | 186 } // namespace blink |
187 | 187 |
188 #endif // LineLayoutBlockFlow_h | 188 #endif // LineLayoutBlockFlow_h |
OLD | NEW |