| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |