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/SVGForeignObjectPainter.h" | 5 #include "core/paint/SVGForeignObjectPainter.h" |
6 | 6 |
7 #include "core/layout/svg/LayoutSVGForeignObject.h" | 7 #include "core/layout/svg/LayoutSVGForeignObject.h" |
8 #include "core/layout/svg/SVGLayoutSupport.h" | 8 #include "core/layout/svg/SVGLayoutSupport.h" |
9 #include "core/paint/BlockPainter.h" | 9 #include "core/paint/BlockPainter.h" |
10 #include "core/paint/FloatClipRecorder.h" | 10 #include "core/paint/FloatClipRecorder.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 paintInfoBeforeFiltering.phase, | 52 paintInfoBeforeFiltering.phase, |
53 m_layoutSVGForeignObject.viewportRect()); | 53 m_layoutSVGForeignObject.viewportRect()); |
54 | 54 |
55 SVGPaintContext paintContext(m_layoutSVGForeignObject, | 55 SVGPaintContext paintContext(m_layoutSVGForeignObject, |
56 paintInfoBeforeFiltering); | 56 paintInfoBeforeFiltering); |
57 bool continueRendering = true; | 57 bool continueRendering = true; |
58 if (paintContext.paintInfo().phase == PaintPhaseForeground) | 58 if (paintContext.paintInfo().phase == PaintPhaseForeground) |
59 continueRendering = paintContext.applyClipMaskAndFilterIfNecessary(); | 59 continueRendering = paintContext.applyClipMaskAndFilterIfNecessary(); |
60 | 60 |
61 if (continueRendering) { | 61 if (continueRendering) { |
62 // Paint all phases of FO elements atomically as though the FO element estab
lished its own stacking context. | 62 // Paint all phases of FO elements atomically as though the FO element |
63 // The delegate forwards calls to paint() in LayoutObject::paintAllPhasesAto
mically() to | 63 // established its own stacking context. The delegate forwards calls to |
64 // BlockPainter::paint(), instead of m_layoutSVGForeignObject.paint() (which
would call this method again). | 64 // paint() in LayoutObject::paintAllPhasesAtomically() to |
| 65 // BlockPainter::paint(), instead of m_layoutSVGForeignObject.paint() (which |
| 66 // would call this method again). |
65 BlockPainterDelegate delegate(m_layoutSVGForeignObject); | 67 BlockPainterDelegate delegate(m_layoutSVGForeignObject); |
66 ObjectPainter(delegate).paintAllPhasesAtomically(paintContext.paintInfo(), | 68 ObjectPainter(delegate).paintAllPhasesAtomically(paintContext.paintInfo(), |
67 LayoutPoint()); | 69 LayoutPoint()); |
68 } | 70 } |
69 } | 71 } |
70 | 72 |
71 } // namespace blink | 73 } // namespace blink |
OLD | NEW |