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

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

Issue 878023002: Merge outline paint phases into the foreground phase. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase 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 c9b5e6c2c851682f62a9017e60e7a8e57bd6425b..7e255d65661b5aba71d41019824e66377e61dc15 100644
--- a/sky/engine/core/rendering/RenderBlock.cpp
+++ b/sky/engine/core/rendering/RenderBlock.cpp
@@ -533,11 +533,8 @@ void RenderBlock::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
void RenderBlock::paintContents(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- PaintPhase newPhase = (paintInfo.phase == PaintPhaseChildOutlines) ? PaintPhaseOutline : paintInfo.phase;
-
// We don't paint our own background, but we do let the kids paint their backgrounds.
PaintInfo paintInfoForChild(paintInfo);
- paintInfoForChild.phase = newPhase;
paintInfoForChild.updatePaintingRootForChildren(this);
paintChildren(paintInfoForChild, paintOffset);
}
@@ -576,8 +573,6 @@ void RenderBlock::paintAsInlineBlock(RenderObject* renderer, PaintInfo& paintInf
} else {
info.phase = PaintPhaseForeground;
renderer->paint(info, childPoint);
- info.phase = PaintPhaseOutline;
- renderer->paint(info, childPoint);
}
}
@@ -628,20 +623,17 @@ void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs
return;
}
- if (paintPhase != PaintPhaseSelfOutline)
- paintContents(paintInfo, scrolledOffset);
-
+ paintContents(paintInfo, scrolledOffset);
paintSelection(paintInfo, scrolledOffset); // Fill in gaps in selection on lines and between blocks.
- if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline)
- && style()->hasOutline() && !style()->outlineStyleIsAuto()) {
- paintOutline(paintInfo, LayoutRect(paintOffset, size()));
- }
+ if (paintPhase == PaintPhaseForeground) {
+ if (style()->hasOutline() && !style()->outlineStyleIsAuto())
esprehn 2015/01/28 01:22:26 I wonder what outline: auto is for.
+ paintOutline(paintInfo, LayoutRect(paintOffset, size()));
- // If the caret's node's render object's containing block is this block, and the paint action is PaintPhaseForeground,
- // then paint the caret.
- if (paintPhase == PaintPhaseForeground)
+ // If the caret's node's render object's containing block is this block, and the paint action is PaintPhaseForeground,
+ // then paint the caret.
paintCarets(paintInfo, paintOffset);
+ }
}
bool RenderBlock::shouldPaintSelectionGaps() const

Powered by Google App Engine
This is Rietveld 408576698