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

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

Issue 886483006: Simplify paint phase boolean logic. (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/RenderLineBoxList.cpp ('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 b29c8f92ddd801fa5ffa4458a2dd0e7d7e1675c9..b4c7724a9646babf87d368cc096d66f8020e6e0f 100644
--- a/sky/engine/core/rendering/RenderReplaced.cpp
+++ b/sky/engine/core/rendering/RenderReplaced.cpp
@@ -93,19 +93,19 @@ void RenderReplaced::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
LayoutPoint adjustedPaintOffset = paintOffset + location();
- if (hasBoxDecorationBackground() && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection))
- paintBoxDecorationBackground(paintInfo, adjustedPaintOffset);
-
if (paintInfo.phase == PaintPhaseMask) {
paintMask(paintInfo, adjustedPaintOffset);
return;
}
+ if (hasBoxDecorationBackground())
+ paintBoxDecorationBackground(paintInfo, adjustedPaintOffset);
+
LayoutRect paintRect = LayoutRect(adjustedPaintOffset, size());
if (paintInfo.phase == PaintPhaseForeground && style()->outlineWidth())
paintOutline(paintInfo, paintRect);
- if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection && !canHaveChildren())
+ if (paintInfo.phase == PaintPhaseMask && !canHaveChildren())
return;
bool drawSelectionTint = selectionState() != SelectionNone;
« no previous file with comments | « sky/engine/core/rendering/RenderLineBoxList.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698