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

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

Issue 478733002: Rename repaint to paintInvalidation for remaining methods. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/RenderTableSection.cpp ('k') | Source/core/rendering/RenderTheme.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 * (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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 return false; 183 return false;
184 } 184 }
185 185
186 bool RenderText::isWordBreak() const 186 bool RenderText::isWordBreak() const
187 { 187 {
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 paint invalidations 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 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); 198 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
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;
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 LayoutUnit logicalHeight = lastTextBox()->logicalBottomVisualOverflow() - lo gicalTop; 1568 LayoutUnit logicalHeight = lastTextBox()->logicalBottomVisualOverflow() - lo gicalTop;
1569 1569
1570 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); 1570 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight);
1571 if (!style()->isHorizontalWritingMode()) 1571 if (!style()->isHorizontalWritingMode())
1572 rect = rect.transposedRect(); 1572 rect = rect.transposedRect();
1573 return rect; 1573 return rect;
1574 } 1574 }
1575 1575
1576 LayoutRect RenderText::clippedOverflowRectForPaintInvalidation(const RenderLayer ModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInva lidationState) const 1576 LayoutRect RenderText::clippedOverflowRectForPaintInvalidation(const RenderLayer ModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInva lidationState) const
1577 { 1577 {
1578 RenderObject* rendererToRepaint = containingBlock(); 1578 RenderObject* rendererToIssuePaintInvalidations = containingBlock();
1579 1579
1580 // Do not cross self-painting layer boundaries. 1580 // Do not cross self-painting layer boundaries.
1581 RenderObject* enclosingLayerRenderer = enclosingLayer()->renderer(); 1581 RenderObject* enclosingLayerRenderer = enclosingLayer()->renderer();
1582 if (enclosingLayerRenderer != rendererToRepaint && !rendererToRepaint->isDes cendantOf(enclosingLayerRenderer)) 1582 if (enclosingLayerRenderer != rendererToIssuePaintInvalidations && !renderer ToIssuePaintInvalidations->isDescendantOf(enclosingLayerRenderer))
1583 rendererToRepaint = enclosingLayerRenderer; 1583 rendererToIssuePaintInvalidations = enclosingLayerRenderer;
1584 1584
1585 // The renderer we chose to repaint may be an ancestor of paintInvalidationC ontainer, but we need to do a paintInvalidationContainer-relative repaint. 1585 // The renderer we chose to issue paint invalidations may be an ancestor of paintInvalidationContainer, but we need to do a paintInvalidationContainer-relat ive paint invalidation.
1586 if (paintInvalidationContainer && paintInvalidationContainer != rendererToRe paint && !rendererToRepaint->isDescendantOf(paintInvalidationContainer)) 1586 if (paintInvalidationContainer && paintInvalidationContainer != rendererToIs suePaintInvalidations && !rendererToIssuePaintInvalidations->isDescendantOf(pain tInvalidationContainer))
1587 return paintInvalidationContainer->clippedOverflowRectForPaintInvalidati on(paintInvalidationContainer, paintInvalidationState); 1587 return paintInvalidationContainer->clippedOverflowRectForPaintInvalidati on(paintInvalidationContainer, paintInvalidationState);
1588 1588
1589 return rendererToRepaint->clippedOverflowRectForPaintInvalidation(paintInval idationContainer, paintInvalidationState); 1589 return rendererToIssuePaintInvalidations->clippedOverflowRectForPaintInvalid ation(paintInvalidationContainer, paintInvalidationState);
1590 } 1590 }
1591 1591
1592 LayoutRect RenderText::selectionRectForPaintInvalidation(const RenderLayerModelO bject* paintInvalidationContainer, bool clipToVisibleContent) 1592 LayoutRect RenderText::selectionRectForPaintInvalidation(const RenderLayerModelO bject* paintInvalidationContainer, bool clipToVisibleContent)
1593 { 1593 {
1594 ASSERT(!needsLayout()); 1594 ASSERT(!needsLayout());
1595 1595
1596 if (selectionState() == SelectionNone) 1596 if (selectionState() == SelectionNone)
1597 return LayoutRect(); 1597 return LayoutRect();
1598 RenderBlock* cb = containingBlock(); 1598 RenderBlock* cb = containingBlock();
1599 if (!cb) 1599 if (!cb)
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1872 } 1872 }
1873 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); 1873 secureTextTimer->restartWithNewText(lastTypedCharacterOffset);
1874 } 1874 }
1875 1875
1876 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() 1876 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox()
1877 { 1877 {
1878 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); 1878 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox);
1879 } 1879 }
1880 1880
1881 } // namespace blink 1881 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTableSection.cpp ('k') | Source/core/rendering/RenderTheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698