Index: Source/core/rendering/InlineFlowBox.cpp |
diff --git a/Source/core/rendering/InlineFlowBox.cpp b/Source/core/rendering/InlineFlowBox.cpp |
index ad2a883b9a7a45db8baded3f6d613bb74ac83c70..85ef3ef2952562566bfa36953fd2a3054604c6a5 100644 |
--- a/Source/core/rendering/InlineFlowBox.cpp |
+++ b/Source/core/rendering/InlineFlowBox.cpp |
@@ -1145,12 +1145,17 @@ void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, |
return; |
PaintPhase paintPhase = paintInfo.phase == PaintPhaseChildOutlines ? PaintPhaseOutline : paintInfo.phase; |
- PaintInfo childInfo(paintInfo); |
- childInfo.phase = paintPhase; |
- childInfo.updatePaintingRootForChildren(&renderer()); |
// Paint our children. |
if (paintPhase != PaintPhaseSelfOutline) { |
+ PaintInfo childInfo(paintInfo); |
+ childInfo.phase = paintPhase; |
+ |
+ 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); |