| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 virtual RenderLineBoxList* rendererLineBoxes() const; | 123 virtual RenderLineBoxList* rendererLineBoxes() const; |
| 124 | 124 |
| 125 // logicalLeft = left in a horizontal line and top in a vertical line. | 125 // logicalLeft = left in a horizontal line and top in a vertical line. |
| 126 LayoutUnit marginBorderPaddingLogicalLeft() const { return marginLogicalLeft
() + borderLogicalLeft() + paddingLogicalLeft(); } | 126 LayoutUnit marginBorderPaddingLogicalLeft() const { return marginLogicalLeft
() + borderLogicalLeft() + paddingLogicalLeft(); } |
| 127 LayoutUnit marginBorderPaddingLogicalRight() const { return marginLogicalRig
ht() + borderLogicalRight() + paddingLogicalRight(); } | 127 LayoutUnit marginBorderPaddingLogicalRight() const { return marginLogicalRig
ht() + borderLogicalRight() + paddingLogicalRight(); } |
| 128 LayoutUnit marginLogicalLeft() const | 128 LayoutUnit marginLogicalLeft() const |
| 129 { | 129 { |
| 130 if (!includeLogicalLeftEdge()) | 130 if (!includeLogicalLeftEdge()) |
| 131 return 0; | 131 return 0; |
| 132 return isHorizontal() ? boxModelObject()->marginLeft() : boxModelObject(
)->marginTop(); | 132 return boxModelObject()->marginLeft(); |
| 133 } | 133 } |
| 134 LayoutUnit marginLogicalRight() const | 134 LayoutUnit marginLogicalRight() const |
| 135 { | 135 { |
| 136 if (!includeLogicalRightEdge()) | 136 if (!includeLogicalRightEdge()) |
| 137 return 0; | 137 return 0; |
| 138 return isHorizontal() ? boxModelObject()->marginRight() : boxModelObject
()->marginBottom(); | 138 return boxModelObject()->marginRight(); |
| 139 } | 139 } |
| 140 int borderLogicalLeft() const | 140 int borderLogicalLeft() const |
| 141 { | 141 { |
| 142 if (!includeLogicalLeftEdge()) | 142 if (!includeLogicalLeftEdge()) |
| 143 return 0; | 143 return 0; |
| 144 return isHorizontal() ? renderer().style(isFirstLineStyle())->borderLeft
Width() : renderer().style(isFirstLineStyle())->borderTopWidth(); | 144 return renderer().style(isFirstLineStyle())->borderLeftWidth(); |
| 145 } | 145 } |
| 146 int borderLogicalRight() const | 146 int borderLogicalRight() const |
| 147 { | 147 { |
| 148 if (!includeLogicalRightEdge()) | 148 if (!includeLogicalRightEdge()) |
| 149 return 0; | 149 return 0; |
| 150 return isHorizontal() ? renderer().style(isFirstLineStyle())->borderRigh
tWidth() : renderer().style(isFirstLineStyle())->borderBottomWidth(); | 150 return renderer().style(isFirstLineStyle())->borderRightWidth(); |
| 151 } | 151 } |
| 152 int paddingLogicalLeft() const | 152 int paddingLogicalLeft() const |
| 153 { | 153 { |
| 154 if (!includeLogicalLeftEdge()) | 154 if (!includeLogicalLeftEdge()) |
| 155 return 0; | 155 return 0; |
| 156 return isHorizontal() ? boxModelObject()->paddingLeft() : boxModelObject
()->paddingTop(); | 156 return boxModelObject()->paddingLeft(); |
| 157 } | 157 } |
| 158 int paddingLogicalRight() const | 158 int paddingLogicalRight() const |
| 159 { | 159 { |
| 160 if (!includeLogicalRightEdge()) | 160 if (!includeLogicalRightEdge()) |
| 161 return 0; | 161 return 0; |
| 162 return isHorizontal() ? boxModelObject()->paddingRight() : boxModelObjec
t()->paddingBottom(); | 162 return boxModelObject()->paddingRight(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 bool includeLogicalLeftEdge() const { return m_includeLogicalLeftEdge; } | 165 bool includeLogicalLeftEdge() const { return m_includeLogicalLeftEdge; } |
| 166 bool includeLogicalRightEdge() const { return m_includeLogicalRightEdge; } | 166 bool includeLogicalRightEdge() const { return m_includeLogicalRightEdge; } |
| 167 void setEdges(bool includeLeft, bool includeRight) | 167 void setEdges(bool includeLeft, bool includeRight) |
| 168 { | 168 { |
| 169 m_includeLogicalLeftEdge = includeLeft; | 169 m_includeLogicalLeftEdge = includeLeft; |
| 170 m_includeLogicalRightEdge = includeRight; | 170 m_includeLogicalRightEdge = includeRight; |
| 171 } | 171 } |
| 172 | 172 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 185 } | 185 } |
| 186 | 186 |
| 187 void computeLogicalBoxHeights(RootInlineBox*, LayoutUnit& maxPositionTop, La
youtUnit& maxPositionBottom, | 187 void computeLogicalBoxHeights(RootInlineBox*, LayoutUnit& maxPositionTop, La
youtUnit& maxPositionBottom, |
| 188 int& maxAscent, int& maxDescent, bool& setMaxA
scent, bool& setMaxDescent, | 188 int& maxAscent, int& maxDescent, bool& setMaxA
scent, bool& setMaxDescent, |
| 189 bool strictMode, GlyphOverflowAndFallbackFonts
Map&, FontBaseline, VerticalPositionCache&); | 189 bool strictMode, GlyphOverflowAndFallbackFonts
Map&, FontBaseline, VerticalPositionCache&); |
| 190 void adjustMaxAscentAndDescent(int& maxAscent, int& maxDescent, | 190 void adjustMaxAscentAndDescent(int& maxAscent, int& maxDescent, |
| 191 int maxPositionTop, int maxPositionBottom); | 191 int maxPositionTop, int maxPositionBottom); |
| 192 void placeBoxesInBlockDirection(LayoutUnit logicalTop, LayoutUnit maxHeight,
int maxAscent, bool strictMode, LayoutUnit& lineTop, LayoutUnit& lineBottom, La
youtUnit& selectionBottom, bool& setLineTop, | 192 void placeBoxesInBlockDirection(LayoutUnit logicalTop, LayoutUnit maxHeight,
int maxAscent, bool strictMode, LayoutUnit& lineTop, LayoutUnit& lineBottom, La
youtUnit& selectionBottom, bool& setLineTop, |
| 193 LayoutUnit& lineTopIncludingMargins, LayoutU
nit& lineBottomIncludingMargins, bool& hasAnnotationsBefore, bool& hasAnnotation
sAfter, FontBaseline); | 193 LayoutUnit& lineTopIncludingMargins, LayoutU
nit& lineBottomIncludingMargins, bool& hasAnnotationsBefore, bool& hasAnnotation
sAfter, FontBaseline); |
| 194 void flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lineBottom); | 194 void flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lineBottom); |
| 195 bool requiresIdeographicBaseline(const GlyphOverflowAndFallbackFontsMap&) co
nst; | |
| 196 | 195 |
| 197 LayoutUnit computeOverAnnotationAdjustment(LayoutUnit allowedPosition) const
; | 196 LayoutUnit computeOverAnnotationAdjustment(LayoutUnit allowedPosition) const
; |
| 198 LayoutUnit computeUnderAnnotationAdjustment(LayoutUnit allowedPosition) cons
t; | 197 LayoutUnit computeUnderAnnotationAdjustment(LayoutUnit allowedPosition) cons
t; |
| 199 | 198 |
| 200 void computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, GlyphOverflo
wAndFallbackFontsMap&); | 199 void computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, GlyphOverflo
wAndFallbackFontsMap&); |
| 201 | 200 |
| 202 void removeChild(InlineBox* child, MarkLineBoxes); | 201 void removeChild(InlineBox* child, MarkLineBoxes); |
| 203 | 202 |
| 204 virtual RenderObject::SelectionState selectionState() override; | 203 virtual RenderObject::SelectionState selectionState() override; |
| 205 | 204 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 LayoutRect logicalLayoutOverflowRect(LayoutUnit lineTop, LayoutUnit lineBott
om) const | 243 LayoutRect logicalLayoutOverflowRect(LayoutUnit lineTop, LayoutUnit lineBott
om) const |
| 245 { | 244 { |
| 246 // FIXME(sky): Remove | 245 // FIXME(sky): Remove |
| 247 return layoutOverflowRect(lineTop, lineBottom); | 246 return layoutOverflowRect(lineTop, lineBottom); |
| 248 } | 247 } |
| 249 | 248 |
| 250 LayoutRect visualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) con
st | 249 LayoutRect visualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) con
st |
| 251 { | 250 { |
| 252 return m_overflow ? m_overflow->visualOverflowRect() : enclosingLayoutRe
ct(frameRectIncludingLineHeight(lineTop, lineBottom)); | 251 return m_overflow ? m_overflow->visualOverflowRect() : enclosingLayoutRe
ct(frameRectIncludingLineHeight(lineTop, lineBottom)); |
| 253 } | 252 } |
| 254 LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizo
ntal() ? m_overflow->visualOverflowRect().x() : m_overflow->visualOverflowRect()
.y()) : static_cast<LayoutUnit>(logicalLeft()); } | 253 LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? m_overflo
w->visualOverflowRect().x() : static_cast<LayoutUnit>(logicalLeft()); } |
| 255 LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHoriz
ontal() ? m_overflow->visualOverflowRect().maxX() : m_overflow->visualOverflowRe
ct().maxY()) : static_cast<LayoutUnit>(ceilf(logicalRight())); } | 254 LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? m_overfl
ow->visualOverflowRect().maxX() : static_cast<LayoutUnit>(ceilf(logicalRight()))
; } |
| 256 LayoutUnit logicalTopVisualOverflow(LayoutUnit lineTop) const | 255 LayoutUnit logicalTopVisualOverflow(LayoutUnit lineTop) const |
| 257 { | 256 { |
| 258 if (m_overflow) | 257 if (m_overflow) |
| 259 return isHorizontal() ? m_overflow->visualOverflowRect().y() : m_ove
rflow->visualOverflowRect().x(); | 258 return m_overflow->visualOverflowRect().y(); |
| 260 return lineTop; | 259 return lineTop; |
| 261 } | 260 } |
| 262 LayoutUnit logicalBottomVisualOverflow(LayoutUnit lineBottom) const | 261 LayoutUnit logicalBottomVisualOverflow(LayoutUnit lineBottom) const |
| 263 { | 262 { |
| 264 if (m_overflow) | 263 if (m_overflow) |
| 265 return isHorizontal() ? m_overflow->visualOverflowRect().maxY() : m_
overflow->visualOverflowRect().maxX(); | 264 return m_overflow->visualOverflowRect().maxY(); |
| 266 return lineBottom; | 265 return lineBottom; |
| 267 } | 266 } |
| 268 LayoutRect logicalVisualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBott
om) const | 267 LayoutRect logicalVisualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBott
om) const |
| 269 { | 268 { |
| 270 return visualOverflowRect(lineTop, lineBottom); | 269 return visualOverflowRect(lineTop, lineBottom); |
| 271 } | 270 } |
| 272 | 271 |
| 273 void setOverflowFromLogicalRects(const LayoutRect& logicalLayoutOverflow, co
nst LayoutRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom
); | 272 void setOverflowFromLogicalRects(const LayoutRect& logicalLayoutOverflow, co
nst LayoutRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom
); |
| 274 | 273 |
| 275 FloatRect frameRectIncludingLineHeight(LayoutUnit lineTop, LayoutUnit lineBo
ttom) const | 274 FloatRect frameRectIncludingLineHeight(LayoutUnit lineTop, LayoutUnit lineBo
ttom) const |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 } | 365 } |
| 367 | 366 |
| 368 } // namespace blink | 367 } // namespace blink |
| 369 | 368 |
| 370 #ifndef NDEBUG | 369 #ifndef NDEBUG |
| 371 // Outside the WebCore namespace for ease of invocation from gdb. | 370 // Outside the WebCore namespace for ease of invocation from gdb. |
| 372 void showTree(const blink::InlineFlowBox*); | 371 void showTree(const blink::InlineFlowBox*); |
| 373 #endif | 372 #endif |
| 374 | 373 |
| 375 #endif // InlineFlowBox_h | 374 #endif // InlineFlowBox_h |
| OLD | NEW |