| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 } | 226 } |
| 227 | 227 |
| 228 void LayoutTextControlSingleLine::styleDidChange(StyleDifference diff, const Lay
outStyle* oldStyle) | 228 void LayoutTextControlSingleLine::styleDidChange(StyleDifference diff, const Lay
outStyle* oldStyle) |
| 229 { | 229 { |
| 230 m_desiredInnerEditorLogicalHeight = -1; | 230 m_desiredInnerEditorLogicalHeight = -1; |
| 231 LayoutTextControl::styleDidChange(diff, oldStyle); | 231 LayoutTextControl::styleDidChange(diff, oldStyle); |
| 232 | 232 |
| 233 // We may have set the width and the height in the old style in layout(). | 233 // We may have set the width and the height in the old style in layout(). |
| 234 // Reset them now to avoid getting a spurious layout hint. | 234 // Reset them now to avoid getting a spurious layout hint. |
| 235 Element* viewPort = editingViewPortElement(); | 235 Element* viewPort = editingViewPortElement(); |
| 236 if (LayoutObject* viewPortRenderer = viewPort ? viewPort->renderer() : 0) { | 236 if (LayoutObject* viewPortRenderer = viewPort ? viewPort->layoutObject() : 0
) { |
| 237 viewPortRenderer->style()->setHeight(Length()); | 237 viewPortRenderer->style()->setHeight(Length()); |
| 238 viewPortRenderer->style()->setWidth(Length()); | 238 viewPortRenderer->style()->setWidth(Length()); |
| 239 } | 239 } |
| 240 Element* container = containerElement(); | 240 Element* container = containerElement(); |
| 241 if (LayoutObject* containerRenderer = container ? container->renderer() : 0)
{ | 241 if (LayoutObject* containerRenderer = container ? container->layoutObject()
: 0) { |
| 242 containerRenderer->style()->setHeight(Length()); | 242 containerRenderer->style()->setHeight(Length()); |
| 243 containerRenderer->style()->setWidth(Length()); | 243 containerRenderer->style()->setWidth(Length()); |
| 244 } | 244 } |
| 245 LayoutObject* innerEditorRenderer = innerEditorElement()->renderer(); | 245 LayoutObject* innerEditorRenderer = innerEditorElement()->layoutObject(); |
| 246 if (innerEditorRenderer && diff.needsFullLayout()) | 246 if (innerEditorRenderer && diff.needsFullLayout()) |
| 247 innerEditorRenderer->setNeedsLayoutAndFullPaintInvalidation(); | 247 innerEditorRenderer->setNeedsLayoutAndFullPaintInvalidation(); |
| 248 if (HTMLElement* placeholder = inputElement()->placeholderElement()) | 248 if (HTMLElement* placeholder = inputElement()->placeholderElement()) |
| 249 placeholder->setInlineStyleProperty(CSSPropertyTextOverflow, textShouldB
eTruncated() ? CSSValueEllipsis : CSSValueClip); | 249 placeholder->setInlineStyleProperty(CSSPropertyTextOverflow, textShouldB
eTruncated() ? CSSValueEllipsis : CSSValueClip); |
| 250 setHasOverflowClip(false); | 250 setHasOverflowClip(false); |
| 251 } | 251 } |
| 252 | 252 |
| 253 void LayoutTextControlSingleLine::capsLockStateMayHaveChanged() | 253 void LayoutTextControlSingleLine::capsLockStateMayHaveChanged() |
| 254 { | 254 { |
| 255 if (!node()) | 255 if (!node()) |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 if (innerEditorElement()) | 429 if (innerEditorElement()) |
| 430 innerEditorElement()->setScrollTop(newTop); | 430 innerEditorElement()->setScrollTop(newTop); |
| 431 } | 431 } |
| 432 | 432 |
| 433 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const | 433 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const |
| 434 { | 434 { |
| 435 return toHTMLInputElement(node()); | 435 return toHTMLInputElement(node()); |
| 436 } | 436 } |
| 437 | 437 |
| 438 } | 438 } |
| OLD | NEW |