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

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

Issue 2583093002: Reduce SuspendableObjects (Closed)
Patch Set: Created 4 years 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 19 matching lines...) Expand all
30 30
31 #ifndef FontFace_h 31 #ifndef FontFace_h
32 #define FontFace_h 32 #define FontFace_h
33 33
34 #include "bindings/core/v8/ActiveScriptWrappable.h" 34 #include "bindings/core/v8/ActiveScriptWrappable.h"
35 #include "bindings/core/v8/ScriptPromise.h" 35 #include "bindings/core/v8/ScriptPromise.h"
36 #include "bindings/core/v8/ScriptPromiseProperty.h" 36 #include "bindings/core/v8/ScriptPromiseProperty.h"
37 #include "bindings/core/v8/ScriptWrappable.h" 37 #include "bindings/core/v8/ScriptWrappable.h"
38 #include "core/CSSPropertyNames.h" 38 #include "core/CSSPropertyNames.h"
39 #include "core/css/CSSValue.h" 39 #include "core/css/CSSValue.h"
40 #include "core/dom/ContextLifecycleObserver.h"
40 #include "core/dom/DOMException.h" 41 #include "core/dom/DOMException.h"
41 #include "core/dom/SuspendableObject.h"
42 #include "platform/fonts/FontTraits.h" 42 #include "platform/fonts/FontTraits.h"
43 #include "wtf/text/WTFString.h" 43 #include "wtf/text/WTFString.h"
44 44
45 namespace blink { 45 namespace blink {
46 46
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 57
58 class FontFace : public GarbageCollectedFinalized<FontFace>, 58 class FontFace : public GarbageCollectedFinalized<FontFace>,
59 public ScriptWrappable, 59 public ScriptWrappable,
60 public ActiveScriptWrappable<FontFace>, 60 public ActiveScriptWrappable<FontFace>,
61 public SuspendableObject { 61 public ContextLifecycleObserver {
62 DEFINE_WRAPPERTYPEINFO(); 62 DEFINE_WRAPPERTYPEINFO();
63 USING_GARBAGE_COLLECTED_MIXIN(FontFace); 63 USING_GARBAGE_COLLECTED_MIXIN(FontFace);
64 WTF_MAKE_NONCOPYABLE(FontFace); 64 WTF_MAKE_NONCOPYABLE(FontFace);
65 65
66 public: 66 public:
67 enum LoadStatusType { Unloaded, Loading, Loaded, Error }; 67 enum LoadStatusType { Unloaded, Loading, Loaded, Error };
68 68
69 static FontFace* create(ExecutionContext*, 69 static FontFace* create(ExecutionContext*,
70 const AtomicString& family, 70 const AtomicString& family,
71 StringOrArrayBufferOrArrayBufferView&, 71 StringOrArrayBufferOrArrayBufferView&,
72 const FontFaceDescriptors&); 72 const FontFaceDescriptors&);
73 static FontFace* create(Document*, const StyleRuleFontFace*); 73 static FontFace* create(Document*, const StyleRuleFontFace*);
74 74
75 ~FontFace(); 75 virtual ~FontFace();
76 76
77 const AtomicString& family() const { return m_family; } 77 const AtomicString& family() const { return m_family; }
78 String style() const; 78 String style() const;
79 String weight() const; 79 String weight() const;
80 String stretch() const; 80 String stretch() const;
81 String unicodeRange() const; 81 String unicodeRange() const;
82 String variant() const; 82 String variant() const;
83 String featureSettings() const; 83 String featureSettings() const;
84 84
85 // FIXME: Changing these attributes should affect font matching. 85 // FIXME: Changing these attributes should affect font matching.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 Member<LoadedProperty> m_loadedProperty; 175 Member<LoadedProperty> m_loadedProperty;
176 Member<CSSFontFace> m_cssFontFace; 176 Member<CSSFontFace> m_cssFontFace;
177 HeapVector<Member<LoadFontCallback>> m_callbacks; 177 HeapVector<Member<LoadFontCallback>> m_callbacks;
178 }; 178 };
179 179
180 using FontFaceArray = HeapVector<Member<FontFace>>; 180 using FontFaceArray = HeapVector<Member<FontFace>>;
181 181
182 } // namespace blink 182 } // namespace blink
183 183
184 #endif // FontFace_h 184 #endif // FontFace_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/Animation.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