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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 class CSSFontFace; | 47 class CSSFontFace; |
48 class CSSValue; | 48 class CSSValue; |
49 class DOMArrayBuffer; | 49 class DOMArrayBuffer; |
50 class DOMArrayBufferView; | 50 class DOMArrayBufferView; |
51 class Document; | 51 class Document; |
52 class ExceptionState; | 52 class ExceptionState; |
53 class FontFaceDescriptors; | 53 class FontFaceDescriptors; |
54 class StringOrArrayBufferOrArrayBufferView; | 54 class StringOrArrayBufferOrArrayBufferView; |
55 class StylePropertySet; | 55 class StylePropertySet; |
56 class StyleRuleFontFace; | 56 class StyleRuleFontFace; |
| 57 class WebTaskRunner; |
57 | 58 |
58 class FontFace : public GarbageCollectedFinalized<FontFace>, | 59 class FontFace : public GarbageCollectedFinalized<FontFace>, |
59 public ScriptWrappable, | 60 public ScriptWrappable, |
60 public ActiveScriptWrappable<FontFace>, | 61 public ActiveScriptWrappable<FontFace>, |
61 public ContextLifecycleObserver { | 62 public ContextLifecycleObserver { |
62 DEFINE_WRAPPERTYPEINFO(); | 63 DEFINE_WRAPPERTYPEINFO(); |
63 USING_GARBAGE_COLLECTED_MIXIN(FontFace); | 64 USING_GARBAGE_COLLECTED_MIXIN(FontFace); |
64 WTF_MAKE_NONCOPYABLE(FontFace); | 65 WTF_MAKE_NONCOPYABLE(FontFace); |
65 | 66 |
66 public: | 67 public: |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 void initCSSFontFace(const unsigned char* data, size_t); | 149 void initCSSFontFace(const unsigned char* data, size_t); |
149 void setPropertyFromString(const Document*, | 150 void setPropertyFromString(const Document*, |
150 const String&, | 151 const String&, |
151 CSSPropertyID, | 152 CSSPropertyID, |
152 ExceptionState* = 0); | 153 ExceptionState* = 0); |
153 bool setPropertyFromStyle(const StylePropertySet&, CSSPropertyID); | 154 bool setPropertyFromStyle(const StylePropertySet&, CSSPropertyID); |
154 bool setPropertyValue(const CSSValue*, CSSPropertyID); | 155 bool setPropertyValue(const CSSValue*, CSSPropertyID); |
155 bool setFamilyValue(const CSSValue&); | 156 bool setFamilyValue(const CSSValue&); |
156 void loadInternal(ExecutionContext*); | 157 void loadInternal(ExecutionContext*); |
157 ScriptPromise fontStatusPromise(ScriptState*); | 158 ScriptPromise fontStatusPromise(ScriptState*); |
| 159 WebTaskRunner* getTaskRunner(); |
| 160 void runCallbacks(); |
158 | 161 |
159 using LoadedProperty = ScriptPromiseProperty<Member<FontFace>, | 162 using LoadedProperty = ScriptPromiseProperty<Member<FontFace>, |
160 Member<FontFace>, | 163 Member<FontFace>, |
161 Member<DOMException>>; | 164 Member<DOMException>>; |
162 | 165 |
163 AtomicString m_family; | 166 AtomicString m_family; |
164 String m_otsParseMessage; | 167 String m_otsParseMessage; |
165 Member<const CSSValue> m_style; | 168 Member<const CSSValue> m_style; |
166 Member<const CSSValue> m_weight; | 169 Member<const CSSValue> m_weight; |
167 Member<const CSSValue> m_stretch; | 170 Member<const CSSValue> m_stretch; |
168 Member<const CSSValue> m_unicodeRange; | 171 Member<const CSSValue> m_unicodeRange; |
169 Member<const CSSValue> m_variant; | 172 Member<const CSSValue> m_variant; |
170 Member<const CSSValue> m_featureSettings; | 173 Member<const CSSValue> m_featureSettings; |
171 Member<const CSSValue> m_display; | 174 Member<const CSSValue> m_display; |
172 LoadStatusType m_status; | 175 LoadStatusType m_status; |
173 Member<DOMException> m_error; | 176 Member<DOMException> m_error; |
174 | 177 |
175 Member<LoadedProperty> m_loadedProperty; | 178 Member<LoadedProperty> m_loadedProperty; |
176 Member<CSSFontFace> m_cssFontFace; | 179 Member<CSSFontFace> m_cssFontFace; |
177 HeapVector<Member<LoadFontCallback>> m_callbacks; | 180 HeapVector<Member<LoadFontCallback>> m_callbacks; |
178 }; | 181 }; |
179 | 182 |
180 using FontFaceArray = HeapVector<Member<FontFace>>; | 183 using FontFaceArray = HeapVector<Member<FontFace>>; |
181 | 184 |
182 } // namespace blink | 185 } // namespace blink |
183 | 186 |
184 #endif // FontFace_h | 187 #endif // FontFace_h |
OLD | NEW |