|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 |
|
5 #ifndef __nsFontFace_h__ |
|
6 #define __nsFontFace_h__ |
|
7 |
|
8 #include "nsIDOMFontFace.h" |
|
9 #include "nsAutoPtr.h" |
|
10 |
|
11 class gfxFontEntry; |
|
12 class gfxFontGroup; |
|
13 class nsCSSFontFaceRule; |
|
14 |
|
15 class nsFontFace : public nsIDOMFontFace |
|
16 { |
|
17 public: |
|
18 NS_DECL_ISUPPORTS |
|
19 NS_DECL_NSIDOMFONTFACE |
|
20 |
|
21 nsFontFace(gfxFontEntry* aFontEntry, |
|
22 gfxFontGroup* aFontGroup, |
|
23 uint8_t aMatchInfo); |
|
24 virtual ~nsFontFace(); |
|
25 |
|
26 gfxFontEntry* GetFontEntry() const { return mFontEntry.get(); } |
|
27 |
|
28 void AddMatchType(uint8_t aMatchType) { |
|
29 mMatchType |= aMatchType; |
|
30 } |
|
31 |
|
32 protected: |
|
33 nsRefPtr<gfxFontEntry> mFontEntry; |
|
34 nsRefPtr<gfxFontGroup> mFontGroup; |
|
35 uint8_t mMatchType; |
|
36 }; |
|
37 |
|
38 #endif // __nsFontFace_h__ |