SVGGFrame.h (1689B)
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 LAYOUT_SVG_SVGGFRAME_H_ 8 #define LAYOUT_SVG_SVGGFRAME_H_ 9 10 #include "gfxMatrix.h" 11 #include "mozilla/SVGContainerFrame.h" 12 13 namespace mozilla { 14 class PresShell; 15 } // namespace mozilla 16 17 nsIFrame* NS_NewSVGGFrame(mozilla::PresShell* aPresShell, 18 mozilla::ComputedStyle* aStyle); 19 20 namespace mozilla { 21 22 class SVGGFrame : public SVGDisplayContainerFrame { 23 friend nsIFrame* ::NS_NewSVGGFrame(mozilla::PresShell* aPresShell, 24 mozilla::ComputedStyle* aStyle); 25 explicit SVGGFrame(ComputedStyle* aStyle, nsPresContext* aPresContext) 26 : SVGGFrame(aStyle, aPresContext, kClassID) {} 27 28 protected: 29 SVGGFrame(ComputedStyle* aStyle, nsPresContext* aPresContext, 30 nsIFrame::ClassID aID) 31 : SVGDisplayContainerFrame(aStyle, aPresContext, aID) {} 32 33 public: 34 NS_DECL_FRAMEARENA_HELPERS(SVGGFrame) 35 36 #ifdef DEBUG 37 void Init(nsIContent* aContent, nsContainerFrame* aParent, 38 nsIFrame* aPrevInFlow) override; 39 #endif 40 41 #ifdef DEBUG_FRAME_DUMP 42 nsresult GetFrameName(nsAString& aResult) const override { 43 return MakeFrameName(u"SVGG"_ns, aResult); 44 } 45 #endif 46 47 // nsIFrame interface: 48 nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute, 49 AttrModType aModType) override; 50 }; 51 52 } // namespace mozilla 53 54 #endif // LAYOUT_SVG_SVGGFRAME_H_