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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 textBlockStyle->setUnicodeBidi(style()->unicodeBidi()); | 93 textBlockStyle->setUnicodeBidi(style()->unicodeBidi()); |
94 | 94 |
95 updateUserModifyProperty(textFormControlElement(), textBlockStyle); | 95 updateUserModifyProperty(textFormControlElement(), textBlockStyle); |
96 } | 96 } |
97 | 97 |
98 int RenderTextControl::textBlockLogicalHeight() const | 98 int RenderTextControl::textBlockLogicalHeight() const |
99 { | 99 { |
100 return logicalHeight() - borderAndPaddingLogicalHeight(); | 100 return logicalHeight() - borderAndPaddingLogicalHeight(); |
101 } | 101 } |
102 | 102 |
103 int RenderTextControl::textBlockLogicalWidth() const | |
104 { | |
105 Element* innerEditor = innerEditorElement(); | |
106 ASSERT(innerEditor); | |
107 | |
108 LayoutUnit unitWidth = logicalWidth() - borderAndPaddingLogicalWidth(); | |
109 if (innerEditor->renderer()) | |
110 unitWidth -= innerEditor->renderBox()->paddingStart() + innerEditor->ren
derBox()->paddingEnd(); | |
111 | |
112 return unitWidth; | |
113 } | |
114 | |
115 void RenderTextControl::updateFromElement() | 103 void RenderTextControl::updateFromElement() |
116 { | 104 { |
117 Element* innerEditor = innerEditorElement(); | 105 Element* innerEditor = innerEditorElement(); |
118 if (innerEditor && innerEditor->renderer()) | 106 if (innerEditor && innerEditor->renderer()) |
119 updateUserModifyProperty(textFormControlElement(), innerEditor->renderer
()->style()); | 107 updateUserModifyProperty(textFormControlElement(), innerEditor->renderer
()->style()); |
120 } | 108 } |
121 | 109 |
122 int RenderTextControl::scrollbarThickness() const | 110 int RenderTextControl::scrollbarThickness() const |
123 { | 111 { |
124 // FIXME: We should get the size of the scrollbar from the RenderTheme inste
ad. | 112 // FIXME: We should get the size of the scrollbar from the RenderTheme inste
ad. |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 HTMLElement* placeholder = toHTMLTextFormControlElement(node())->placeholder
Element(); | 282 HTMLElement* placeholder = toHTMLTextFormControlElement(node())->placeholder
Element(); |
295 RenderObject* placeholderRenderer = placeholder ? placeholder->renderer() :
0; | 283 RenderObject* placeholderRenderer = placeholder ? placeholder->renderer() :
0; |
296 if (!placeholderRenderer) | 284 if (!placeholderRenderer) |
297 return 0; | 285 return 0; |
298 if (relayoutChildren) | 286 if (relayoutChildren) |
299 layoutScope.setChildNeedsLayout(placeholderRenderer); | 287 layoutScope.setChildNeedsLayout(placeholderRenderer); |
300 return placeholderRenderer; | 288 return placeholderRenderer; |
301 } | 289 } |
302 | 290 |
303 } // namespace blink | 291 } // namespace blink |
OLD | NEW |