OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 LayoutUnit marginLogicalRight() const | 136 LayoutUnit marginLogicalRight() const |
137 { | 137 { |
138 if (!includeLogicalRightEdge()) | 138 if (!includeLogicalRightEdge()) |
139 return LayoutUnit(); | 139 return LayoutUnit(); |
140 return isHorizontal() ? boxModelObject().marginRight() : boxModelObject(
).marginBottom(); | 140 return isHorizontal() ? boxModelObject().marginRight() : boxModelObject(
).marginBottom(); |
141 } | 141 } |
142 int borderLogicalLeft() const | 142 int borderLogicalLeft() const |
143 { | 143 { |
144 if (!includeLogicalLeftEdge()) | 144 if (!includeLogicalLeftEdge()) |
145 return 0; | 145 return 0; |
146 return isHorizontal() ? lineLayoutItem().style(isFirstLineStyle())->bord
erLeftWidth() : lineLayoutItem().style(isFirstLineStyle())->borderTopWidth(); | 146 return isHorizontal() ? getLineLayoutItem().style(isFirstLineStyle())->b
orderLeftWidth() : getLineLayoutItem().style(isFirstLineStyle())->borderTopWidth
(); |
147 } | 147 } |
148 int borderLogicalRight() const | 148 int borderLogicalRight() const |
149 { | 149 { |
150 if (!includeLogicalRightEdge()) | 150 if (!includeLogicalRightEdge()) |
151 return 0; | 151 return 0; |
152 return isHorizontal() ? lineLayoutItem().style(isFirstLineStyle())->bord
erRightWidth() : lineLayoutItem().style(isFirstLineStyle())->borderBottomWidth()
; | 152 return isHorizontal() ? getLineLayoutItem().style(isFirstLineStyle())->b
orderRightWidth() : getLineLayoutItem().style(isFirstLineStyle())->borderBottomW
idth(); |
153 } | 153 } |
154 int paddingLogicalLeft() const | 154 int paddingLogicalLeft() const |
155 { | 155 { |
156 if (!includeLogicalLeftEdge()) | 156 if (!includeLogicalLeftEdge()) |
157 return 0; | 157 return 0; |
158 return isHorizontal() ? boxModelObject().paddingLeft() : boxModelObject(
).paddingTop(); | 158 return isHorizontal() ? boxModelObject().paddingLeft() : boxModelObject(
).paddingTop(); |
159 } | 159 } |
160 int paddingLogicalRight() const | 160 int paddingLogicalRight() const |
161 { | 161 { |
162 if (!includeLogicalRightEdge()) | 162 if (!includeLogicalRightEdge()) |
(...skipping 20 matching lines...) Expand all Loading... |
183 void flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lineBottom); | 183 void flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lineBottom); |
184 FontBaseline dominantBaseline() const; | 184 FontBaseline dominantBaseline() const; |
185 | 185 |
186 LayoutUnit computeOverAnnotationAdjustment(LayoutUnit allowedPosition) const
; | 186 LayoutUnit computeOverAnnotationAdjustment(LayoutUnit allowedPosition) const
; |
187 LayoutUnit computeUnderAnnotationAdjustment(LayoutUnit allowedPosition) cons
t; | 187 LayoutUnit computeUnderAnnotationAdjustment(LayoutUnit allowedPosition) cons
t; |
188 | 188 |
189 void computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, GlyphOverflo
wAndFallbackFontsMap&); | 189 void computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, GlyphOverflo
wAndFallbackFontsMap&); |
190 | 190 |
191 void removeChild(InlineBox* child, MarkLineBoxes); | 191 void removeChild(InlineBox* child, MarkLineBoxes); |
192 | 192 |
193 SelectionState selectionState() const override; | 193 SelectionState getSelectionState() const override; |
194 | 194 |
195 bool canAccommodateEllipsis(bool ltr, int blockEdge, int ellipsisWidth) cons
t final; | 195 bool canAccommodateEllipsis(bool ltr, int blockEdge, int ellipsisWidth) cons
t final; |
196 LayoutUnit placeEllipsisBox(bool ltr, LayoutUnit blockLeftEdge, LayoutUnit b
lockRightEdge, LayoutUnit ellipsisWidth, LayoutUnit &truncatedWidth, bool&) over
ride; | 196 LayoutUnit placeEllipsisBox(bool ltr, LayoutUnit blockLeftEdge, LayoutUnit b
lockRightEdge, LayoutUnit ellipsisWidth, LayoutUnit &truncatedWidth, bool&) over
ride; |
197 | 197 |
198 bool hasTextChildren() const { return m_hasTextChildren; } | 198 bool hasTextChildren() const { return m_hasTextChildren; } |
199 bool hasTextDescendants() const { return m_hasTextDescendants; } | 199 bool hasTextDescendants() const { return m_hasTextDescendants; } |
200 void setHasTextDescendants() { m_hasTextDescendants = true; } | 200 void setHasTextDescendants() { m_hasTextDescendants = true; } |
201 | 201 |
202 void checkConsistency() const; | 202 void checkConsistency() const; |
203 void setHasBadChildList(); | 203 void setHasBadChildList(); |
(...skipping 13 matching lines...) Expand all Loading... |
217 } | 217 } |
218 LayoutUnit logicalBottomLayoutOverflow(LayoutUnit lineBottom) const | 218 LayoutUnit logicalBottomLayoutOverflow(LayoutUnit lineBottom) const |
219 { | 219 { |
220 if (m_overflow) | 220 if (m_overflow) |
221 return isHorizontal() ? m_overflow->layoutOverflowRect().maxY() : m_
overflow->layoutOverflowRect().maxX(); | 221 return isHorizontal() ? m_overflow->layoutOverflowRect().maxY() : m_
overflow->layoutOverflowRect().maxX(); |
222 return lineBottom; | 222 return lineBottom; |
223 } | 223 } |
224 LayoutRect logicalLayoutOverflowRect(LayoutUnit lineTop, LayoutUnit lineBott
om) const | 224 LayoutRect logicalLayoutOverflowRect(LayoutUnit lineTop, LayoutUnit lineBott
om) const |
225 { | 225 { |
226 LayoutRect result = layoutOverflowRect(lineTop, lineBottom); | 226 LayoutRect result = layoutOverflowRect(lineTop, lineBottom); |
227 if (!lineLayoutItem().isHorizontalWritingMode()) | 227 if (!getLineLayoutItem().isHorizontalWritingMode()) |
228 result = result.transposedRect(); | 228 result = result.transposedRect(); |
229 return result; | 229 return result; |
230 } | 230 } |
231 | 231 |
232 LayoutRect visualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) con
st | 232 LayoutRect visualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) con
st |
233 { | 233 { |
234 return m_overflow ? m_overflow->visualOverflowRect() : frameRectIncludin
gLineHeight(lineTop, lineBottom); | 234 return m_overflow ? m_overflow->visualOverflowRect() : frameRectIncludin
gLineHeight(lineTop, lineBottom); |
235 } | 235 } |
236 LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizo
ntal() ? m_overflow->visualOverflowRect().x() : m_overflow->visualOverflowRect()
.y()) : logicalLeft(); } | 236 LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizo
ntal() ? m_overflow->visualOverflowRect().x() : m_overflow->visualOverflowRect()
.y()) : logicalLeft(); } |
237 LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHoriz
ontal() ? m_overflow->visualOverflowRect().maxX() : m_overflow->visualOverflowRe
ct().maxY()) : static_cast<LayoutUnit>(logicalRight().ceil()); } | 237 LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHoriz
ontal() ? m_overflow->visualOverflowRect().maxX() : m_overflow->visualOverflowRe
ct().maxY()) : static_cast<LayoutUnit>(logicalRight().ceil()); } |
238 LayoutUnit logicalTopVisualOverflow(LayoutUnit lineTop) const | 238 LayoutUnit logicalTopVisualOverflow(LayoutUnit lineTop) const |
239 { | 239 { |
240 if (m_overflow) | 240 if (m_overflow) |
241 return isHorizontal() ? m_overflow->visualOverflowRect().y() : m_ove
rflow->visualOverflowRect().x(); | 241 return isHorizontal() ? m_overflow->visualOverflowRect().y() : m_ove
rflow->visualOverflowRect().x(); |
242 return lineTop; | 242 return lineTop; |
243 } | 243 } |
244 LayoutUnit logicalBottomVisualOverflow(LayoutUnit lineBottom) const | 244 LayoutUnit logicalBottomVisualOverflow(LayoutUnit lineBottom) const |
245 { | 245 { |
246 if (m_overflow) | 246 if (m_overflow) |
247 return isHorizontal() ? m_overflow->visualOverflowRect().maxY() : m_
overflow->visualOverflowRect().maxX(); | 247 return isHorizontal() ? m_overflow->visualOverflowRect().maxY() : m_
overflow->visualOverflowRect().maxX(); |
248 return lineBottom; | 248 return lineBottom; |
249 } | 249 } |
250 LayoutRect logicalVisualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBott
om) const | 250 LayoutRect logicalVisualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBott
om) const |
251 { | 251 { |
252 LayoutRect result = visualOverflowRect(lineTop, lineBottom); | 252 LayoutRect result = visualOverflowRect(lineTop, lineBottom); |
253 if (!lineLayoutItem().isHorizontalWritingMode()) | 253 if (!getLineLayoutItem().isHorizontalWritingMode()) |
254 result = result.transposedRect(); | 254 result = result.transposedRect(); |
255 return result; | 255 return result; |
256 } | 256 } |
257 | 257 |
258 LayoutRect frameRectIncludingLineHeight(LayoutUnit lineTop, LayoutUnit lineB
ottom) const | 258 LayoutRect frameRectIncludingLineHeight(LayoutUnit lineTop, LayoutUnit lineB
ottom) const |
259 { | 259 { |
260 if (isHorizontal()) | 260 if (isHorizontal()) |
261 return LayoutRect(m_topLeft.x(), lineTop, width(), lineBottom - line
Top); | 261 return LayoutRect(m_topLeft.x(), lineTop, width(), lineBottom - line
Top); |
262 return LayoutRect(lineTop, m_topLeft.y(), lineBottom - lineTop, height()
); | 262 return LayoutRect(lineTop, m_topLeft.y(), lineBottom - lineTop, height()
); |
263 } | 263 } |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 inline void InlineFlowBox::setHasBadChildList() | 365 inline void InlineFlowBox::setHasBadChildList() |
366 { | 366 { |
367 #if ENABLE(ASSERT) | 367 #if ENABLE(ASSERT) |
368 m_hasBadChildList = true; | 368 m_hasBadChildList = true; |
369 #endif | 369 #endif |
370 } | 370 } |
371 | 371 |
372 } // namespace blink | 372 } // namespace blink |
373 | 373 |
374 #endif // InlineFlowBox_h | 374 #endif // InlineFlowBox_h |
OLD | NEW |