OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2010 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 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 if (containerRenderer && !containerRenderer->style()->isLeftToRightDirec
tion()) | 174 if (containerRenderer && !containerRenderer->style()->isLeftToRightDirec
tion()) |
175 innerSpinBox->setLogicalLocation(LayoutPoint(-paddingLogicalLeft(),
-paddingBefore())); | 175 innerSpinBox->setLogicalLocation(LayoutPoint(-paddingLogicalLeft(),
-paddingBefore())); |
176 else | 176 else |
177 innerSpinBox->setLogicalLocation(LayoutPoint(parentBox->logicalWidth
() - innerSpinBox->logicalWidth() + paddingLogicalRight(), -paddingBefore())); | 177 innerSpinBox->setLogicalLocation(LayoutPoint(parentBox->logicalWidth
() - innerSpinBox->logicalWidth() + paddingLogicalRight(), -paddingBefore())); |
178 innerSpinBox->setLogicalHeight(logicalHeight() - borderBefore() - border
After()); | 178 innerSpinBox->setLogicalHeight(logicalHeight() - borderBefore() - border
After()); |
179 } | 179 } |
180 | 180 |
181 HTMLElement* placeholderElement = inputElement()->placeholderElement(); | 181 HTMLElement* placeholderElement = inputElement()->placeholderElement(); |
182 if (RenderBox* placeholderBox = placeholderElement ? placeholderElement->ren
derBox() : 0) { | 182 if (RenderBox* placeholderBox = placeholderElement ? placeholderElement->ren
derBox() : 0) { |
183 LayoutSize innerTextSize; | 183 LayoutSize innerTextSize; |
| 184 LayoutRectRecorder placeholderBoxRecorder(*placeholderBox); |
| 185 |
184 if (innerTextRenderer) | 186 if (innerTextRenderer) |
185 innerTextSize = innerTextRenderer->size(); | 187 innerTextSize = innerTextRenderer->size(); |
186 placeholderBox->style()->setWidth(Length(innerTextSize.width() - placeho
lderBox->borderAndPaddingWidth(), Fixed)); | 188 placeholderBox->style()->setWidth(Length(innerTextSize.width() - placeho
lderBox->borderAndPaddingWidth(), Fixed)); |
187 placeholderBox->style()->setHeight(Length(innerTextSize.height() - place
holderBox->borderAndPaddingHeight(), Fixed)); | 189 placeholderBox->style()->setHeight(Length(innerTextSize.height() - place
holderBox->borderAndPaddingHeight(), Fixed)); |
188 bool neededLayout = placeholderBox->needsLayout(); | 190 bool neededLayout = placeholderBox->needsLayout(); |
189 bool placeholderBoxHadLayout = placeholderBox->everHadLayout(); | 191 bool placeholderBoxHadLayout = placeholderBox->everHadLayout(); |
190 placeholderBox->layoutIfNeeded(); | 192 placeholderBox->layoutIfNeeded(); |
191 LayoutPoint textOffset; | 193 LayoutPoint textOffset; |
192 if (innerTextRenderer) | 194 if (innerTextRenderer) |
193 textOffset = innerTextRenderer->location(); | 195 textOffset = innerTextRenderer->location(); |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 if (innerTextElement()) | 432 if (innerTextElement()) |
431 innerTextElement()->setScrollTop(newTop); | 433 innerTextElement()->setScrollTop(newTop); |
432 } | 434 } |
433 | 435 |
434 HTMLInputElement* RenderTextControlSingleLine::inputElement() const | 436 HTMLInputElement* RenderTextControlSingleLine::inputElement() const |
435 { | 437 { |
436 return toHTMLInputElement(node()); | 438 return toHTMLInputElement(node()); |
437 } | 439 } |
438 | 440 |
439 } | 441 } |
OLD | NEW |