Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / layout / svg / base / src / nsSVGContainerFrame.h
blob9be1181d38e295d0b0de1430d58ee2da1c62c89c
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is the Mozilla SVG project.
17 * The Initial Developer of the Original Code is IBM Corporation.
18 * Portions created by the Initial Developer are Copyright (C) 2006
19 * the Initial Developer. All Rights Reserved.
21 * Contributor(s):
23 * Alternatively, the contents of this file may be used under the terms of
24 * either the GNU General Public License Version 2 or later (the "GPL"), or
25 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26 * in which case the provisions of the GPL or the LGPL are applicable instead
27 * of those above. If you wish to allow use of your version of this file only
28 * under the terms of either the GPL or the LGPL, and not to allow others to
29 * use your version of this file under the terms of the MPL, indicate your
30 * decision by deleting the provisions above and replace them with the notice
31 * and other provisions required by the GPL or the LGPL. If you do not delete
32 * the provisions above, a recipient may use your version of this file under
33 * the terms of any one of the MPL, the GPL or the LGPL.
35 * ***** END LICENSE BLOCK ***** */
37 #ifndef NS_SVGCONTAINERFRAME_H
38 #define NS_SVGCONTAINERFRAME_H
40 #include "nsContainerFrame.h"
41 #include "nsISVGChildFrame.h"
42 #include "nsIDOMSVGMatrix.h"
43 #include "nsSVGSVGElement.h"
45 typedef nsContainerFrame nsSVGContainerFrameBase;
47 class nsSVGContainerFrame : public nsSVGContainerFrameBase
49 friend nsIFrame* NS_NewSVGContainerFrame(nsIPresShell* aPresShell,
50 nsIContent* aContent,
51 nsStyleContext* aContext);
52 protected:
53 nsSVGContainerFrame(nsStyleContext* aContext) :
54 nsSVGContainerFrameBase(aContext) {}
56 public:
57 // Returns the transform to our gfxContext (to device pixels, not CSS px)
58 virtual already_AddRefed<nsIDOMSVGMatrix> GetCanvasTM() { return nsnull; }
60 // nsIFrame:
61 NS_IMETHOD AppendFrames(nsIAtom* aListName,
62 nsIFrame* aFrameList);
63 NS_IMETHOD InsertFrames(nsIAtom* aListName,
64 nsIFrame* aPrevFrame,
65 nsIFrame* aFrameList);
66 NS_IMETHOD RemoveFrame(nsIAtom* aListName,
67 nsIFrame* aOldFrame);
68 NS_IMETHOD Init(nsIContent* aContent,
69 nsIFrame* aParent,
70 nsIFrame* aPrevInFlow);
72 virtual PRBool IsFrameOfType(PRUint32 aFlags) const
74 return nsSVGContainerFrameBase::IsFrameOfType(
75 aFlags & ~(nsIFrame::eSVG | nsIFrame::eSVGContainer));
79 class nsSVGDisplayContainerFrame : public nsSVGContainerFrame,
80 public nsISVGChildFrame
82 protected:
83 nsSVGDisplayContainerFrame(nsStyleContext* aContext) :
84 nsSVGContainerFrame(aContext) {}
86 public:
87 // nsISupports interface:
88 NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
89 private:
90 NS_IMETHOD_(nsrefcnt) AddRef() { return 1; }
91 NS_IMETHOD_(nsrefcnt) Release() { return 1; }
93 public:
94 // nsIFrame:
95 NS_IMETHOD InsertFrames(nsIAtom* aListName,
96 nsIFrame* aPrevFrame,
97 nsIFrame* aFrameList);
98 NS_IMETHOD RemoveFrame(nsIAtom* aListName,
99 nsIFrame* aOldFrame);
100 NS_IMETHOD Init(nsIContent* aContent,
101 nsIFrame* aParent,
102 nsIFrame* aPrevInFlow);
104 // nsISVGChildFrame interface:
105 NS_IMETHOD PaintSVG(nsSVGRenderState* aContext,
106 const nsIntRect *aDirtyRect);
107 NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint);
108 NS_IMETHOD_(nsRect) GetCoveredRegion();
109 NS_IMETHOD UpdateCoveredRegion();
110 NS_IMETHOD InitialUpdate();
111 virtual void NotifySVGChanged(PRUint32 aFlags);
112 NS_IMETHOD NotifyRedrawSuspended();
113 NS_IMETHOD NotifyRedrawUnsuspended();
114 NS_IMETHOD SetMatrixPropagation(PRBool aPropagate);
115 virtual PRBool GetMatrixPropagation();
116 NS_IMETHOD GetBBox(nsIDOMSVGRect **_retval);
117 NS_IMETHOD_(PRBool) IsDisplayContainer() { return PR_TRUE; }
118 NS_IMETHOD_(PRBool) HasValidCoveredRect() { return PR_FALSE; }
121 #endif