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

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

Issue 886933002: Remove PaintPhaseSelection. (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
« no previous file with comments | « sky/engine/core/rendering/PaintPhase.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderReplaced.cpp
diff --git a/sky/engine/core/rendering/RenderReplaced.cpp b/sky/engine/core/rendering/RenderReplaced.cpp
index b4c7724a9646babf87d368cc096d66f8020e6e0f..05ac4941bcd58cc57060c1c82d0f06807329f7b5 100644
--- a/sky/engine/core/rendering/RenderReplaced.cpp
+++ b/sky/engine/core/rendering/RenderReplaced.cpp
@@ -108,13 +108,6 @@ void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
if (paintInfo.phase == PaintPhaseMask && !canHaveChildren())
return;
- bool drawSelectionTint = selectionState() != SelectionNone;
- if (paintInfo.phase == PaintPhaseSelection) {
- if (selectionState() == SelectionNone)
- return;
- drawSelectionTint = false;
- }
-
bool completelyClippedOut = false;
if (style()->hasBorderRadius()) {
LayoutRect borderRect = LayoutRect(adjustedPaintOffset, size());
@@ -138,7 +131,7 @@ void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
// The selection tint never gets clipped by border-radius rounding, since we want it to run right up to the edges of
// surrounding content.
- if (drawSelectionTint) {
+ if (selectionState() != SelectionNone) {
LayoutRect selectionPaintingRect = localSelectionRect();
selectionPaintingRect.moveBy(adjustedPaintOffset);
paintInfo.context->fillRect(pixelSnappedIntRect(selectionPaintingRect), selectionBackgroundColor());
« no previous file with comments | « sky/engine/core/rendering/PaintPhase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698