| 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. (http://www.torchmo
bile.com/) | 3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // FIXME: We should get the size of the scrollbar from the RenderTheme inste
ad. | 123 // FIXME: We should get the size of the scrollbar from the RenderTheme inste
ad. |
| 124 return ScrollbarTheme::theme()->scrollbarThickness(); | 124 return ScrollbarTheme::theme()->scrollbarThickness(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void RenderTextControl::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUni
t logicalTop, LogicalExtentComputedValues& computedValues) const | 127 void RenderTextControl::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUni
t logicalTop, LogicalExtentComputedValues& computedValues) const |
| 128 { | 128 { |
| 129 HTMLElement* innerEditor = innerEditorElement(); | 129 HTMLElement* innerEditor = innerEditorElement(); |
| 130 ASSERT(innerEditor); | 130 ASSERT(innerEditor); |
| 131 if (RenderBox* innerEditorBox = innerEditor->renderBox()) { | 131 if (RenderBox* innerEditorBox = innerEditor->renderBox()) { |
| 132 LayoutUnit nonContentHeight = innerEditorBox->borderAndPaddingHeight() +
innerEditorBox->marginHeight(); | 132 LayoutUnit nonContentHeight = innerEditorBox->borderAndPaddingHeight() +
innerEditorBox->marginHeight(); |
| 133 logicalHeight = computeControlLogicalHeight(innerEditorBox->lineHeight(t
rue, HorizontalLine, PositionOfInteriorLineBoxes), nonContentHeight); | 133 logicalHeight = computeControlLogicalHeight(innerEditorBox->lineHeight(F
irstLineStyle, HorizontalLine, PositionOfInteriorLineBoxes), nonContentHeight); |
| 134 | 134 |
| 135 // We are able to have a horizontal scrollbar if the overflow style is s
croll, or if its auto and there's no word wrap. | 135 // We are able to have a horizontal scrollbar if the overflow style is s
croll, or if its auto and there's no word wrap. |
| 136 if ((isHorizontalWritingMode() && (style()->overflowX() == OSCROLL || (
style()->overflowX() == OAUTO && innerEditor->renderer()->style()->overflowWrap(
) == NormalOverflowWrap))) | 136 if ((isHorizontalWritingMode() && (style()->overflowX() == OSCROLL || (
style()->overflowX() == OAUTO && innerEditor->renderer()->style()->overflowWrap(
) == NormalOverflowWrap))) |
| 137 || (!isHorizontalWritingMode() && (style()->overflowY() == OSCROLL |
| (style()->overflowY() == OAUTO && innerEditor->renderer()->style()->overflowW
rap() == NormalOverflowWrap)))) | 137 || (!isHorizontalWritingMode() && (style()->overflowY() == OSCROLL |
| (style()->overflowY() == OAUTO && innerEditor->renderer()->style()->overflowW
rap() == NormalOverflowWrap)))) |
| 138 logicalHeight += scrollbarThickness(); | 138 logicalHeight += scrollbarThickness(); |
| 139 | 139 |
| 140 // FIXME: The logical height of the inner text box should have been adde
d before calling computeLogicalHeight to | 140 // FIXME: The logical height of the inner text box should have been adde
d before calling computeLogicalHeight to |
| 141 // avoid this hack. | 141 // avoid this hack. |
| 142 updateIntrinsicContentLogicalHeight(logicalHeight); | 142 updateIntrinsicContentLogicalHeight(logicalHeight); |
| 143 | 143 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 HTMLElement* placeholder = toHTMLTextFormControlElement(node())->placeholder
Element(); | 293 HTMLElement* placeholder = toHTMLTextFormControlElement(node())->placeholder
Element(); |
| 294 RenderObject* placeholderRenderer = placeholder ? placeholder->renderer() :
0; | 294 RenderObject* placeholderRenderer = placeholder ? placeholder->renderer() :
0; |
| 295 if (!placeholderRenderer) | 295 if (!placeholderRenderer) |
| 296 return 0; | 296 return 0; |
| 297 if (relayoutChildren) | 297 if (relayoutChildren) |
| 298 layoutScope.setChildNeedsLayout(placeholderRenderer); | 298 layoutScope.setChildNeedsLayout(placeholderRenderer); |
| 299 return placeholderRenderer; | 299 return placeholderRenderer; |
| 300 } | 300 } |
| 301 | 301 |
| 302 } // namespace WebCore | 302 } // namespace WebCore |
| OLD | NEW |