/src/mozilla-central/layout/svg/nsSVGUseFrame.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_SVGUSEFRAME_H__ |
8 | | #define __NS_SVGUSEFRAME_H__ |
9 | | |
10 | | // Keep in (case-insensitive) order: |
11 | | #include "nsSVGGFrame.h" |
12 | | |
13 | | class nsSVGUseFrame final |
14 | | : public nsSVGGFrame |
15 | | { |
16 | | friend nsIFrame* NS_NewSVGUseFrame(nsIPresShell* aPresShell, |
17 | | ComputedStyle* aStyle); |
18 | | |
19 | | protected: |
20 | | explicit nsSVGUseFrame(ComputedStyle* aStyle) |
21 | | : nsSVGGFrame(aStyle, kClassID) |
22 | | , mHasValidDimensions(true) |
23 | 0 | { |
24 | 0 | } |
25 | | |
26 | | public: |
27 | | NS_DECL_FRAMEARENA_HELPERS(nsSVGUseFrame) |
28 | | |
29 | | // nsIFrame interface: |
30 | | void Init(nsIContent* aContent, |
31 | | nsContainerFrame* aParent, |
32 | | nsIFrame* aPrevInFlow) override; |
33 | | |
34 | | nsresult AttributeChanged(int32_t aNameSpaceID, |
35 | | nsAtom* aAttribute, |
36 | | int32_t aModType) override; |
37 | | |
38 | | #ifdef DEBUG_FRAME_DUMP |
39 | | nsresult GetFrameName(nsAString& aResult) const override |
40 | | { |
41 | | return MakeFrameName(NS_LITERAL_STRING("SVGUse"), aResult); |
42 | | } |
43 | | #endif |
44 | | |
45 | | // nsSVGDisplayableFrame interface: |
46 | | void ReflowSVG() override; |
47 | | void NotifySVGChanged(uint32_t aFlags) override; |
48 | | |
49 | | private: |
50 | | bool mHasValidDimensions; |
51 | | }; |
52 | | |
53 | | #endif // __NS_SVGUSEFRAME_H__ |