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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 baselinePosition(AlphabeticBaseline), baselinePosition(IdeographicBaseli
ne)); | 137 baselinePosition(AlphabeticBaseline), baselinePosition(IdeographicBaseli
ne)); |
138 } | 138 } |
139 #endif | 139 #endif |
140 | 140 |
141 LayoutUnit InlineBox::logicalHeight() const | 141 LayoutUnit InlineBox::logicalHeight() const |
142 { | 142 { |
143 if (hasVirtualLogicalHeight()) | 143 if (hasVirtualLogicalHeight()) |
144 return virtualLogicalHeight(); | 144 return virtualLogicalHeight(); |
145 | 145 |
146 if (getLineLayoutItem().isText()) | 146 if (getLineLayoutItem().isText()) |
147 return m_bitfields.isText() ? LayoutUnit(getLineLayoutItem().style(isFir
stLineStyle())->fontMetrics().height()) : LayoutUnit(); | 147 return m_bitfields.isText() ? LayoutUnit(getLineLayoutItem().style(isFir
stLineStyle())->getFontMetrics().height()) : LayoutUnit(); |
148 if (getLineLayoutItem().isBox() && parent()) | 148 if (getLineLayoutItem().isBox() && parent()) |
149 return isHorizontal() ? toLayoutBox(layoutObject()).size().height() : to
LayoutBox(layoutObject()).size().width(); | 149 return isHorizontal() ? toLayoutBox(layoutObject()).size().height() : to
LayoutBox(layoutObject()).size().width(); |
150 | 150 |
151 ASSERT(isInlineFlowBox()); | 151 ASSERT(isInlineFlowBox()); |
152 LineLayoutBoxModel flowObject = boxModelObject(); | 152 LineLayoutBoxModel flowObject = boxModelObject(); |
153 const FontMetrics& fontMetrics = getLineLayoutItem().style(isFirstLineStyle(
))->fontMetrics(); | 153 const FontMetrics& fontMetrics = getLineLayoutItem().style(isFirstLineStyle(
))->getFontMetrics(); |
154 LayoutUnit result(fontMetrics.height()); | 154 LayoutUnit result(fontMetrics.height()); |
155 if (parent()) | 155 if (parent()) |
156 result += flowObject.borderAndPaddingLogicalHeight(); | 156 result += flowObject.borderAndPaddingLogicalHeight(); |
157 return result; | 157 return result; |
158 } | 158 } |
159 | 159 |
160 int InlineBox::baselinePosition(FontBaseline baselineType) const | 160 int InlineBox::baselinePosition(FontBaseline baselineType) const |
161 { | 161 { |
162 return boxModelObject().baselinePosition(baselineType, m_bitfields.firstLine
(), isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); | 162 return boxModelObject().baselinePosition(baselineType, m_bitfields.firstLine
(), isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); |
163 } | 163 } |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 | 411 |
412 void showLineTree(const blink::InlineBox* b) | 412 void showLineTree(const blink::InlineBox* b) |
413 { | 413 { |
414 if (b) | 414 if (b) |
415 b->showLineTreeForThis(); | 415 b->showLineTreeForThis(); |
416 else | 416 else |
417 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); | 417 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); |
418 } | 418 } |
419 | 419 |
420 #endif | 420 #endif |
OLD | NEW |