layout/svg/nsSVGInnerSVGFrame.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/svg/nsSVGInnerSVGFrame.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,78 @@
     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 __NS_SVGINNERSVGFRAME_H__
    1.10 +#define __NS_SVGINNERSVGFRAME_H__
    1.11 +
    1.12 +#include "mozilla/Attributes.h"
    1.13 +#include "nsSVGContainerFrame.h"
    1.14 +#include "nsISVGSVGFrame.h"
    1.15 +
    1.16 +class nsRenderingContext;
    1.17 +
    1.18 +typedef nsSVGDisplayContainerFrame nsSVGInnerSVGFrameBase;
    1.19 +
    1.20 +class nsSVGInnerSVGFrame : public nsSVGInnerSVGFrameBase,
    1.21 +                           public nsISVGSVGFrame
    1.22 +{
    1.23 +  friend nsIFrame*
    1.24 +  NS_NewSVGInnerSVGFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
    1.25 +protected:
    1.26 +  nsSVGInnerSVGFrame(nsStyleContext* aContext) :
    1.27 +    nsSVGInnerSVGFrameBase(aContext) {}
    1.28 +  
    1.29 +public:
    1.30 +  NS_DECL_QUERYFRAME_TARGET(nsSVGInnerSVGFrame)
    1.31 +  NS_DECL_QUERYFRAME
    1.32 +  NS_DECL_FRAMEARENA_HELPERS
    1.33 +
    1.34 +#ifdef DEBUG
    1.35 +  virtual void Init(nsIContent*      aContent,
    1.36 +                    nsIFrame*        aParent,
    1.37 +                    nsIFrame*        aPrevInFlow) MOZ_OVERRIDE;
    1.38 +#endif
    1.39 +
    1.40 +  /**
    1.41 +   * Get the "type" of the frame
    1.42 +   *
    1.43 +   * @see nsGkAtoms::svgInnerSVGFrame
    1.44 +   */
    1.45 +  virtual nsIAtom* GetType() const MOZ_OVERRIDE;
    1.46 +
    1.47 +#ifdef DEBUG_FRAME_DUMP
    1.48 +  virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
    1.49 +  {
    1.50 +    return MakeFrameName(NS_LITERAL_STRING("SVGInnerSVG"), aResult);
    1.51 +  }
    1.52 +#endif
    1.53 +
    1.54 +  virtual nsresult  AttributeChanged(int32_t         aNameSpaceID,
    1.55 +                                     nsIAtom*        aAttribute,
    1.56 +                                     int32_t         aModType) MOZ_OVERRIDE;
    1.57 +
    1.58 +  // nsISVGChildFrame interface:
    1.59 +  virtual nsresult PaintSVG(nsRenderingContext *aContext,
    1.60 +                            const nsIntRect *aDirtyRect,
    1.61 +                            nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
    1.62 +  virtual void ReflowSVG() MOZ_OVERRIDE;
    1.63 +  virtual void NotifySVGChanged(uint32_t aFlags) MOZ_OVERRIDE;
    1.64 +  virtual nsIFrame* GetFrameForPoint(const nsPoint &aPoint) MOZ_OVERRIDE;
    1.65 +
    1.66 +  // nsSVGContainerFrame methods:
    1.67 +  virtual gfxMatrix GetCanvasTM(uint32_t aFor,
    1.68 +                                nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
    1.69 +
    1.70 +  virtual bool HasChildrenOnlyTransform(Matrix *aTransform) const MOZ_OVERRIDE;
    1.71 +
    1.72 +  // nsISVGSVGFrame interface:
    1.73 +  virtual void NotifyViewportOrTransformChanged(uint32_t aFlags) MOZ_OVERRIDE;
    1.74 +
    1.75 +protected:
    1.76 +
    1.77 +  nsAutoPtr<gfxMatrix> mCanvasTM;
    1.78 +};
    1.79 +
    1.80 +#endif
    1.81 +

mercurial