Bumping manifests a=b2g-bump
[gecko.git] / layout / generic / MathMLTextRunFactory.h
blob5783672e07f9c98dd37d736cb294b76e3aadf703
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 MATHMLTEXTRUNFACTORY_H_
7 #define MATHMLTEXTRUNFACTORY_H_
9 #include "nsTextRunTransformations.h"
11 /**
12 * Builds textruns that render their text with MathML specific renderings.
14 class MathMLTextRunFactory : public nsTransformingTextRunFactory {
15 public:
16 MathMLTextRunFactory(nsTransformingTextRunFactory* aInnerTransformingTextRunFactory,
17 uint32_t aFlags, uint8_t aSSTYScriptLevel,
18 float aFontInflation)
19 : mInnerTransformingTextRunFactory(aInnerTransformingTextRunFactory),
20 mFlags(aFlags),
21 mFontInflation(aFontInflation),
22 mSSTYScriptLevel(aSSTYScriptLevel) {}
24 virtual void RebuildTextRun(nsTransformedTextRun* aTextRun,
25 gfxContext* aRefContext,
26 gfxMissingFontRecorder* aMFR) MOZ_OVERRIDE;
27 enum {
28 // Style effects which may override single character <mi> behaviour
29 MATH_FONT_STYLING_NORMAL = 0x1, // fontstyle="normal" has been set.
30 MATH_FONT_WEIGHT_BOLD = 0x2, // fontweight="bold" has been set.
31 MATH_FONT_FEATURE_DTLS = 0x4, // font feature dtls should be set
34 protected:
35 nsAutoPtr<nsTransformingTextRunFactory> mInnerTransformingTextRunFactory;
36 uint32_t mFlags;
37 float mFontInflation;
38 uint8_t mSSTYScriptLevel;
41 #endif /*MATHMLTEXTRUNFACTORY_H_*/