layout/svg/nsSVGGFrame.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/svg/nsSVGGFrame.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,61 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef NSSVGGFRAME_H
    1.10 +#define NSSVGGFRAME_H
    1.11 +
    1.12 +#include "mozilla/Attributes.h"
    1.13 +#include "gfxMatrix.h"
    1.14 +#include "nsSVGContainerFrame.h"
    1.15 +
    1.16 +typedef nsSVGDisplayContainerFrame nsSVGGFrameBase;
    1.17 +
    1.18 +class nsSVGGFrame : public nsSVGGFrameBase
    1.19 +{
    1.20 +  friend nsIFrame*
    1.21 +  NS_NewSVGGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
    1.22 +protected:
    1.23 +  nsSVGGFrame(nsStyleContext* aContext) :
    1.24 +    nsSVGGFrameBase(aContext) {}
    1.25 +
    1.26 +public:
    1.27 +  NS_DECL_FRAMEARENA_HELPERS
    1.28 +
    1.29 +#ifdef DEBUG
    1.30 +  virtual void Init(nsIContent*      aContent,
    1.31 +                    nsIFrame*        aParent,
    1.32 +                    nsIFrame*        aPrevInFlow) MOZ_OVERRIDE;
    1.33 +#endif
    1.34 +
    1.35 +  /**
    1.36 +   * Get the "type" of the frame
    1.37 +   *
    1.38 +   * @see nsGkAtoms::svgGFrame
    1.39 +   */
    1.40 +  virtual nsIAtom* GetType() const MOZ_OVERRIDE;
    1.41 +
    1.42 +#ifdef DEBUG_FRAME_DUMP
    1.43 +  virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
    1.44 +  {
    1.45 +    return MakeFrameName(NS_LITERAL_STRING("SVGG"), aResult);
    1.46 +  }
    1.47 +#endif
    1.48 +
    1.49 +  // nsIFrame interface:
    1.50 +  virtual nsresult AttributeChanged(int32_t         aNameSpaceID,
    1.51 +                                    nsIAtom*        aAttribute,
    1.52 +                                    int32_t         aModType) MOZ_OVERRIDE;
    1.53 +
    1.54 +  // nsISVGChildFrame interface:
    1.55 +  virtual void NotifySVGChanged(uint32_t aFlags) MOZ_OVERRIDE;
    1.56 +
    1.57 +  // nsSVGContainerFrame methods:
    1.58 +  virtual gfxMatrix GetCanvasTM(uint32_t aFor,
    1.59 +                                nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
    1.60 +
    1.61 +  nsAutoPtr<gfxMatrix> mCanvasTM;
    1.62 +};
    1.63 +
    1.64 +#endif

mercurial