Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Side by Side Diff: Source/core/rendering/RenderTextControlSingleLine.cpp

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 217 }
218 218
219 void RenderTextControlSingleLine::styleDidChange(StyleDifference diff, const Ren derStyle* oldStyle) 219 void RenderTextControlSingleLine::styleDidChange(StyleDifference diff, const Ren derStyle* oldStyle)
220 { 220 {
221 m_desiredInnerEditorLogicalHeight = -1; 221 m_desiredInnerEditorLogicalHeight = -1;
222 RenderTextControl::styleDidChange(diff, oldStyle); 222 RenderTextControl::styleDidChange(diff, oldStyle);
223 223
224 // We may have set the width and the height in the old style in layout(). 224 // We may have set the width and the height in the old style in layout().
225 // Reset them now to avoid getting a spurious layout hint. 225 // Reset them now to avoid getting a spurious layout hint.
226 Element* viewPort = editingViewPortElement(); 226 Element* viewPort = editingViewPortElement();
227 if (RenderObject* viewPortRenderer = viewPort ? viewPort->renderer() : 0) { 227 if (LayoutObject* viewPortRenderer = viewPort ? viewPort->renderer() : 0) {
228 viewPortRenderer->style()->setHeight(Length()); 228 viewPortRenderer->style()->setHeight(Length());
229 viewPortRenderer->style()->setWidth(Length()); 229 viewPortRenderer->style()->setWidth(Length());
230 } 230 }
231 Element* container = containerElement(); 231 Element* container = containerElement();
232 if (RenderObject* containerRenderer = container ? container->renderer() : 0) { 232 if (LayoutObject* containerRenderer = container ? container->renderer() : 0) {
233 containerRenderer->style()->setHeight(Length()); 233 containerRenderer->style()->setHeight(Length());
234 containerRenderer->style()->setWidth(Length()); 234 containerRenderer->style()->setWidth(Length());
235 } 235 }
236 RenderObject* innerEditorRenderer = innerEditorElement()->renderer(); 236 LayoutObject* innerEditorRenderer = innerEditorElement()->renderer();
237 if (innerEditorRenderer && diff.needsFullLayout()) 237 if (innerEditorRenderer && diff.needsFullLayout())
238 innerEditorRenderer->setNeedsLayoutAndFullPaintInvalidation(); 238 innerEditorRenderer->setNeedsLayoutAndFullPaintInvalidation();
239 if (HTMLElement* placeholder = inputElement()->placeholderElement()) 239 if (HTMLElement* placeholder = inputElement()->placeholderElement())
240 placeholder->setInlineStyleProperty(CSSPropertyTextOverflow, textShouldB eTruncated() ? CSSValueEllipsis : CSSValueClip); 240 placeholder->setInlineStyleProperty(CSSPropertyTextOverflow, textShouldB eTruncated() ? CSSValueEllipsis : CSSValueClip);
241 setHasOverflowClip(false); 241 setHasOverflowClip(false);
242 } 242 }
243 243
244 void RenderTextControlSingleLine::capsLockStateMayHaveChanged() 244 void RenderTextControlSingleLine::capsLockStateMayHaveChanged()
245 { 245 {
246 if (!node()) 246 if (!node())
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 if (innerEditorElement()) 420 if (innerEditorElement())
421 innerEditorElement()->setScrollTop(newTop); 421 innerEditorElement()->setScrollTop(newTop);
422 } 422 }
423 423
424 HTMLInputElement* RenderTextControlSingleLine::inputElement() const 424 HTMLInputElement* RenderTextControlSingleLine::inputElement() const
425 { 425 {
426 return toHTMLInputElement(node()); 426 return toHTMLInputElement(node());
427 } 427 }
428 428
429 } 429 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTextControlSingleLine.h ('k') | Source/core/rendering/RenderTextFragment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698