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

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

Issue 2651253003: Revert of Fix shouldPaint issue when a composited floating iframe becomes non-self-painting (Closed)
Patch Set: 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())
58 continue;
59
60 // FIXME: LayoutPoint version of xPositionForFloatIncludingMargin would make 56 // FIXME: LayoutPoint version of xPositionForFloatIncludingMargin would make
61 // this much cleaner. 57 // this much cleaner.
62 LayoutPoint childPoint = m_layoutBlockFlow.flipFloatForWritingModeForChild( 58 LayoutPoint childPoint = m_layoutBlockFlow.flipFloatForWritingModeForChild(
63 *floatingObject, 59 *floatingObject,
64 LayoutPoint(paintOffset.x() + 60 LayoutPoint(paintOffset.x() +
65 m_layoutBlockFlow.xPositionForFloatIncludingMargin( 61 m_layoutBlockFlow.xPositionForFloatIncludingMargin(
66 *floatingObject) - 62 *floatingObject) -
67 floatingLayoutObject->location().x(), 63 floatingLayoutObject->location().x(),
68 paintOffset.y() + 64 paintOffset.y() +
69 m_layoutBlockFlow.yPositionForFloatIncludingMargin( 65 m_layoutBlockFlow.yPositionForFloatIncludingMargin(
70 *floatingObject) - 66 *floatingObject) -
71 floatingLayoutObject->location().y())); 67 floatingLayoutObject->location().y()));
72 ObjectPainter(*floatingLayoutObject) 68 ObjectPainter(*floatingLayoutObject)
73 .paintAllPhasesAtomically(floatPaintInfo, childPoint); 69 .paintAllPhasesAtomically(floatPaintInfo, childPoint);
74 } 70 }
75 } 71 }
76 72
77 } // namespace blink 73 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698