OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
5 * Copyright (C) 2003-2013 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003-2013 Apple Inc. All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * Copyright (C) 2013 Google Inc. All rights reserved. | 7 * Copyright (C) 2013 Google Inc. All rights reserved. |
8 * | 8 * |
9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
10 * modification, are permitted provided that the following conditions are | 10 * modification, are permitted provided that the following conditions are |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 IndentTextOrNot indentText, | 126 IndentTextOrNot indentText, |
127 LayoutUnit logicalHeight = LayoutUnit()) const { | 127 LayoutUnit logicalHeight = LayoutUnit()) const { |
128 return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(), | 128 return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(), |
129 indentText, logicalHeight); | 129 indentText, logicalHeight); |
130 } | 130 } |
131 LayoutUnit startOffsetForLine(LayoutUnit position, | 131 LayoutUnit startOffsetForLine(LayoutUnit position, |
132 IndentTextOrNot indentText, | 132 IndentTextOrNot indentText, |
133 LayoutUnit logicalHeight = LayoutUnit()) const { | 133 LayoutUnit logicalHeight = LayoutUnit()) const { |
134 return style()->isLeftToRightDirection() | 134 return style()->isLeftToRightDirection() |
135 ? logicalLeftOffsetForLine(position, indentText, logicalHeight) | 135 ? logicalLeftOffsetForLine(position, indentText, logicalHeight) |
136 : logicalWidth() - logicalRightOffsetForLine( | 136 : logicalWidth() - |
137 position, indentText, logicalHeight); | 137 logicalRightOffsetForLine(position, indentText, |
| 138 logicalHeight); |
138 } | 139 } |
139 LayoutUnit endOffsetForLine(LayoutUnit position, | 140 LayoutUnit endOffsetForLine(LayoutUnit position, |
140 IndentTextOrNot indentText, | 141 IndentTextOrNot indentText, |
141 LayoutUnit logicalHeight = LayoutUnit()) const { | 142 LayoutUnit logicalHeight = LayoutUnit()) const { |
142 return !style()->isLeftToRightDirection() | 143 return !style()->isLeftToRightDirection() |
143 ? logicalLeftOffsetForLine(position, indentText, logicalHeight) | 144 ? logicalLeftOffsetForLine(position, indentText, logicalHeight) |
144 : logicalWidth() - logicalRightOffsetForLine( | 145 : logicalWidth() - |
145 position, indentText, logicalHeight); | 146 logicalRightOffsetForLine(position, indentText, |
| 147 logicalHeight); |
146 } | 148 } |
147 | 149 |
148 const LineBoxList& lineBoxes() const { return m_lineBoxes; } | 150 const LineBoxList& lineBoxes() const { return m_lineBoxes; } |
149 LineBoxList* lineBoxes() { return &m_lineBoxes; } | 151 LineBoxList* lineBoxes() { return &m_lineBoxes; } |
150 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } | 152 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } |
151 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } | 153 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } |
152 RootInlineBox* firstRootBox() const { | 154 RootInlineBox* firstRootBox() const { |
153 return static_cast<RootInlineBox*>(firstLineBox()); | 155 return static_cast<RootInlineBox*>(firstLineBox()); |
154 } | 156 } |
155 RootInlineBox* lastRootBox() const { | 157 RootInlineBox* lastRootBox() const { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 } | 260 } |
259 | 261 |
260 LayoutUnit startAlignedOffsetForLine(LayoutUnit position, IndentTextOrNot); | 262 LayoutUnit startAlignedOffsetForLine(LayoutUnit position, IndentTextOrNot); |
261 | 263 |
262 void setStaticInlinePositionForChild(LayoutBox&, LayoutUnit inlinePosition); | 264 void setStaticInlinePositionForChild(LayoutBox&, LayoutUnit inlinePosition); |
263 void updateStaticInlinePositionForChild(LayoutBox&, | 265 void updateStaticInlinePositionForChild(LayoutBox&, |
264 LayoutUnit logicalTop, | 266 LayoutUnit logicalTop, |
265 IndentTextOrNot = DoNotIndentText); | 267 IndentTextOrNot = DoNotIndentText); |
266 | 268 |
267 static bool shouldSkipCreatingRunsForObject(LineLayoutItem obj) { | 269 static bool shouldSkipCreatingRunsForObject(LineLayoutItem obj) { |
268 return obj.isFloating() || (obj.isOutOfFlowPositioned() && | 270 return obj.isFloating() || |
269 !obj.style()->isOriginalDisplayInlineType() && | 271 (obj.isOutOfFlowPositioned() && |
270 !obj.container().isLayoutInline()); | 272 !obj.style()->isOriginalDisplayInlineType() && |
| 273 !obj.container().isLayoutInline()); |
271 } | 274 } |
272 | 275 |
273 LayoutMultiColumnFlowThread* multiColumnFlowThread() const { | 276 LayoutMultiColumnFlowThread* multiColumnFlowThread() const { |
274 return m_rareData ? m_rareData->m_multiColumnFlowThread : 0; | 277 return m_rareData ? m_rareData->m_multiColumnFlowThread : 0; |
275 } | 278 } |
276 void resetMultiColumnFlowThread() { | 279 void resetMultiColumnFlowThread() { |
277 if (m_rareData) | 280 if (m_rareData) |
278 m_rareData->m_multiColumnFlowThread = nullptr; | 281 m_rareData->m_multiColumnFlowThread = nullptr; |
279 } | 282 } |
280 | 283 |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
948 void positionDialog(); | 951 void positionDialog(); |
949 | 952 |
950 // END METHODS DEFINED IN LayoutBlockFlowLine | 953 // END METHODS DEFINED IN LayoutBlockFlowLine |
951 }; | 954 }; |
952 | 955 |
953 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); | 956 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlockFlow, isLayoutBlockFlow()); |
954 | 957 |
955 } // namespace blink | 958 } // namespace blink |
956 | 959 |
957 #endif // LayoutBlockFlow_h | 960 #endif // LayoutBlockFlow_h |
OLD | NEW |