Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: third_party/WebKit/Source/core/css/FontFace.h

Issue 2610593002: Make CSSFontFace::setLoadStatus post a task (Closed)
Patch Set: Add comment Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void initCSSFontFace(Document*, const CSSValue* src); 148 void initCSSFontFace(Document*, const CSSValue* src);
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 ScriptPromise fontStatusPromise(ScriptState*); 157 ScriptPromise fontStatusPromise(ScriptState*);
158 WebTaskRunner* getTaskRunner();
159 void runCallbacks();
157 160
158 using LoadedProperty = ScriptPromiseProperty<Member<FontFace>, 161 using LoadedProperty = ScriptPromiseProperty<Member<FontFace>,
159 Member<FontFace>, 162 Member<FontFace>,
160 Member<DOMException>>; 163 Member<DOMException>>;
161 164
162 AtomicString m_family; 165 AtomicString m_family;
163 String m_otsParseMessage; 166 String m_otsParseMessage;
164 Member<const CSSValue> m_style; 167 Member<const CSSValue> m_style;
165 Member<const CSSValue> m_weight; 168 Member<const CSSValue> m_weight;
166 Member<const CSSValue> m_stretch; 169 Member<const CSSValue> m_stretch;
167 Member<const CSSValue> m_unicodeRange; 170 Member<const CSSValue> m_unicodeRange;
168 Member<const CSSValue> m_variant; 171 Member<const CSSValue> m_variant;
169 Member<const CSSValue> m_featureSettings; 172 Member<const CSSValue> m_featureSettings;
170 Member<const CSSValue> m_display; 173 Member<const CSSValue> m_display;
171 LoadStatusType m_status; 174 LoadStatusType m_status;
172 Member<DOMException> m_error; 175 Member<DOMException> m_error;
173 176
174 Member<LoadedProperty> m_loadedProperty; 177 Member<LoadedProperty> m_loadedProperty;
175 Member<CSSFontFace> m_cssFontFace; 178 Member<CSSFontFace> m_cssFontFace;
176 HeapVector<Member<LoadFontCallback>> m_callbacks; 179 HeapVector<Member<LoadFontCallback>> m_callbacks;
177 }; 180 };
178 181
179 using FontFaceArray = HeapVector<Member<FontFace>>; 182 using FontFaceArray = HeapVector<Member<FontFace>>;
180 183
181 } // namespace blink 184 } // namespace blink
182 185
183 #endif // FontFace_h 186 #endif // FontFace_h
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/fontface-properties.html ('k') | third_party/WebKit/Source/core/css/FontFace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698