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

Side by Side Diff: third_party/WebKit/Source/core/paint/BlockFlowPainter.cpp

Issue 2654843004: Fix shouldPaint issue when a composited floating iframe becomes non-self-painting (Closed)
Patch Set: -0 Created 3 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/BlockFlowPainter.h" 5 #include "core/paint/BlockFlowPainter.h"
6 6
7 #include "core/layout/FloatingObjects.h" 7 #include "core/layout/FloatingObjects.h"
8 #include "core/layout/LayoutBlockFlow.h" 8 #include "core/layout/LayoutBlockFlow.h"
9 #include "core/paint/BlockPainter.h" 9 #include "core/paint/BlockPainter.h"
10 #include "core/paint/LineBoxListPainter.h" 10 #include "core/paint/LineBoxListPainter.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 PaintInfo floatPaintInfo(paintInfo); 46 PaintInfo floatPaintInfo(paintInfo);
47 if (paintInfo.phase == PaintPhaseFloat) 47 if (paintInfo.phase == PaintPhaseFloat)
48 floatPaintInfo.phase = PaintPhaseForeground; 48 floatPaintInfo.phase = PaintPhaseForeground;
49 49
50 for (const auto& floatingObject : 50 for (const auto& floatingObject :
51 m_layoutBlockFlow.floatingObjects()->set()) { 51 m_layoutBlockFlow.floatingObjects()->set()) {
52 if (!floatingObject->shouldPaint()) 52 if (!floatingObject->shouldPaint())
53 continue; 53 continue;
54 54
55 const LayoutBox* floatingLayoutObject = floatingObject->layoutObject(); 55 const LayoutBox* floatingLayoutObject = floatingObject->layoutObject();
56 // TODO(wangxianzhu): Should this be a DCHECK?
57 if (floatingLayoutObject->hasSelfPaintingLayer())
chrishtr 2017/01/25 20:47:57 In my original patch, I removed this because it wa
Xianzhu 2017/01/25 21:03:25 I didn't look at this closely when applying the re
58 continue;
59
56 // FIXME: LayoutPoint version of xPositionForFloatIncludingMargin would make 60 // FIXME: LayoutPoint version of xPositionForFloatIncludingMargin would make
57 // this much cleaner. 61 // this much cleaner.
58 LayoutPoint childPoint = m_layoutBlockFlow.flipFloatForWritingModeForChild( 62 LayoutPoint childPoint = m_layoutBlockFlow.flipFloatForWritingModeForChild(
59 *floatingObject, 63 *floatingObject,
60 LayoutPoint(paintOffset.x() + 64 LayoutPoint(paintOffset.x() +
61 m_layoutBlockFlow.xPositionForFloatIncludingMargin( 65 m_layoutBlockFlow.xPositionForFloatIncludingMargin(
62 *floatingObject) - 66 *floatingObject) -
63 floatingLayoutObject->location().x(), 67 floatingLayoutObject->location().x(),
64 paintOffset.y() + 68 paintOffset.y() +
65 m_layoutBlockFlow.yPositionForFloatIncludingMargin( 69 m_layoutBlockFlow.yPositionForFloatIncludingMargin(
66 *floatingObject) - 70 *floatingObject) -
67 floatingLayoutObject->location().y())); 71 floatingLayoutObject->location().y()));
68 ObjectPainter(*floatingLayoutObject) 72 ObjectPainter(*floatingLayoutObject)
69 .paintAllPhasesAtomically(floatPaintInfo, childPoint); 73 .paintAllPhasesAtomically(floatPaintInfo, childPoint);
70 } 74 }
71 } 75 }
72 76
73 } // namespace blink 77 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698