| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 { | 121 { |
| 122 if (hasVirtualLogicalHeight()) | 122 if (hasVirtualLogicalHeight()) |
| 123 return virtualLogicalHeight(); | 123 return virtualLogicalHeight(); |
| 124 | 124 |
| 125 if (renderer().isText()) | 125 if (renderer().isText()) |
| 126 return m_bitfields.isText() ? FloatWillBeLayoutUnit(renderer().style(isF
irstLineStyle())->fontMetrics().height()) : FloatWillBeLayoutUnit(); | 126 return m_bitfields.isText() ? FloatWillBeLayoutUnit(renderer().style(isF
irstLineStyle())->fontMetrics().height()) : FloatWillBeLayoutUnit(); |
| 127 if (renderer().isBox() && parent()) | 127 if (renderer().isBox() && parent()) |
| 128 return isHorizontal() ? toRenderBox(renderer()).size().height() : toRend
erBox(renderer()).size().width(); | 128 return isHorizontal() ? toRenderBox(renderer()).size().height() : toRend
erBox(renderer()).size().width(); |
| 129 | 129 |
| 130 ASSERT(isInlineFlowBox()); | 130 ASSERT(isInlineFlowBox()); |
| 131 RenderBoxModelObject* flowObject = boxModelObject(); | 131 LayoutBoxModelObject* flowObject = boxModelObject(); |
| 132 const FontMetrics& fontMetrics = renderer().style(isFirstLineStyle())->fontM
etrics(); | 132 const FontMetrics& fontMetrics = renderer().style(isFirstLineStyle())->fontM
etrics(); |
| 133 FloatWillBeLayoutUnit result = fontMetrics.height(); | 133 FloatWillBeLayoutUnit result = fontMetrics.height(); |
| 134 if (parent()) | 134 if (parent()) |
| 135 result += flowObject->borderAndPaddingLogicalHeight(); | 135 result += flowObject->borderAndPaddingLogicalHeight(); |
| 136 return result; | 136 return result; |
| 137 } | 137 } |
| 138 | 138 |
| 139 int InlineBox::baselinePosition(FontBaseline baselineType) const | 139 int InlineBox::baselinePosition(FontBaseline baselineType) const |
| 140 { | 140 { |
| 141 return boxModelObject()->baselinePosition(baselineType, m_bitfields.firstLin
e(), isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); | 141 return boxModelObject()->baselinePosition(baselineType, m_bitfields.firstLin
e(), isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 b->showTreeForThis(); | 358 b->showTreeForThis(); |
| 359 } | 359 } |
| 360 | 360 |
| 361 void showLineTree(const blink::InlineBox* b) | 361 void showLineTree(const blink::InlineBox* b) |
| 362 { | 362 { |
| 363 if (b) | 363 if (b) |
| 364 b->showLineTreeForThis(); | 364 b->showLineTreeForThis(); |
| 365 } | 365 } |
| 366 | 366 |
| 367 #endif | 367 #endif |
| OLD | NEW |