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

Unified Diff: sky/engine/core/rendering/InlineFlowBox.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/InlineFlowBox.cpp
diff --git a/sky/engine/core/rendering/InlineFlowBox.cpp b/sky/engine/core/rendering/InlineFlowBox.cpp
index 34457c51f4a2cb7bf6581920f0e9c65f846accc3..7cf2602f446d06fedf64cdf9fa170b69cfdb7861 100644
--- a/sky/engine/core/rendering/InlineFlowBox.cpp
+++ b/sky/engine/core/rendering/InlineFlowBox.cpp
@@ -1000,25 +1000,21 @@ void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
if (paintInfo.phase == PaintPhaseMask) {
paintMask(paintInfo, paintOffset);
return;
- } else if (paintInfo.phase == PaintPhaseForeground) {
- // Paint our background, border and box-shadow.
- paintBoxDecorationBackground(paintInfo, paintOffset);
}
- // Paint our children.
- if (paintInfo.phase != PaintPhaseSelfOutline) {
- PaintInfo childInfo(paintInfo);
- childInfo.phase = paintInfo.phase == PaintPhaseChildOutlines ? PaintPhaseOutline : paintInfo.phase;
+ if (paintInfo.phase == PaintPhaseForeground)
+ paintBoxDecorationBackground(paintInfo, paintOffset);
- if (childInfo.paintingRoot && childInfo.paintingRoot->isDescendantOf(&renderer()))
- childInfo.paintingRoot = 0;
- else
- childInfo.updatePaintingRootForChildren(&renderer());
+ PaintInfo childInfo(paintInfo);
- for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
- if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintingLayer())
- curr->paint(childInfo, paintOffset, lineTop, lineBottom);
- }
+ if (childInfo.paintingRoot && childInfo.paintingRoot->isDescendantOf(&renderer()))
+ childInfo.paintingRoot = 0;
+ else
+ childInfo.updatePaintingRootForChildren(&renderer());
+
+ for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
+ if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintingLayer())
+ curr->paint(childInfo, paintOffset, lineTop, lineBottom);
}
}
« no previous file with comments | « no previous file | sky/engine/core/rendering/InlineTextBox.cpp » ('j') | sky/engine/core/rendering/RenderBlock.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698