/src/mozilla-central/layout/svg/nsSVGViewportFrame.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #ifndef __NS_SVGVIEWPORTFRAME_H__ |
8 | | #define __NS_SVGVIEWPORTFRAME_H__ |
9 | | |
10 | | #include "mozilla/Attributes.h" |
11 | | #include "nsAutoPtr.h" |
12 | | #include "nsSVGContainerFrame.h" |
13 | | #include "nsISVGSVGFrame.h" |
14 | | |
15 | | class gfxContext; |
16 | | /** |
17 | | * Superclass for inner SVG frames and symbol frames. |
18 | | */ |
19 | | class nsSVGViewportFrame |
20 | | : public nsSVGDisplayContainerFrame |
21 | | , public nsISVGSVGFrame |
22 | | { |
23 | | protected: |
24 | | nsSVGViewportFrame(ComputedStyle* aStyle, nsIFrame::ClassID aID) |
25 | | : nsSVGDisplayContainerFrame(aStyle, aID) |
26 | 0 | { |
27 | 0 | } |
28 | | public: |
29 | | NS_DECL_ABSTRACT_FRAME(nsSVGViewportFrame) |
30 | | |
31 | | virtual nsresult AttributeChanged(int32_t aNameSpaceID, |
32 | | nsAtom* aAttribute, |
33 | | int32_t aModType) override; |
34 | | |
35 | | // nsSVGDisplayableFrame interface: |
36 | | virtual void PaintSVG(gfxContext& aContext, |
37 | | const gfxMatrix& aTransform, |
38 | | imgDrawingParams& aImgParams, |
39 | | const nsIntRect* aDirtyRect = nullptr) override; |
40 | | virtual void ReflowSVG() override; |
41 | | virtual void NotifySVGChanged(uint32_t aFlags) override; |
42 | | SVGBBox GetBBoxContribution(const Matrix &aToBBoxUserspace, |
43 | | uint32_t aFlags) override; |
44 | | virtual nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override; |
45 | | |
46 | | // nsSVGContainerFrame methods: |
47 | | virtual bool HasChildrenOnlyTransform(Matrix *aTransform) const override; |
48 | | |
49 | | // nsISVGSVGFrame interface: |
50 | | virtual void NotifyViewportOrTransformChanged(uint32_t aFlags) override; |
51 | | }; |
52 | | |
53 | | #endif // __NS_SVGVIEWPORTFRAME_H__ |
54 | | |