| 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/SVGRootPainter.h" | 5 #include "core/paint/SVGRootPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/svg/LayoutSVGRoot.h" | 7 #include "core/layout/svg/LayoutSVGRoot.h" |
| 8 #include "core/layout/svg/SVGLayoutSupport.h" | 8 #include "core/layout/svg/SVGLayoutSupport.h" |
| 9 #include "core/paint/BoxClipper.h" | 9 #include "core/paint/BoxClipper.h" |
| 10 #include "core/paint/BoxPainter.h" | 10 #include "core/paint/BoxPainter.h" |
| 11 #include "core/paint/ObjectPaintProperties.h" | 11 #include "core/paint/ObjectPaintProperties.h" |
| 12 #include "core/paint/PaintInfo.h" | 12 #include "core/paint/PaintInfo.h" |
| 13 #include "core/paint/PaintTiming.h" | 13 #include "core/paint/PaintTiming.h" |
| 14 #include "core/paint/SVGPaintContext.h" | 14 #include "core/paint/SVGPaintContext.h" |
| 15 #include "core/svg/SVGSVGElement.h" | 15 #include "core/svg/SVGSVGElement.h" |
| 16 #include "wtf/Optional.h" | 16 #include "platform/wtf/Optional.h" |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| 19 | 19 |
| 20 IntRect SVGRootPainter::PixelSnappedSize( | 20 IntRect SVGRootPainter::PixelSnappedSize( |
| 21 const LayoutPoint& paint_offset) const { | 21 const LayoutPoint& paint_offset) const { |
| 22 return PixelSnappedIntRect(paint_offset, layout_svg_root_.size()); | 22 return PixelSnappedIntRect(paint_offset, layout_svg_root_.size()); |
| 23 } | 23 } |
| 24 | 24 |
| 25 AffineTransform SVGRootPainter::TransformToPixelSnappedBorderBox( | 25 AffineTransform SVGRootPainter::TransformToPixelSnappedBorderBox( |
| 26 const LayoutPoint& paint_offset) const { | 26 const LayoutPoint& paint_offset) const { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 BoxPainter(layout_svg_root_) | 75 BoxPainter(layout_svg_root_) |
| 76 .PaintChildren(paint_context.GetPaintInfo(), LayoutPoint()); | 76 .PaintChildren(paint_context.GetPaintInfo(), LayoutPoint()); |
| 77 | 77 |
| 78 PaintTiming& timing = PaintTiming::From( | 78 PaintTiming& timing = PaintTiming::From( |
| 79 layout_svg_root_.GetNode()->GetDocument().TopDocument()); | 79 layout_svg_root_.GetNode()->GetDocument().TopDocument()); |
| 80 timing.MarkFirstContentfulPaint(); | 80 timing.MarkFirstContentfulPaint(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace blink | 83 } // namespace blink |
| OLD | NEW |