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

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

Issue 280633002: Rename RenderObject::setNeedsLayout to setNeedsLayoutAndFullRepaint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 7 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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 return false; 188 return false;
189 } 189 }
190 190
191 void RenderText::styleDidChange(StyleDifference diff, const RenderStyle* oldStyl e) 191 void RenderText::styleDidChange(StyleDifference diff, const RenderStyle* oldStyl e)
192 { 192 {
193 // There is no need to ever schedule repaints from a style change of a text run, since 193 // There is no need to ever schedule repaints from a style change of a text run, since
194 // we already did this for the parent of the text run. 194 // we already did this for the parent of the text run.
195 // We do have to schedule layouts, though, since a style change can force us to 195 // We do have to schedule layouts, though, since a style change can force us to
196 // need to relayout. 196 // need to relayout.
197 if (diff.needsFullLayout()) { 197 if (diff.needsFullLayout()) {
198 setNeedsLayoutAndPrefWidthsRecalc(); 198 setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint();
199 m_knownToHaveNoOverflowAndNoFallbackFonts = false; 199 m_knownToHaveNoOverflowAndNoFallbackFonts = false;
200 } 200 }
201 201
202 RenderStyle* newStyle = style(); 202 RenderStyle* newStyle = style();
203 ETextTransform oldTransform = oldStyle ? oldStyle->textTransform() : TTNONE; 203 ETextTransform oldTransform = oldStyle ? oldStyle->textTransform() : TTNONE;
204 ETextSecurity oldSecurity = oldStyle ? oldStyle->textSecurity() : TSNONE; 204 ETextSecurity oldSecurity = oldStyle ? oldStyle->textSecurity() : TSNONE;
205 if (oldTransform != newStyle->textTransform() || oldSecurity != newStyle->te xtSecurity()) 205 if (oldTransform != newStyle->textTransform() || oldSecurity != newStyle->te xtSecurity())
206 transformText(); 206 transformText();
207 207
208 // This is an optimization that kicks off font load before layout. 208 // This is an optimization that kicks off font load before layout.
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 ASSERT(text); 1403 ASSERT(text);
1404 1404
1405 if (!force && equal(m_text.impl(), text.get())) 1405 if (!force && equal(m_text.impl(), text.get()))
1406 return; 1406 return;
1407 1407
1408 setTextInternal(text); 1408 setTextInternal(text);
1409 // If preferredLogicalWidthsDirty() of an orphan child is true, RenderObject ChildList:: 1409 // If preferredLogicalWidthsDirty() of an orphan child is true, RenderObject ChildList::
1410 // insertChildNode() fails to set true to owner. To avoid that, we call 1410 // insertChildNode() fails to set true to owner. To avoid that, we call
1411 // setNeedsLayoutAndPrefWidthsRecalc() only if this RenderText has parent. 1411 // setNeedsLayoutAndPrefWidthsRecalc() only if this RenderText has parent.
1412 if (parent()) 1412 if (parent())
1413 setNeedsLayoutAndPrefWidthsRecalc(); 1413 setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint();
1414 m_knownToHaveNoOverflowAndNoFallbackFonts = false; 1414 m_knownToHaveNoOverflowAndNoFallbackFonts = false;
1415 1415
1416 if (AXObjectCache* cache = document().existingAXObjectCache()) 1416 if (AXObjectCache* cache = document().existingAXObjectCache())
1417 cache->textChanged(this); 1417 cache->textChanged(this);
1418 } 1418 }
1419 1419
1420 void RenderText::dirtyLineBoxes(bool fullLayout) 1420 void RenderText::dirtyLineBoxes(bool fullLayout)
1421 { 1421 {
1422 if (fullLayout) 1422 if (fullLayout)
1423 deleteTextBoxes(); 1423 deleteTextBoxes();
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 } 1868 }
1869 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); 1869 secureTextTimer->restartWithNewText(lastTypedCharacterOffset);
1870 } 1870 }
1871 1871
1872 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() 1872 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox()
1873 { 1873 {
1874 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); 1874 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox);
1875 } 1875 }
1876 1876
1877 } // namespace WebCore 1877 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTableSection.cpp ('k') | Source/core/rendering/RenderTextControlSingleLine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698