Bug 886842 - Add clang trunk builds for ASan. r=froydnj
[gecko.git] / layout / svg / nsSVGTSpanFrame.h
blob5473cea991734b6b29420129e1c5ece27a6d21ce
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef NSSVGTSPANFRAME_H
7 #define NSSVGTSPANFRAME_H
9 #include "mozilla/Attributes.h"
10 #include "gfxMatrix.h"
11 #include "nsFrame.h"
12 #include "nsISVGGlyphFragmentNode.h"
13 #include "nsLiteralString.h"
14 #include "nsQueryFrame.h"
15 #include "nsSVGTextContainerFrame.h"
17 class nsIAtom;
18 class nsIContent;
19 class nsIFrame;
20 class nsIPresShell;
21 class nsStyleContext;
22 class nsSVGGlyphFrame;
24 namespace mozilla {
25 class nsISVGPoint;
28 typedef nsSVGTextContainerFrame nsSVGTSpanFrameBase;
30 class nsSVGTSpanFrame : public nsSVGTSpanFrameBase,
31 public nsISVGGlyphFragmentNode
33 friend nsIFrame*
34 NS_NewSVGTSpanFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
35 protected:
36 nsSVGTSpanFrame(nsStyleContext* aContext) :
37 nsSVGTSpanFrameBase(aContext) {}
39 public:
40 NS_DECL_QUERYFRAME
41 NS_DECL_FRAMEARENA_HELPERS
43 // nsIFrame:
44 #ifdef DEBUG
45 virtual void Init(nsIContent* aContent,
46 nsIFrame* aParent,
47 nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
48 #endif
50 NS_IMETHOD AttributeChanged(int32_t aNameSpaceID,
51 nsIAtom* aAttribute,
52 int32_t aModType) MOZ_OVERRIDE;
54 /**
55 * Get the "type" of the frame
57 * @see nsGkAtoms::svgTSpanFrame
59 virtual nsIAtom* GetType() const MOZ_OVERRIDE;
61 #ifdef DEBUG
62 NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
64 return MakeFrameName(NS_LITERAL_STRING("SVGTSpan"), aResult);
66 #endif
67 // nsSVGContainerFrame methods:
68 virtual gfxMatrix GetCanvasTM(uint32_t aFor) MOZ_OVERRIDE;
70 // nsISVGGlyphFragmentNode interface:
71 virtual uint32_t GetNumberOfChars() MOZ_OVERRIDE;
72 virtual float GetComputedTextLength() MOZ_OVERRIDE;
73 virtual float GetSubStringLength(uint32_t charnum, uint32_t fragmentChars) MOZ_OVERRIDE;
74 virtual int32_t GetCharNumAtPosition(mozilla::nsISVGPoint *point) MOZ_OVERRIDE;
75 NS_IMETHOD_(nsSVGGlyphFrame *) GetFirstGlyphFrame() MOZ_OVERRIDE;
76 NS_IMETHOD_(nsSVGGlyphFrame *) GetNextGlyphFrame() MOZ_OVERRIDE;
77 NS_IMETHOD_(void) SetWhitespaceCompression(bool aCompressWhitespace) MOZ_OVERRIDE;
80 #endif