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

Side by Side Diff: sky/engine/core/rendering/RenderText.cpp

Issue 840483004: Get rid of the *AndFullPaintInvalidation methods. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return "RenderText"; 103 return "RenderText";
104 } 104 }
105 105
106 void RenderText::styleDidChange(StyleDifference diff, const RenderStyle* oldStyl e) 106 void RenderText::styleDidChange(StyleDifference diff, const RenderStyle* oldStyl e)
107 { 107 {
108 // There is no need to ever schedule paint invalidations from a style change of a text run, since 108 // There is no need to ever schedule paint invalidations from a style change of a text run, since
109 // we already did this for the parent of the text run. 109 // we already did this for the parent of the text run.
110 // We do have to schedule layouts, though, since a style change can force us to 110 // We do have to schedule layouts, though, since a style change can force us to
111 // need to relayout. 111 // need to relayout.
112 if (diff.needsFullLayout()) { 112 if (diff.needsFullLayout()) {
113 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); 113 setNeedsLayoutAndPrefWidthsRecalc();
114 m_knownToHaveNoOverflowAndNoFallbackFonts = false; 114 m_knownToHaveNoOverflowAndNoFallbackFonts = false;
115 } 115 }
116 116
117 // This is an optimization that kicks off font load before layout. 117 // This is an optimization that kicks off font load before layout.
118 // In order to make it fast, we only check if the first character of the 118 // In order to make it fast, we only check if the first character of the
119 // text is included in the unicode ranges of the fonts. 119 // text is included in the unicode ranges of the fonts.
120 if (!text().containsOnlyWhitespace()) 120 if (!text().containsOnlyWhitespace())
121 style()->font().willUseFontData(text().characterStartingAt(0)); 121 style()->font().willUseFontData(text().characterStartingAt(0));
122 } 122 }
123 123
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 ASSERT(text); 1202 ASSERT(text);
1203 1203
1204 if (!force && equal(m_text.impl(), text.get())) 1204 if (!force && equal(m_text.impl(), text.get()))
1205 return; 1205 return;
1206 1206
1207 setTextInternal(text); 1207 setTextInternal(text);
1208 // If preferredLogicalWidthsDirty() of an orphan child is true, RenderObject ChildList:: 1208 // If preferredLogicalWidthsDirty() of an orphan child is true, RenderObject ChildList::
1209 // insertChildNode() fails to set true to owner. To avoid that, we call 1209 // insertChildNode() fails to set true to owner. To avoid that, we call
1210 // setNeedsLayoutAndPrefWidthsRecalc() only if this RenderText has parent. 1210 // setNeedsLayoutAndPrefWidthsRecalc() only if this RenderText has parent.
1211 if (parent()) 1211 if (parent())
1212 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); 1212 setNeedsLayoutAndPrefWidthsRecalc();
1213 m_knownToHaveNoOverflowAndNoFallbackFonts = false; 1213 m_knownToHaveNoOverflowAndNoFallbackFonts = false;
1214 } 1214 }
1215 1215
1216 void RenderText::dirtyLineBoxes(bool fullLayout) 1216 void RenderText::dirtyLineBoxes(bool fullLayout)
1217 { 1217 {
1218 if (fullLayout) 1218 if (fullLayout)
1219 deleteTextBoxes(); 1219 deleteTextBoxes();
1220 else if (!m_linesDirty) { 1220 else if (!m_linesDirty) {
1221 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) 1221 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox())
1222 box->dirtyLineBoxes(); 1222 box->dirtyLineBoxes();
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 ASSERT(child->prevTextBox() == prev); 1626 ASSERT(child->prevTextBox() == prev);
1627 prev = child; 1627 prev = child;
1628 } 1628 }
1629 ASSERT(prev == m_lastTextBox); 1629 ASSERT(prev == m_lastTextBox);
1630 #endif 1630 #endif
1631 } 1631 }
1632 1632
1633 #endif 1633 #endif
1634 1634
1635 } // namespace blink 1635 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderReplaced.cpp ('k') | sky/engine/core/rendering/SubtreeLayoutScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698