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

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

Issue 892033003: Consolidate and delete a bunch of paint methods. (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/RenderBlock.h ('k') | sky/engine/core/rendering/RenderFlexibleBox.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 2da944eaeeaf42ae2751198ae1411ae3be1daa63..1dee32fe56b37d748e42c2e3c4b8d1152a6e46ef 100644
--- a/sky/engine/core/rendering/RenderBlock.cpp
+++ b/sky/engine/core/rendering/RenderBlock.cpp
@@ -475,34 +475,12 @@ void RenderBlock::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
popContentsClip(paintInfo, phase, adjustedPaintOffset);
}
-void RenderBlock::paintContents(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
-{
- // FIXME(sky): Can we remove paintContents and just keep paintChildren?
- paintChildren(paintInfo, paintOffset);
-}
-
void RenderBlock::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox())
- paintChild(child, paintInfo, paintOffset);
-}
-
-void RenderBlock::paintChild(RenderBox* child, PaintInfo& paintInfo, const LayoutPoint& paintOffset)
-{
- if (!child->hasSelfPaintingLayer())
- child->paint(paintInfo, paintOffset);
-}
-
-void RenderBlock::paintChildAsInlineBlock(RenderBox* child, PaintInfo& paintInfo, const LayoutPoint& paintOffset)
-{
- if (!child->hasSelfPaintingLayer())
- paintAsInlineBlock(child, paintInfo, paintOffset);
-}
-
-void RenderBlock::paintAsInlineBlock(RenderObject* renderer, PaintInfo& paintInfo, const LayoutPoint& childPoint)
-{
- // FIXME(sky): Remove this function.
- renderer->paint(paintInfo, childPoint);
+ for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
+ if (!child->hasSelfPaintingLayer())
+ child->paint(paintInfo, paintOffset);
+ }
}
static inline bool hasCursorCaret(const FrameSelection& selection, const RenderBlock* block)
@@ -539,7 +517,7 @@ void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs
if (hasBoxDecorationBackground())
paintBoxDecorationBackground(paintInfo, paintOffset);
- paintContents(paintInfo, paintOffset);
+ paintChildren(paintInfo, paintOffset);
paintSelection(paintInfo, paintOffset); // Fill in gaps in selection on lines and between blocks.
if (style()->hasOutline() && !style()->outlineStyleIsAuto())
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.h ('k') | sky/engine/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698