Backed out changeset 2960ea3e50ca (bug 1881157) for causing crashtest assertion failu...
[gecko.git] / layout / svg / SVGViewportFrame.h
blob56a953bd01bee425f4e5a5088f5e14d8581c5aba
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/. */
7 #ifndef LAYOUT_SVG_SVGVIEWPORTFRAME_H_
8 #define LAYOUT_SVG_SVGVIEWPORTFRAME_H_
10 #include "mozilla/Attributes.h"
11 #include "mozilla/ISVGSVGFrame.h"
12 #include "mozilla/SVGContainerFrame.h"
14 class gfxContext;
16 namespace mozilla {
18 /**
19 * Superclass for inner SVG frames and symbol frames.
21 class SVGViewportFrame : public SVGDisplayContainerFrame, public ISVGSVGFrame {
22 protected:
23 SVGViewportFrame(ComputedStyle* aStyle, nsPresContext* aPresContext,
24 nsIFrame::ClassID aID)
25 : SVGDisplayContainerFrame(aStyle, aPresContext, aID) {}
27 public:
28 NS_DECL_ABSTRACT_FRAME(SVGViewportFrame)
30 nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
31 int32_t aModType) override;
33 // ISVGDisplayableFrame interface:
34 void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
35 imgDrawingParams& aImgParams) override;
36 void ReflowSVG() override;
37 void NotifySVGChanged(uint32_t aFlags) override;
38 SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
39 uint32_t aFlags) override;
40 nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
42 // SVGContainerFrame methods:
43 bool HasChildrenOnlyTransform(Matrix* aTransform) const override;
45 // ISVGSVGFrame interface:
46 void NotifyViewportOrTransformChanged(uint32_t aFlags) override;
49 } // namespace mozilla
51 #endif // LAYOUT_SVG_SVGVIEWPORTFRAME_H_