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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 void LayoutTextControl::updateFromElement() | 104 void LayoutTextControl::updateFromElement() |
105 { | 105 { |
106 Element* innerEditor = innerEditorElement(); | 106 Element* innerEditor = innerEditorElement(); |
107 if (innerEditor && innerEditor->layoutObject()) | 107 if (innerEditor && innerEditor->layoutObject()) |
108 updateUserModifyProperty(*textFormControlElement(), innerEditor->layoutO
bject()->mutableStyleRef()); | 108 updateUserModifyProperty(*textFormControlElement(), innerEditor->layoutO
bject()->mutableStyleRef()); |
109 } | 109 } |
110 | 110 |
111 int LayoutTextControl::scrollbarThickness() const | 111 int LayoutTextControl::scrollbarThickness() const |
112 { | 112 { |
113 // FIXME: We should get the size of the scrollbar from the LayoutTheme inste
ad. | 113 // FIXME: We should get the size of the scrollbar from the LayoutTheme inste
ad. |
114 return ScrollbarTheme::theme()->scrollbarThickness(); | 114 return ScrollbarTheme::theme().scrollbarThickness(); |
115 } | 115 } |
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 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 HTMLElement* placeholder = toHTMLTextFormControlElement(node())->placeholder
Element(); | 280 HTMLElement* placeholder = toHTMLTextFormControlElement(node())->placeholder
Element(); |
281 LayoutObject* placeholderLayoutObject = placeholder ? placeholder->layoutObj
ect() : nullptr; | 281 LayoutObject* placeholderLayoutObject = placeholder ? placeholder->layoutObj
ect() : nullptr; |
282 if (!placeholderLayoutObject) | 282 if (!placeholderLayoutObject) |
283 return nullptr; | 283 return nullptr; |
284 if (relayoutChildren) | 284 if (relayoutChildren) |
285 layoutScope.setChildNeedsLayout(placeholderLayoutObject); | 285 layoutScope.setChildNeedsLayout(placeholderLayoutObject); |
286 return placeholderLayoutObject; | 286 return placeholderLayoutObject; |
287 } | 287 } |
288 | 288 |
289 } // namespace blink | 289 } // namespace blink |
OLD | NEW |