| 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/SVGContainerPainter.h" | 5 #include "core/paint/SVGContainerPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/svg/LayoutSVGContainer.h" | 7 #include "core/layout/svg/LayoutSVGContainer.h" |
| 8 #include "core/layout/svg/LayoutSVGViewportContainer.h" | 8 #include "core/layout/svg/LayoutSVGViewportContainer.h" |
| 9 #include "core/layout/svg/SVGLayoutSupport.h" | 9 #include "core/layout/svg/SVGLayoutSupport.h" |
| 10 #include "core/paint/FloatClipRecorder.h" | 10 #include "core/paint/FloatClipRecorder.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 SVGTransformContext transformContext( | 43 SVGTransformContext transformContext( |
| 44 paintInfoBeforeFiltering.context, m_layoutSVGContainer, | 44 paintInfoBeforeFiltering.context, m_layoutSVGContainer, |
| 45 m_layoutSVGContainer.localToSVGParentTransform()); | 45 m_layoutSVGContainer.localToSVGParentTransform()); |
| 46 { | 46 { |
| 47 Optional<FloatClipRecorder> clipRecorder; | 47 Optional<FloatClipRecorder> clipRecorder; |
| 48 if (m_layoutSVGContainer.isSVGViewportContainer() && | 48 if (m_layoutSVGContainer.isSVGViewportContainer() && |
| 49 SVGLayoutSupport::isOverflowHidden(&m_layoutSVGContainer)) { | 49 SVGLayoutSupport::isOverflowHidden(&m_layoutSVGContainer)) { |
| 50 FloatRect viewport = | 50 FloatRect viewport = |
| 51 m_layoutSVGContainer.localToSVGParentTransform().inverse().mapRect( | 51 m_layoutSVGContainer.localToSVGParentTransform().inverse().mapRect( |
| 52 toLayoutSVGViewportContainer(m_layoutSVGContainer).viewport()); | 52 toLayoutSVGViewportContainer(m_layoutSVGContainer).viewport()); |
| 53 clipRecorder.emplace(paintInfoBeforeFiltering.context, | 53 clipRecorder.emplace( |
| 54 m_layoutSVGContainer, paintInfoBeforeFiltering.phase, | 54 paintInfoBeforeFiltering.context, paintInfoBeforeFiltering.phase, |
| 55 viewport); | 55 viewport, m_layoutSVGContainer.visualRect(), |
| 56 m_layoutSVGContainer.debugName(), |
| 57 m_layoutSVGContainer |
| 58 .paintedOutputOfObjectHasNoEffectRegardlessOfSize()); |
| 56 } | 59 } |
| 57 | 60 |
| 58 SVGPaintContext paintContext(m_layoutSVGContainer, | 61 SVGPaintContext paintContext(m_layoutSVGContainer, |
| 59 paintInfoBeforeFiltering); | 62 paintInfoBeforeFiltering); |
| 60 bool continueRendering = true; | 63 bool continueRendering = true; |
| 61 if (paintContext.paintInfo().phase == PaintPhaseForeground) | 64 if (paintContext.paintInfo().phase == PaintPhaseForeground) |
| 62 continueRendering = paintContext.applyClipMaskAndFilterIfNecessary(); | 65 continueRendering = paintContext.applyClipMaskAndFilterIfNecessary(); |
| 63 | 66 |
| 64 if (continueRendering) { | 67 if (continueRendering) { |
| 65 for (LayoutObject* child = m_layoutSVGContainer.firstChild(); child; | 68 for (LayoutObject* child = m_layoutSVGContainer.firstChild(); child; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 78 ObjectPainter(m_layoutSVGContainer) | 81 ObjectPainter(m_layoutSVGContainer) |
| 79 .paintOutline(outlinePaintInfo, LayoutPoint(boundingBox.location())); | 82 .paintOutline(outlinePaintInfo, LayoutPoint(boundingBox.location())); |
| 80 } | 83 } |
| 81 | 84 |
| 82 if (paintInfoBeforeFiltering.isPrinting()) | 85 if (paintInfoBeforeFiltering.isPrinting()) |
| 83 ObjectPainter(m_layoutSVGContainer) | 86 ObjectPainter(m_layoutSVGContainer) |
| 84 .addPDFURLRectIfNeeded(paintInfoBeforeFiltering, LayoutPoint()); | 87 .addPDFURLRectIfNeeded(paintInfoBeforeFiltering, LayoutPoint()); |
| 85 } | 88 } |
| 86 | 89 |
| 87 } // namespace blink | 90 } // namespace blink |
| OLD | NEW |