Index: sky/engine/core/rendering/RenderBlock.cpp |
diff --git a/sky/engine/core/rendering/RenderBlock.cpp b/sky/engine/core/rendering/RenderBlock.cpp |
index 5f6fd6d48e6eae8efc0d79f7b07e6669e2226fba..f250c2e5d504ee09193e5fe6689651b8bdb18c23 100644 |
--- a/sky/engine/core/rendering/RenderBlock.cpp |
+++ b/sky/engine/core/rendering/RenderBlock.cpp |
@@ -446,7 +446,7 @@ void RenderBlock::markPositionedObjectsForLayout() |
} |
} |
-void RenderBlock::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
+void RenderBlock::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers) |
{ |
LayoutPoint adjustedPaintOffset = paintOffset + location(); |
@@ -468,16 +468,18 @@ void RenderBlock::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
contentsClipBehavior = SkipContentsClipIfPossible; |
bool pushedClip = pushContentsClip(paintInfo, adjustedPaintOffset, contentsClipBehavior); |
- paintObject(paintInfo, adjustedPaintOffset); |
+ paintObject(paintInfo, adjustedPaintOffset, layers); |
if (pushedClip) |
popContentsClip(paintInfo, adjustedPaintOffset); |
} |
-void RenderBlock::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
+void RenderBlock::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers) |
{ |
for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) { |
- if (!child->hasSelfPaintingLayer()) |
- child->paint(paintInfo, paintOffset); |
+ if (child->hasSelfPaintingLayer()) |
+ layers.append(child); |
+ else |
+ child->paint(paintInfo, paintOffset, layers); |
} |
} |
@@ -510,12 +512,12 @@ void RenderBlock::paintCarets(PaintInfo& paintInfo, const LayoutPoint& paintOffs |
} |
} |
-void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
+void RenderBlock::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset, Vector<RenderBox*>& layers) |
{ |
if (hasBoxDecorationBackground()) |
paintBoxDecorationBackground(paintInfo, paintOffset); |
- paintChildren(paintInfo, paintOffset); |
+ paintChildren(paintInfo, paintOffset, layers); |
paintSelection(paintInfo, paintOffset); // Fill in gaps in selection on lines and between blocks. |
if (style()->hasOutline() && !style()->outlineStyleIsAuto()) |