| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 baselinePosition(IdeographicBaseline)); | 114 baselinePosition(IdeographicBaseline)); |
| 115 } | 115 } |
| 116 #endif | 116 #endif |
| 117 | 117 |
| 118 float InlineBox::logicalHeight() const | 118 float InlineBox::logicalHeight() const |
| 119 { | 119 { |
| 120 if (hasVirtualLogicalHeight()) | 120 if (hasVirtualLogicalHeight()) |
| 121 return virtualLogicalHeight(); | 121 return virtualLogicalHeight(); |
| 122 | 122 |
| 123 if (renderer().isText()) | 123 if (renderer().isText()) |
| 124 return m_bitfields.isText() ? renderer().style(isFirstLineStyle())->font
Metrics().height() : 0; | 124 return m_bitfields.isText() ? renderer().styleOrFirstLineStyle(isFirstLi
neStyle())->fontMetrics().height() : 0; |
| 125 if (renderer().isBox() && parent()) | 125 if (renderer().isBox() && parent()) |
| 126 return isHorizontal() ? toRenderBox(renderer()).height().toFloat() : toR
enderBox(renderer()).width().toFloat(); | 126 return isHorizontal() ? toRenderBox(renderer()).height().toFloat() : toR
enderBox(renderer()).width().toFloat(); |
| 127 | 127 |
| 128 ASSERT(isInlineFlowBox()); | 128 ASSERT(isInlineFlowBox()); |
| 129 RenderBoxModelObject* flowObject = boxModelObject(); | 129 RenderBoxModelObject* flowObject = boxModelObject(); |
| 130 const FontMetrics& fontMetrics = renderer().style(isFirstLineStyle())->fontM
etrics(); | 130 const FontMetrics& fontMetrics = renderer().styleOrFirstLineStyle(isFirstLin
eStyle())->fontMetrics(); |
| 131 float result = fontMetrics.height(); | 131 float result = fontMetrics.height(); |
| 132 if (parent()) | 132 if (parent()) |
| 133 result += flowObject->borderAndPaddingLogicalHeight(); | 133 result += flowObject->borderAndPaddingLogicalHeight(); |
| 134 return result; | 134 return result; |
| 135 } | 135 } |
| 136 | 136 |
| 137 int InlineBox::baselinePosition(FontBaseline baselineType) const | 137 int InlineBox::baselinePosition(FontBaseline baselineType) const |
| 138 { | 138 { |
| 139 return boxModelObject()->baselinePosition(baselineType, m_bitfields.firstLin
e(), isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); | 139 return boxModelObject()->baselinePosition(baselineType, m_bitfields.firstLin
e(), isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); |
| 140 } | 140 } |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 b->showTreeForThis(); | 360 b->showTreeForThis(); |
| 361 } | 361 } |
| 362 | 362 |
| 363 void showLineTree(const WebCore::InlineBox* b) | 363 void showLineTree(const WebCore::InlineBox* b) |
| 364 { | 364 { |
| 365 if (b) | 365 if (b) |
| 366 b->showLineTreeForThis(); | 366 b->showLineTreeForThis(); |
| 367 } | 367 } |
| 368 | 368 |
| 369 #endif | 369 #endif |
| OLD | NEW |