Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Side by Side Diff: third_party/WebKit/Source/core/paint/SVGRootPainter.h

Issue 2343673003: SVG root viewport clip in paint property tree (Closed)
Patch Set: - Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef SVGRootPainter_h 5 #ifndef SVGRootPainter_h
6 #define SVGRootPainter_h 6 #define SVGRootPainter_h
7 7
8 #include "wtf/Allocator.h" 8 #include "wtf/Allocator.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 struct PaintInfo; 12 struct PaintInfo;
13 class AffineTransform; 13 class AffineTransform;
14 class IntRect; 14 class IntRect;
15 class LayoutPoint; 15 class LayoutPoint;
16 class LayoutSVGRoot; 16 class LayoutSVGRoot;
17 17
18 class SVGRootPainter { 18 class SVGRootPainter {
19 STACK_ALLOCATED(); 19 STACK_ALLOCATED();
20 public: 20 public:
21 SVGRootPainter(const LayoutSVGRoot& layoutSVGRoot) : m_layoutSVGRoot(layoutS VGRoot) { } 21 SVGRootPainter(const LayoutSVGRoot& layoutSVGRoot) : m_layoutSVGRoot(layoutS VGRoot) { }
22 22
23 void paint(const PaintInfo&, const LayoutPoint&); 23 void paintReplaced(const PaintInfo&, const LayoutPoint&);
24 24
25 // The embedded SVG document uses an unsnapped viewport box for layout, whil e SVG root's border 25 // The embedded SVG document uses an unsnapped viewport box for layout, whil e SVG root's border
26 // box ultimately gets snapped during paint. This translate/scale transform is applied to 26 // box ultimately gets snapped during paint. This translate/scale transform is applied to
27 // compensate the difference, in addition to applying the local to border bo x transform. 27 // compensate the difference, in addition to applying the local to border bo x transform.
28 AffineTransform transformToPixelSnappedBorderBox(const LayoutPoint& paintOff set) const; 28 AffineTransform transformToPixelSnappedBorderBox(const LayoutPoint& paintOff set) const;
29 29
30 private: 30 private:
31 IntRect pixelSnappedSize(const LayoutPoint& paintOffset) const; 31 IntRect pixelSnappedSize(const LayoutPoint& paintOffset) const;
32 32
33 const LayoutSVGRoot& m_layoutSVGRoot; 33 const LayoutSVGRoot& m_layoutSVGRoot;
34 }; 34 };
35 35
36 } // namespace blink 36 } // namespace blink
37 37
38 #endif // SVGRootPainter_h 38 #endif // SVGRootPainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698