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

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

Issue 2265813002: Add a hack to set shouldPaint to true for force-composited iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add new test to SPv2 expectations. Created 4 years, 3 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 28 matching lines...) Expand all
39 ASSERT(paintInfo.phase == PaintPhaseFloat || paintInfo.phase == PaintPhaseSe lection || paintInfo.phase == PaintPhaseTextClip); 39 ASSERT(paintInfo.phase == PaintPhaseFloat || paintInfo.phase == PaintPhaseSe lection || paintInfo.phase == PaintPhaseTextClip);
40 PaintInfo floatPaintInfo(paintInfo); 40 PaintInfo floatPaintInfo(paintInfo);
41 if (paintInfo.phase == PaintPhaseFloat) 41 if (paintInfo.phase == PaintPhaseFloat)
42 floatPaintInfo.phase = PaintPhaseForeground; 42 floatPaintInfo.phase = PaintPhaseForeground;
43 43
44 for (const auto& floatingObject : m_layoutBlockFlow.floatingObjects()->set() ) { 44 for (const auto& floatingObject : m_layoutBlockFlow.floatingObjects()->set() ) {
45 if (!floatingObject->shouldPaint()) 45 if (!floatingObject->shouldPaint())
46 continue; 46 continue;
47 47
48 const LayoutBox* floatingLayoutObject = floatingObject->layoutObject(); 48 const LayoutBox* floatingLayoutObject = floatingObject->layoutObject();
49 if (floatingLayoutObject->hasSelfPaintingLayer())
50 continue;
51
52 // FIXME: LayoutPoint version of xPositionForFloatIncludingMargin would make this much cleaner. 49 // FIXME: LayoutPoint version of xPositionForFloatIncludingMargin would make this much cleaner.
53 LayoutPoint childPoint = m_layoutBlockFlow.flipFloatForWritingModeForChi ld( 50 LayoutPoint childPoint = m_layoutBlockFlow.flipFloatForWritingModeForChi ld(
54 *floatingObject, LayoutPoint(paintOffset.x() 51 *floatingObject, LayoutPoint(paintOffset.x()
55 + m_layoutBlockFlow.xPositionForFloatIncludingMargin(*floatingObject ) - floatingLayoutObject->location().x(), paintOffset.y() 52 + m_layoutBlockFlow.xPositionForFloatIncludingMargin(*floatingObject ) - floatingLayoutObject->location().x(), paintOffset.y()
56 + m_layoutBlockFlow.yPositionForFloatIncludingMargin(*floatingObject ) - floatingLayoutObject->location().y())); 53 + m_layoutBlockFlow.yPositionForFloatIncludingMargin(*floatingObject ) - floatingLayoutObject->location().y()));
57 ObjectPainter(*floatingLayoutObject).paintAllPhasesAtomically(floatPaint Info, childPoint); 54 ObjectPainter(*floatingLayoutObject).paintAllPhasesAtomically(floatPaint Info, childPoint);
58 } 55 }
59 } 56 }
60 57
61 } // namespace blink 58 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698