OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
3 * (C) 2008 Torch Mobile Inc. All rights reserved. | 3 * (C) 2008 Torch Mobile Inc. All rights reserved. |
4 * (http://www.torchmobile.com/) | 4 * (http://www.torchmobile.com/) |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 void LayoutTextControl::computeLogicalHeight( | 114 void LayoutTextControl::computeLogicalHeight( |
115 LayoutUnit logicalHeight, | 115 LayoutUnit logicalHeight, |
116 LayoutUnit logicalTop, | 116 LayoutUnit logicalTop, |
117 LogicalExtentComputedValues& computedValues) const { | 117 LogicalExtentComputedValues& computedValues) const { |
118 HTMLElement* innerEditor = innerEditorElement(); | 118 HTMLElement* innerEditor = innerEditorElement(); |
119 ASSERT(innerEditor); | 119 ASSERT(innerEditor); |
120 if (LayoutBox* innerEditorBox = innerEditor->layoutBox()) { | 120 if (LayoutBox* innerEditorBox = innerEditor->layoutBox()) { |
121 LayoutUnit nonContentHeight = innerEditorBox->borderAndPaddingHeight() + | 121 LayoutUnit nonContentHeight = innerEditorBox->borderAndPaddingHeight() + |
122 innerEditorBox->marginHeight(); | 122 innerEditorBox->marginHeight(); |
123 logicalHeight = computeControlLogicalHeight( | 123 logicalHeight = computeControlLogicalHeight( |
124 innerEditorBox->lineHeight(true, HorizontalLine, | 124 lineHeight(true, HorizontalLine, PositionOfInteriorLineBoxes), |
125 PositionOfInteriorLineBoxes), | |
126 nonContentHeight); | 125 nonContentHeight); |
127 | 126 |
128 // We are able to have a horizontal scrollbar if the overflow style is | 127 // We are able to have a horizontal scrollbar if the overflow style is |
129 // scroll, or if its auto and there's no word wrap. | 128 // scroll, or if its auto and there's no word wrap. |
130 if (style()->overflowInlineDirection() == EOverflow::Scroll || | 129 if (style()->overflowInlineDirection() == EOverflow::Scroll || |
131 (style()->overflowInlineDirection() == EOverflow::Auto && | 130 (style()->overflowInlineDirection() == EOverflow::Auto && |
132 innerEditor->layoutObject()->style()->overflowWrap() == | 131 innerEditor->layoutObject()->style()->overflowWrap() == |
133 NormalOverflowWrap)) | 132 NormalOverflowWrap)) |
134 logicalHeight += scrollbarThickness(); | 133 logicalHeight += scrollbarThickness(); |
135 | 134 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 LayoutUnit baseline(fontData->getFontMetrics().ascent(AlphabeticBaseline)); | 352 LayoutUnit baseline(fontData->getFontMetrics().ascent(AlphabeticBaseline)); |
354 for (LayoutObject* box = innerEditorLayoutObject; box && box != this; | 353 for (LayoutObject* box = innerEditorLayoutObject; box && box != this; |
355 box = box->parent()) { | 354 box = box->parent()) { |
356 if (box->isBox()) | 355 if (box->isBox()) |
357 baseline += toLayoutBox(box)->logicalTop(); | 356 baseline += toLayoutBox(box)->logicalTop(); |
358 } | 357 } |
359 return baseline.toInt(); | 358 return baseline.toInt(); |
360 } | 359 } |
361 | 360 |
362 } // namespace blink | 361 } // namespace blink |
OLD | NEW |