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 "config.h" | 5 #include "config.h" |
6 #include "core/paint/SVGContainerPainter.h" | 6 #include "core/paint/SVGContainerPainter.h" |
7 | 7 |
8 #include "core/paint/FloatClipRecorder.h" | 8 #include "core/paint/FloatClipRecorder.h" |
9 #include "core/paint/GraphicsContextAnnotator.h" | 9 #include "core/paint/GraphicsContextAnnotator.h" |
10 #include "core/paint/ObjectPainter.h" | 10 #include "core/paint/ObjectPainter.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 clipRecorder = adoptPtr(new FloatClipRecorder(*paintInfoBeforeFilter
ing.context, m_renderSVGContainer.displayItemClient(), paintInfoBeforeFiltering.
phase, viewport)); | 40 clipRecorder = adoptPtr(new FloatClipRecorder(*paintInfoBeforeFilter
ing.context, m_renderSVGContainer.displayItemClient(), paintInfoBeforeFiltering.
phase, viewport)); |
41 } | 41 } |
42 | 42 |
43 SVGRenderingContext renderingContext(m_renderSVGContainer, paintInfoBefo
reFiltering); | 43 SVGRenderingContext renderingContext(m_renderSVGContainer, paintInfoBefo
reFiltering); |
44 bool continueRendering = true; | 44 bool continueRendering = true; |
45 if (renderingContext.paintInfo().phase == PaintPhaseForeground) | 45 if (renderingContext.paintInfo().phase == PaintPhaseForeground) |
46 continueRendering = renderingContext.applyClipMaskAndFilterIfNecessa
ry(); | 46 continueRendering = renderingContext.applyClipMaskAndFilterIfNecessa
ry(); |
47 | 47 |
48 if (continueRendering) { | 48 if (continueRendering) { |
49 renderingContext.paintInfo().updatePaintingRootForChildren(&m_render
SVGContainer); | 49 renderingContext.paintInfo().updatePaintingRootForChildren(&m_render
SVGContainer); |
50 for (RenderObject* child = m_renderSVGContainer.firstChild(); child;
child = child->nextSibling()) | 50 for (LayoutObject* child = m_renderSVGContainer.firstChild(); child;
child = child->nextSibling()) |
51 child->paint(renderingContext.paintInfo(), IntPoint()); | 51 child->paint(renderingContext.paintInfo(), IntPoint()); |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 if (paintInfoBeforeFiltering.phase == PaintPhaseForeground && m_renderSVGCon
tainer.style()->outlineWidth() && m_renderSVGContainer.style()->visibility() ==
VISIBLE) | 55 if (paintInfoBeforeFiltering.phase == PaintPhaseForeground && m_renderSVGCon
tainer.style()->outlineWidth() && m_renderSVGContainer.style()->visibility() ==
VISIBLE) |
56 ObjectPainter(m_renderSVGContainer).paintOutline(paintInfoBeforeFilterin
g, LayoutRect(m_renderSVGContainer.paintInvalidationRectInLocalCoordinates())); | 56 ObjectPainter(m_renderSVGContainer).paintOutline(paintInfoBeforeFilterin
g, LayoutRect(m_renderSVGContainer.paintInvalidationRectInLocalCoordinates())); |
57 } | 57 } |
58 | 58 |
59 } // namespace blink | 59 } // namespace blink |
OLD | NEW |