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

Unified Diff: Source/core/rendering/RenderView.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | Source/core/rendering/RenderWidget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderView.cpp
diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp
index 8397a6aa3252a91e0f030360341048b7f396cf6f..4e82b3293843666b51d6239e608faa56946e2f1b 100644
--- a/Source/core/rendering/RenderView.cpp
+++ b/Source/core/rendering/RenderView.cpp
@@ -269,11 +269,11 @@ void RenderView::layout()
clearNeedsLayout();
}
-void RenderView::mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const
+void RenderView::mapLocalToContainer(const RenderLayerModelObject* paintInvalidationContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const
{
ASSERT_UNUSED(wasFixed, !wasFixed || *wasFixed == static_cast<bool>(mode & IsFixed));
- if (!repaintContainer && mode & UseTransforms && shouldUseTransformFromContainer(0)) {
+ if (!paintInvalidationContainer && mode & UseTransforms && shouldUseTransformFromContainer(0)) {
TransformationMatrix t;
getTransformFromContainer(0, LayoutSize(), t);
transformState.applyTransform(t);
@@ -282,7 +282,7 @@ void RenderView::mapLocalToContainer(const RenderLayerModelObject* repaintContai
if (mode & IsFixed && m_frameView)
transformState.move(m_frameView->scrollOffsetForFixedPosition());
- if (repaintContainer == this)
+ if (paintInvalidationContainer == this)
return;
if (mode & TraverseDocumentBoundaries) {
@@ -290,14 +290,14 @@ void RenderView::mapLocalToContainer(const RenderLayerModelObject* repaintContai
transformState.move(-frame()->view()->scrollOffset());
if (parentDocRenderer->isBox())
transformState.move(toLayoutSize(toRenderBox(parentDocRenderer)->contentBoxRect().location()));
- parentDocRenderer->mapLocalToContainer(repaintContainer, transformState, mode, wasFixed, paintInvalidationState);
+ parentDocRenderer->mapLocalToContainer(paintInvalidationContainer, transformState, mode, wasFixed, paintInvalidationState);
return;
}
}
// If a container was specified, and was not 0 or the RenderView,
// then we should have found it by now.
- ASSERT_ARG(repaintContainer, !repaintContainer);
+ ASSERT_ARG(paintInvalidationContainer, !paintInvalidationContainer);
}
const RenderObject* RenderView::pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const
@@ -436,8 +436,8 @@ void RenderView::invalidateTreeIfNeeded(const PaintInvalidationState& paintInval
{
ASSERT(!needsLayout());
- // We specifically need to repaint the viewRect since other renderers
- // short-circuit on full-repaint.
+ // We specifically need to issue paint invalidations for the viewRect since other renderers
+ // short-circuit on full-paint invalidation.
if (doingFullPaintInvalidation() && !viewRect().isEmpty())
invalidatePaintForRectangle(viewRect());
@@ -455,7 +455,7 @@ void RenderView::invalidatePaintForRectangle(const LayoutRect& paintInvalidation
// or even invisible.
Element* owner = document().ownerElement();
if (layer()->compositingState() == PaintsIntoOwnBacking) {
- layer()->paintInvalidator().setBackingNeedsRepaintInRect(paintInvalidationRect);
+ layer()->paintInvalidator().setBackingNeedsPaintInvalidationInRect(paintInvalidationRect);
} else if (!owner) {
m_frameView->contentRectangleForPaintInvalidation(pixelSnappedIntRect(paintInvalidationRect));
} else if (RenderBox* obj = owner->renderBox()) {
@@ -566,7 +566,7 @@ IntRect RenderView::selectionBounds(bool clipToVisibleContent) const
RenderSelectionInfo* info = i->value.get();
// RenderSelectionInfo::rect() is in the coordinates of the paintInvalidationContainer, so map to page coordinates.
LayoutRect currRect = info->rect();
- if (const RenderLayerModelObject* paintInvalidationContainer = info->repaintContainer()) {
+ if (const RenderLayerModelObject* paintInvalidationContainer = info->paintInvalidationContainer()) {
FloatQuad absQuad = paintInvalidationContainer->localToAbsoluteQuad(FloatRect(currRect));
currRect = absQuad.enclosingBoundingBox();
}
@@ -586,13 +586,13 @@ void RenderView::invalidatePaintForSelection() const
if (o->selectionState() == SelectionNone)
continue;
- RenderSelectionInfo(o, true).repaint();
+ RenderSelectionInfo(o, true).invalidatePaint();
// Blocks are responsible for painting line gaps and margin gaps. They must be examined as well.
for (RenderBlock* block = o->containingBlock(); block && !block->isRenderView(); block = block->containingBlock()) {
if (!processedBlocks.add(block).isNewEntry)
break;
- RenderSelectionInfo(block, true).repaint();
+ RenderSelectionInfo(block, true).invalidatePaint();
}
}
}
@@ -618,7 +618,7 @@ static inline RenderObject* getNextOrPrevRenderObjectBasedOnDirection(const Rend
return next;
}
-void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* end, int endPos, SelectionRepaintMode blockRepaintMode)
+void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* end, int endPos, SelectionPaintInvalidationMode blockPaintInvalidationMode)
{
// This code makes no assumptions as to if the rendering tree is up to date or not
// and will not try to update it. Currently clearSelection calls this
@@ -646,7 +646,7 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
SelectedObjectMap newSelectedObjects;
// Blocks contain selected objects and fill gaps between them, either on the left, right, or in between lines and blocks.
- // In order to get the repaint rect right, we have to examine left, middle, and right rects individually, since otherwise
+ // In order to get the paint invalidation rect right, we have to examine left, middle, and right rects individually, since otherwise
// the union of those rects might remain the same even when changes have occurred.
typedef WillBeHeapHashMap<RawPtrWillBeMember<RenderBlock>, OwnPtrWillBeMember<RenderBlockSelectionInfo> > SelectedBlockMap;
SelectedBlockMap oldSelectedBlocks;
@@ -660,7 +660,7 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
if ((os->canBeSelectionLeaf() || os == m_selectionStart || os == m_selectionEnd) && os->selectionState() != SelectionNone) {
// Blocks are responsible for painting line gaps and margin gaps. They must be examined as well.
oldSelectedObjects.set(os, adoptPtrWillBeNoop(new RenderSelectionInfo(os, true)));
- if (blockRepaintMode == RepaintNewXOROld) {
+ if (blockPaintInvalidationMode == PaintInvalidationNewXOROld) {
RenderBlock* cb = os->containingBlock();
while (cb && !cb->isRenderView()) {
OwnPtrWillBeMember<RenderBlockSelectionInfo>& blockInfo = oldSelectedBlocks.add(cb, nullptr).storedValue->value;
@@ -705,7 +705,7 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
o = o->nextInPreOrder();
}
- if (blockRepaintMode != RepaintNothing)
+ if (blockPaintInvalidationMode != PaintInvalidationNothing)
layer()->clearBlockSelectionGapsBounds();
// Now that the selection state has been updated for the new objects, walk them again and
@@ -729,7 +729,7 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
o = getNextOrPrevRenderObjectBasedOnDirection(o, stop, continueExploring, exploringBackwards);
}
- if (!m_frameView || blockRepaintMode == RepaintNothing)
+ if (!m_frameView || blockPaintInvalidationMode == PaintInvalidationNothing)
return;
// Have any of the old selected objects changed compared to the new selection?
@@ -740,9 +740,9 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
if (!newInfo || oldInfo->rect() != newInfo->rect() || oldInfo->state() != newInfo->state() ||
(m_selectionStart == obj && oldStartPos != m_selectionStartPos) ||
(m_selectionEnd == obj && oldEndPos != m_selectionEndPos)) {
- oldInfo->repaint();
+ oldInfo->invalidatePaint();
if (newInfo) {
- newInfo->repaint();
+ newInfo->invalidatePaint();
newSelectedObjects.remove(obj);
}
}
@@ -751,7 +751,7 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
// Any new objects that remain were not found in the old objects dict, and so they need to be updated.
SelectedObjectMap::iterator newObjectsEnd = newSelectedObjects.end();
for (SelectedObjectMap::iterator i = newSelectedObjects.begin(); i != newObjectsEnd; ++i)
- i->value->repaint();
+ i->value->invalidatePaint();
// Have any of the old blocks changed?
SelectedBlockMap::iterator oldBlocksEnd = oldSelectedBlocks.end();
@@ -760,9 +760,9 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
RenderBlockSelectionInfo* newInfo = newSelectedBlocks.get(block);
RenderBlockSelectionInfo* oldInfo = i->value.get();
if (!newInfo || oldInfo->rects() != newInfo->rects() || oldInfo->state() != newInfo->state()) {
- oldInfo->repaint();
+ oldInfo->invalidatePaint();
if (newInfo) {
- newInfo->repaint();
+ newInfo->invalidatePaint();
newSelectedBlocks.remove(block);
}
}
@@ -771,7 +771,7 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
// Any new blocks that remain were not found in the old blocks dict, and so they need to be updated.
SelectedBlockMap::iterator newBlocksEnd = newSelectedBlocks.end();
for (SelectedBlockMap::iterator i = newSelectedBlocks.begin(); i != newBlocksEnd; ++i)
- i->value->repaint();
+ i->value->invalidatePaint();
}
void RenderView::getSelection(RenderObject*& startRenderer, int& startOffset, RenderObject*& endRenderer, int& endOffset) const
@@ -785,7 +785,7 @@ void RenderView::getSelection(RenderObject*& startRenderer, int& startOffset, Re
void RenderView::clearSelection()
{
layer()->invalidatePaintForBlockSelectionGaps();
- setSelection(0, -1, 0, -1, RepaintNewMinusOld);
+ setSelection(0, -1, 0, -1, PaintInvalidationNewMinusOld);
}
void RenderView::selectionStartEnd(int& startPos, int& endPos) const
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | Source/core/rendering/RenderWidget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698