Index: Source/core/rendering/InlineFlowBox.cpp |
diff --git a/Source/core/rendering/InlineFlowBox.cpp b/Source/core/rendering/InlineFlowBox.cpp |
index 5a263d9ab993ecbce0e9aede687c746789aa5438..f93faca863ca56d0f38cc2b35841c640df37ce7c 100644 |
--- a/Source/core/rendering/InlineFlowBox.cpp |
+++ b/Source/core/rendering/InlineFlowBox.cpp |
@@ -1142,15 +1142,27 @@ 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; |
+ childInfo.updatePaintingRootForChildren(&renderer()); |
Julien - ping for review
2014/05/22 09:26:03
You're setting childInfo.paintingRoot to a non-NUL
spartha
2014/05/22 12:24:15
updatePaintingRootForChildren does not set the pai
Julien - ping for review
2014/06/05 22:01:35
OK, this function is confusingly named for sure :-
|
+ bool paintingRootCleared = !childInfo.paintingRoot; |
esprehn
2014/05/20 05:56:15
Why do you only ever clear the first one? That doe
spartha
2014/05/20 09:24:10
I am looking to paint just the InlineBox that hold
|
+ |
for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { |
- if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintingLayer()) |
- curr->paint(childInfo, paintOffset, lineTop, lineBottom); |
+ if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintingLayer()) { |
esprehn
2014/05/20 05:56:15
This needs a better test, you should be able to te
spartha
2014/05/20 09:24:10
I agree, that this mode of testing is not effectiv
|
+ // crbug.com/101204. Clear the paintRoot to allow the paint to go through if the |
+ // paintingRoot is a descendant of the InlineBox. |
+ if (!paintingRootCleared && childInfo.paintingRoot->isDescendantOf(&curr->renderer())) { |
Julien - ping for review
2014/05/22 09:26:03
That potentially makes this loop go to the root al
spartha
2014/05/22 12:24:15
There are sufficient checks in place not to affect
|
+ PaintInfo clearPaintRoot(childInfo); |
+ clearPaintRoot.paintingRoot = 0; |
+ curr->paint(clearPaintRoot, paintOffset, lineTop, lineBottom); |
+ paintingRootCleared = true; |
esprehn
2014/05/20 05:56:15
Nothing reads this, why assign it?
spartha
2014/05/20 09:24:10
paintingRootCleared is being evaluated @1157. I ad
|
+ } else { |
+ curr->paint(childInfo, paintOffset, lineTop, lineBottom); |
+ } |
+ } |
} |
} |
} |