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

Unified Diff: Source/core/rendering/InlineFlowBox.cpp

Issue 278293002: [Regression] Fix Draggable is float:left and container is overflow:hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 | « Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ }
+ }
}
}
}
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698