OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "core/dom/DOMError.h" | 38 #include "core/dom/DOMError.h" |
39 #include "platform/fonts/FontTraits.h" | 39 #include "platform/fonts/FontTraits.h" |
40 #include "wtf/PassRefPtr.h" | 40 #include "wtf/PassRefPtr.h" |
41 #include "wtf/RefCounted.h" | 41 #include "wtf/RefCounted.h" |
42 #include "wtf/text/WTFString.h" | 42 #include "wtf/text/WTFString.h" |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
46 class CSSFontFace; | 46 class CSSFontFace; |
47 class CSSValueList; | 47 class CSSValueList; |
48 class Dictionary; | |
49 class Document; | 48 class Document; |
50 class ExceptionState; | 49 class ExceptionState; |
| 50 class FontFaceDescriptors; |
51 class FontFaceReadyPromiseResolver; | 51 class FontFaceReadyPromiseResolver; |
52 class StylePropertySet; | 52 class StylePropertySet; |
53 class StyleRuleFontFace; | 53 class StyleRuleFontFace; |
54 | 54 |
55 class FontFace : public RefCountedWillBeGarbageCollectedFinalized<FontFace>, pub
lic ScriptWrappable { | 55 class FontFace : public RefCountedWillBeGarbageCollectedFinalized<FontFace>, pub
lic ScriptWrappable { |
56 public: | 56 public: |
57 enum LoadStatus { Unloaded, Loading, Loaded, Error }; | 57 enum LoadStatus { Unloaded, Loading, Loaded, Error }; |
58 | 58 |
59 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, PassRefPtr<ArrayBuffer> source, const Dictionary&, ExceptionSt
ate&); | 59 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, PassRefPtr<ArrayBuffer> source, const FontFaceDescriptors*, Ex
ceptionState&); |
60 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, PassRefPtr<ArrayBufferView>, const Dictionary&, ExceptionState
&); | 60 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, PassRefPtr<ArrayBufferView>, const FontFaceDescriptors*, Excep
tionState&); |
61 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, const String& source, const Dictionary&, ExceptionState&); | 61 static PassRefPtrWillBeRawPtr<FontFace> create(ExecutionContext*, const Atom
icString& family, const String& source, const FontFaceDescriptors*, ExceptionSta
te&); |
62 static PassRefPtrWillBeRawPtr<FontFace> create(Document*, const StyleRuleFon
tFace*); | 62 static PassRefPtrWillBeRawPtr<FontFace> create(Document*, const StyleRuleFon
tFace*); |
63 | 63 |
64 ~FontFace(); | 64 ~FontFace(); |
65 | 65 |
66 const AtomicString& family() const { return m_family; } | 66 const AtomicString& family() const { return m_family; } |
67 String style() const; | 67 String style() const; |
68 String weight() const; | 68 String weight() const; |
69 String stretch() const; | 69 String stretch() const; |
70 String unicodeRange() const; | 70 String unicodeRange() const; |
71 String variant() const; | 71 String variant() const; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 Vector<OwnPtr<FontFaceReadyPromiseResolver> > m_readyResolvers; | 131 Vector<OwnPtr<FontFaceReadyPromiseResolver> > m_readyResolvers; |
132 OwnPtrWillBeMember<CSSFontFace> m_cssFontFace; | 132 OwnPtrWillBeMember<CSSFontFace> m_cssFontFace; |
133 WillBeHeapVector<RefPtrWillBeMember<LoadFontCallback> > m_callbacks; | 133 WillBeHeapVector<RefPtrWillBeMember<LoadFontCallback> > m_callbacks; |
134 }; | 134 }; |
135 | 135 |
136 typedef WillBeHeapVector<RefPtrWillBeMember<FontFace> > FontFaceArray; | 136 typedef WillBeHeapVector<RefPtrWillBeMember<FontFace> > FontFaceArray; |
137 | 137 |
138 } // namespace blink | 138 } // namespace blink |
139 | 139 |
140 #endif // FontFace_h | 140 #endif // FontFace_h |
OLD | NEW |