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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 } else { 1135 } else {
1136 // Paint our background, border and box-shadow. 1136 // Paint our background, border and box-shadow.
1137 paintBoxDecorations(paintInfo, paintOffset); 1137 paintBoxDecorations(paintInfo, paintOffset);
1138 } 1138 }
1139 } 1139 }
1140 1140
1141 if (paintInfo.phase == PaintPhaseMask) 1141 if (paintInfo.phase == PaintPhaseMask)
1142 return; 1142 return;
1143 1143
1144 PaintPhase paintPhase = paintInfo.phase == PaintPhaseChildOutlines ? PaintPh aseOutline : paintInfo.phase; 1144 PaintPhase paintPhase = paintInfo.phase == PaintPhaseChildOutlines ? PaintPh aseOutline : paintInfo.phase;
1145 PaintInfo childInfo(paintInfo);
1146 childInfo.phase = paintPhase;
1147 childInfo.updatePaintingRootForChildren(&renderer());
1148 1145
1149 // Paint our children. 1146 // Paint our children.
1150 if (paintPhase != PaintPhaseSelfOutline) { 1147 if (paintPhase != PaintPhaseSelfOutline) {
1148 PaintInfo childInfo(paintInfo);
1149 childInfo.phase = paintPhase;
1150 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 :-
1151 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
1152
1151 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { 1153 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
1152 if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPai ntingLayer()) 1154 if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPai ntingLayer()) {
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
1153 curr->paint(childInfo, paintOffset, lineTop, lineBottom); 1155 // crbug.com/101204. Clear the paintRoot to allow the paint to g o through if the
1156 // paintingRoot is a descendant of the InlineBox.
1157 if (!paintingRootCleared && childInfo.paintingRoot->isDescendant Of(&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
1158 PaintInfo clearPaintRoot(childInfo);
1159 clearPaintRoot.paintingRoot = 0;
1160 curr->paint(clearPaintRoot, paintOffset, lineTop, lineBottom );
1161 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
1162 } else {
1163 curr->paint(childInfo, paintOffset, lineTop, lineBottom);
1164 }
1165 }
1154 } 1166 }
1155 } 1167 }
1156 } 1168 }
1157 1169
1158 void InlineFlowBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer* fillLayer, const LayoutRect& rect, CompositeOperator op) 1170 void InlineFlowBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer* fillLayer, const LayoutRect& rect, CompositeOperator op)
1159 { 1171 {
1160 if (!fillLayer) 1172 if (!fillLayer)
1161 return; 1173 return;
1162 paintFillLayers(paintInfo, c, fillLayer->next(), rect, op); 1174 paintFillLayers(paintInfo, c, fillLayer->next(), rect, op);
1163 paintFillLayer(paintInfo, c, fillLayer, rect, op); 1175 paintFillLayer(paintInfo, c, fillLayer, rect, op);
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 ASSERT(child->prevOnLine() == prev); 1668 ASSERT(child->prevOnLine() == prev);
1657 prev = child; 1669 prev = child;
1658 } 1670 }
1659 ASSERT(prev == m_lastChild); 1671 ASSERT(prev == m_lastChild);
1660 #endif 1672 #endif
1661 } 1673 }
1662 1674
1663 #endif 1675 #endif
1664 1676
1665 } // namespace WebCore 1677 } // namespace WebCore
OLDNEW
« 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