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

Unified Diff: sky/engine/core/rendering/RenderBlock.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/InlineBox.cpp ('k') | sky/engine/core/rendering/RenderLineBoxList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBlock.cpp
diff --git a/sky/engine/core/rendering/RenderBlock.cpp b/sky/engine/core/rendering/RenderBlock.cpp
index 103b744c57fe70271ad6fe209ed3826fa1063418..0fd4879e467386989d8e12bd418a828658569149 100644
--- a/sky/engine/core/rendering/RenderBlock.cpp
+++ b/sky/engine/core/rendering/RenderBlock.cpp
@@ -503,21 +503,10 @@ void RenderBlock::paintChildAsInlineBlock(RenderBox* child, PaintInfo& paintInfo
void RenderBlock::paintAsInlineBlock(RenderObject* renderer, PaintInfo& paintInfo, const LayoutPoint& childPoint)
{
- if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection)
+ // FIXME(sky): Why don't masks go down this path?
+ if (paintInfo.phase == PaintPhaseMask)
return;
-
- // Paint all phases atomically, as though the element established its own
- // stacking context. (See Appendix E.2, section 7.2.1.4 on
- // inline block/table/replaced elements in the CSS2.1 specification.)
- // This is also used by other elements (e.g. flex items).
- PaintInfo info(paintInfo);
-
- if (paintInfo.phase == PaintPhaseSelection) {
- renderer->paint(info, childPoint);
- } else {
- info.phase = PaintPhaseForeground;
- renderer->paint(info, childPoint);
- }
+ renderer->paint(paintInfo, childPoint);
}
static inline bool hasCursorCaret(const FrameSelection& selection, const RenderBlock* block)
« no previous file with comments | « sky/engine/core/rendering/InlineBox.cpp ('k') | sky/engine/core/rendering/RenderLineBoxList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698