| 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" |
| 11 #include "core/paint/ObjectPainter.h" | 11 #include "core/paint/ObjectPainter.h" |
| 12 #include "core/paint/PaintInfo.h" | 12 #include "core/paint/PaintInfo.h" |
| 13 #include "core/paint/SVGPaintContext.h" | 13 #include "core/paint/SVGPaintContext.h" |
| 14 #include "core/svg/SVGSVGElement.h" | 14 #include "core/svg/SVGSVGElement.h" |
| 15 #include "wtf/Optional.h" | 15 #include "platform/wtf/Optional.h" |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 | 18 |
| 19 void SVGContainerPainter::Paint(const PaintInfo& paint_info) { | 19 void SVGContainerPainter::Paint(const PaintInfo& paint_info) { |
| 20 // Spec: groups w/o children still may render filter content. | 20 // Spec: groups w/o children still may render filter content. |
| 21 if (!layout_svg_container_.FirstChild() && | 21 if (!layout_svg_container_.FirstChild() && |
| 22 !layout_svg_container_.SelfWillPaint()) | 22 !layout_svg_container_.SelfWillPaint()) |
| 23 return; | 23 return; |
| 24 | 24 |
| 25 FloatRect bounding_box = | 25 FloatRect bounding_box = |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 ObjectPainter(layout_svg_container_) | 78 ObjectPainter(layout_svg_container_) |
| 79 .PaintOutline(outline_paint_info, LayoutPoint(bounding_box.Location())); | 79 .PaintOutline(outline_paint_info, LayoutPoint(bounding_box.Location())); |
| 80 } | 80 } |
| 81 | 81 |
| 82 if (paint_info_before_filtering.IsPrinting()) | 82 if (paint_info_before_filtering.IsPrinting()) |
| 83 ObjectPainter(layout_svg_container_) | 83 ObjectPainter(layout_svg_container_) |
| 84 .AddPDFURLRectIfNeeded(paint_info_before_filtering, LayoutPoint()); | 84 .AddPDFURLRectIfNeeded(paint_info_before_filtering, LayoutPoint()); |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace blink | 87 } // namespace blink |
| OLD | NEW |