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

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

Issue 236203020: Separate repaint and layout requirements of StyleDifference (Step 1) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase, Fix break Created 6 years, 8 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
« no previous file with comments | « Source/core/rendering/RenderText.cpp ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 if (RenderObject* viewPortRenderer = viewPort ? viewPort->renderer() : 0) { 234 if (RenderObject* viewPortRenderer = viewPort ? viewPort->renderer() : 0) {
235 viewPortRenderer->style()->setHeight(Length()); 235 viewPortRenderer->style()->setHeight(Length());
236 viewPortRenderer->style()->setWidth(Length()); 236 viewPortRenderer->style()->setWidth(Length());
237 } 237 }
238 Element* container = containerElement(); 238 Element* container = containerElement();
239 if (RenderObject* containerRenderer = container ? container->renderer() : 0) { 239 if (RenderObject* containerRenderer = container ? container->renderer() : 0) {
240 containerRenderer->style()->setHeight(Length()); 240 containerRenderer->style()->setHeight(Length());
241 containerRenderer->style()->setWidth(Length()); 241 containerRenderer->style()->setWidth(Length());
242 } 242 }
243 RenderObject* innerTextRenderer = innerTextElement()->renderer(); 243 RenderObject* innerTextRenderer = innerTextElement()->renderer();
244 if (innerTextRenderer && diff == StyleDifferenceLayout) 244 if (innerTextRenderer && diff.needsFullLayout())
245 innerTextRenderer->setNeedsLayout(); 245 innerTextRenderer->setNeedsLayout();
246 if (HTMLElement* placeholder = inputElement()->placeholderElement()) 246 if (HTMLElement* placeholder = inputElement()->placeholderElement())
247 placeholder->setInlineStyleProperty(CSSPropertyTextOverflow, textShouldB eTruncated() ? CSSValueEllipsis : CSSValueClip); 247 placeholder->setInlineStyleProperty(CSSPropertyTextOverflow, textShouldB eTruncated() ? CSSValueEllipsis : CSSValueClip);
248 setHasOverflowClip(false); 248 setHasOverflowClip(false);
249 } 249 }
250 250
251 void RenderTextControlSingleLine::capsLockStateMayHaveChanged() 251 void RenderTextControlSingleLine::capsLockStateMayHaveChanged()
252 { 252 {
253 if (!node()) 253 if (!node())
254 return; 254 return;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 if (innerTextElement()) 424 if (innerTextElement())
425 innerTextElement()->setScrollTop(newTop); 425 innerTextElement()->setScrollTop(newTop);
426 } 426 }
427 427
428 HTMLInputElement* RenderTextControlSingleLine::inputElement() const 428 HTMLInputElement* RenderTextControlSingleLine::inputElement() const
429 { 429 {
430 return toHTMLInputElement(node()); 430 return toHTMLInputElement(node());
431 } 431 }
432 432
433 } 433 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderText.cpp ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698