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

Unified Diff: sky/engine/core/rendering/RenderBlock.cpp

Issue 851593002: Delete RenderSelectionInfo and other selection rect paint invalidation code. (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 side-by-side diff with in-line comments
Download patch
Index: sky/engine/core/rendering/RenderBlock.cpp
diff --git a/sky/engine/core/rendering/RenderBlock.cpp b/sky/engine/core/rendering/RenderBlock.cpp
index c9fac7381efcf99232c086f01c2cbcf0d1a80674..00cc6d52759375f5e59cdeeb057a343f4c8bf3cc 100644
--- a/sky/engine/core/rendering/RenderBlock.cpp
+++ b/sky/engine/core/rendering/RenderBlock.cpp
@@ -704,7 +704,7 @@ bool RenderBlock::isSelectionRoot() const
return false;
}
-GapRects RenderBlock::selectionGapRectsForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer)
+LayoutRect RenderBlock::selectionRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, bool)
{
ASSERT(!needsLayout());
@@ -733,18 +733,10 @@ void RenderBlock::paintSelection(PaintInfo& paintInfo, const LayoutPoint& paintO
LayoutUnit lastRight = logicalRightSelectionOffset(this, lastTop);
GraphicsContextStateSaver stateSaver(*paintInfo.context);
- LayoutRect gapRectsBounds = selectionGaps(this, paintOffset, LayoutSize(), lastTop, lastLeft, lastRight, &paintInfo);
- if (!gapRectsBounds.isEmpty()) {
- RenderLayer* layer = enclosingLayer();
- gapRectsBounds.moveBy(-paintOffset);
- if (!hasLayer()) {
- LayoutRect localBounds(gapRectsBounds);
- gapRectsBounds = localToContainerQuad(FloatRect(localBounds), layer->renderer()).enclosingBoundingBox();
- if (layer->renderer()->hasOverflowClip())
- gapRectsBounds.move(layer->renderBox()->scrolledContentOffset());
- }
- layer->addBlockSelectionGapsBounds(gapRectsBounds);
- }
+ // TODO(ojan): In sky, we don't use the return value, but we
+ // need this in order to actually paint selection gaps.
+ // We should rename it appropriately.
+ selectionGaps(this, paintOffset, LayoutSize(), lastTop, lastLeft, lastRight, &paintInfo);
}
}

Powered by Google App Engine
This is Rietveld 408576698