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

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

Issue 2340273002: Fix FontFaceSet state getting stuck at loading (Closed)
Patch Set: Separate test case Created 4 years, 3 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void setError(DOMException* = nullptr); 94 void setError(DOMException* = nullptr);
95 DOMException* error() const { return m_error; } 95 DOMException* error() const { return m_error; }
96 FontTraits traits() const; 96 FontTraits traits() const;
97 CSSFontFace* cssFontFace() { return m_cssFontFace.get(); } 97 CSSFontFace* cssFontFace() { return m_cssFontFace.get(); }
98 size_t approximateBlankCharacterCount() const; 98 size_t approximateBlankCharacterCount() const;
99 99
100 DECLARE_VIRTUAL_TRACE(); 100 DECLARE_VIRTUAL_TRACE();
101 101
102 bool hadBlankText() const; 102 bool hadBlankText() const;
103 103
104 class LoadFontCallback : public GarbageCollectedFinalized<LoadFontCallback> { 104 class LoadFontCallback : public GarbageCollectedMixin {
105 public: 105 public:
106 virtual ~LoadFontCallback() { } 106 virtual ~LoadFontCallback() { }
107 virtual void notifyLoaded(FontFace*) = 0; 107 virtual void notifyLoaded(FontFace*) = 0;
108 virtual void notifyError(FontFace*) = 0; 108 virtual void notifyError(FontFace*) = 0;
109 DEFINE_INLINE_VIRTUAL_TRACE() { } 109 DEFINE_INLINE_VIRTUAL_TRACE() { }
110 }; 110 };
111 void loadWithCallback(LoadFontCallback*, ExecutionContext*); 111 void loadWithCallback(LoadFontCallback*, ExecutionContext*);
112 void addCallback(LoadFontCallback*);
112 113
113 // ScriptWrappable: 114 // ScriptWrappable:
114 bool hasPendingActivity() const final; 115 bool hasPendingActivity() const final;
115 116
116 private: 117 private:
117 static FontFace* create(ExecutionContext*, const AtomicString& family, DOMAr rayBuffer* source, const FontFaceDescriptors&); 118 static FontFace* create(ExecutionContext*, const AtomicString& family, DOMAr rayBuffer* source, const FontFaceDescriptors&);
118 static FontFace* create(ExecutionContext*, const AtomicString& family, DOMAr rayBufferView*, const FontFaceDescriptors&); 119 static FontFace* create(ExecutionContext*, const AtomicString& family, DOMAr rayBufferView*, const FontFaceDescriptors&);
119 static FontFace* create(ExecutionContext*, const AtomicString& family, const String& source, const FontFaceDescriptors&); 120 static FontFace* create(ExecutionContext*, const AtomicString& family, const String& source, const FontFaceDescriptors&);
120 121
121 explicit FontFace(ExecutionContext*); 122 explicit FontFace(ExecutionContext*);
(...skipping 25 matching lines...) Expand all
147 Member<LoadedProperty> m_loadedProperty; 148 Member<LoadedProperty> m_loadedProperty;
148 Member<CSSFontFace> m_cssFontFace; 149 Member<CSSFontFace> m_cssFontFace;
149 HeapVector<Member<LoadFontCallback>> m_callbacks; 150 HeapVector<Member<LoadFontCallback>> m_callbacks;
150 }; 151 };
151 152
152 using FontFaceArray = HeapVector<Member<FontFace>>; 153 using FontFaceArray = HeapVector<Member<FontFace>>;
153 154
154 } // namespace blink 155 } // namespace blink
155 156
156 #endif // FontFace_h 157 #endif // FontFace_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontFace.cpp ('k') | third_party/WebKit/Source/core/css/FontFace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698