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

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

Issue 332543002: Rename Repaint to Paint Invalidation Part 4 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/RenderVideo.cpp » ('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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 placeholderBox->layoutIfNeeded(); 181 placeholderBox->layoutIfNeeded();
182 LayoutPoint textOffset; 182 LayoutPoint textOffset;
183 if (innerTextRenderer) 183 if (innerTextRenderer)
184 textOffset = innerTextRenderer->location(); 184 textOffset = innerTextRenderer->location();
185 if (editingViewPortElement() && editingViewPortElement()->renderBox()) 185 if (editingViewPortElement() && editingViewPortElement()->renderBox())
186 textOffset += toLayoutSize(editingViewPortElement()->renderBox()->lo cation()); 186 textOffset += toLayoutSize(editingViewPortElement()->renderBox()->lo cation());
187 if (containerRenderer) 187 if (containerRenderer)
188 textOffset += toLayoutSize(containerRenderer->location()); 188 textOffset += toLayoutSize(containerRenderer->location());
189 placeholderBox->setLocation(textOffset); 189 placeholderBox->setLocation(textOffset);
190 190
191 if (!placeholderBoxHadLayout && placeholderBox->checkForRepaintDuringLay out()) { 191 if (!placeholderBoxHadLayout && placeholderBox->checkForPaintInvalidatio nDuringLayout()) {
192 // This assumes a shadow tree without floats. If floats are added, t he 192 // This assumes a shadow tree without floats. If floats are added, t he
193 // logic should be shared with RenderBlockFlow::layoutBlockChild. 193 // logic should be shared with RenderBlockFlow::layoutBlockChild.
194 placeholderBox->paintInvalidationForWholeRenderer(); 194 placeholderBox->paintInvalidationForWholeRenderer();
195 } 195 }
196 // The placeholder gets layout last, after the parent text control and i ts other children, 196 // The placeholder gets layout last, after the parent text control and i ts other children,
197 // so in order to get the correct overflow from the placeholder we need to recompute it now. 197 // so in order to get the correct overflow from the placeholder we need to recompute it now.
198 if (neededLayout) 198 if (neededLayout)
199 computeOverflow(clientLogicalBottom()); 199 computeOverflow(clientLogicalBottom());
200 } 200 }
201 } 201 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.needsFullLayout()) 244 if (innerTextRenderer && diff.needsFullLayout())
245 innerTextRenderer->setNeedsLayoutAndFullRepaint(); 245 innerTextRenderer->setNeedsLayoutAndFullPaintInvalidation();
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;
255 255
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 if (innerTextElement()) 419 if (innerTextElement())
420 innerTextElement()->setScrollTop(newTop); 420 innerTextElement()->setScrollTop(newTop);
421 } 421 }
422 422
423 HTMLInputElement* RenderTextControlSingleLine::inputElement() const 423 HTMLInputElement* RenderTextControlSingleLine::inputElement() const
424 { 424 {
425 return toHTMLInputElement(node()); 425 return toHTMLInputElement(node());
426 } 426 }
427 427
428 } 428 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderText.cpp ('k') | Source/core/rendering/RenderVideo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698