| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 void LayoutTextControl::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUni
t logicalTop, LogicalExtentComputedValues& computedValues) const | 117 void LayoutTextControl::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUni
t logicalTop, LogicalExtentComputedValues& computedValues) const |
| 118 { | 118 { |
| 119 HTMLElement* innerEditor = innerEditorElement(); | 119 HTMLElement* innerEditor = innerEditorElement(); |
| 120 ASSERT(innerEditor); | 120 ASSERT(innerEditor); |
| 121 if (LayoutBox* innerEditorBox = innerEditor->layoutBox()) { | 121 if (LayoutBox* innerEditorBox = innerEditor->layoutBox()) { |
| 122 LayoutUnit nonContentHeight = innerEditorBox->borderAndPaddingHeight() +
innerEditorBox->marginHeight(); | 122 LayoutUnit nonContentHeight = innerEditorBox->borderAndPaddingHeight() +
innerEditorBox->marginHeight(); |
| 123 logicalHeight = computeControlLogicalHeight(innerEditorBox->lineHeight(t
rue, HorizontalLine, PositionOfInteriorLineBoxes), nonContentHeight); | 123 logicalHeight = computeControlLogicalHeight(innerEditorBox->lineHeight(t
rue, HorizontalLine, PositionOfInteriorLineBoxes), nonContentHeight); |
| 124 | 124 |
| 125 // 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. | 125 // 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. |
| 126 if ((isHorizontalWritingMode() && (style()->overflowX() == OSCROLL || (
style()->overflowX() == OAUTO && innerEditor->layoutObject()->style()->overflowW
rap() == NormalOverflowWrap))) | 126 if ((isHorizontalWritingMode() && (style()->overflowX() == OverflowScrol
l || (style()->overflowX() == OverflowAuto && innerEditor->layoutObject()->styl
e()->overflowWrap() == NormalOverflowWrap))) |
| 127 || (!isHorizontalWritingMode() && (style()->overflowY() == OSCROLL |
| (style()->overflowY() == OAUTO && innerEditor->layoutObject()->style()->overf
lowWrap() == NormalOverflowWrap)))) | 127 || (!isHorizontalWritingMode() && (style()->overflowY() == OverflowS
croll || (style()->overflowY() == OverflowAuto && innerEditor->layoutObject()->
style()->overflowWrap() == NormalOverflowWrap)))) |
| 128 logicalHeight += scrollbarThickness(); | 128 logicalHeight += scrollbarThickness(); |
| 129 | 129 |
| 130 // FIXME: The logical height of the inner text box should have been adde
d before calling computeLogicalHeight to | 130 // FIXME: The logical height of the inner text box should have been adde
d before calling computeLogicalHeight to |
| 131 // avoid this hack. | 131 // avoid this hack. |
| 132 setIntrinsicContentLogicalHeight(logicalHeight); | 132 setIntrinsicContentLogicalHeight(logicalHeight); |
| 133 | 133 |
| 134 logicalHeight += borderAndPaddingHeight(); | 134 logicalHeight += borderAndPaddingHeight(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 LayoutBox::computeLogicalHeight(logicalHeight, logicalTop, computedValues); | 137 LayoutBox::computeLogicalHeight(logicalHeight, logicalTop, computedValues); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 HTMLElement* placeholder = toHTMLTextFormControlElement(node())->placeholder
Element(); | 282 HTMLElement* placeholder = toHTMLTextFormControlElement(node())->placeholder
Element(); |
| 283 LayoutObject* placeholderLayoutObject = placeholder ? placeholder->layoutObj
ect() : nullptr; | 283 LayoutObject* placeholderLayoutObject = placeholder ? placeholder->layoutObj
ect() : nullptr; |
| 284 if (!placeholderLayoutObject) | 284 if (!placeholderLayoutObject) |
| 285 return nullptr; | 285 return nullptr; |
| 286 if (relayoutChildren) | 286 if (relayoutChildren) |
| 287 layoutScope.setChildNeedsLayout(placeholderLayoutObject); | 287 layoutScope.setChildNeedsLayout(placeholderLayoutObject); |
| 288 return placeholderLayoutObject; | 288 return placeholderLayoutObject; |
| 289 } | 289 } |
| 290 | 290 |
| 291 } // namespace blink | 291 } // namespace blink |
| OLD | NEW |