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

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

Issue 2624893003: Move the FontFaceCache stored in CSSFontSelector to be stored in Document. (Closed)
Patch Set: Rebase Created 3 years, 10 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 met: 5 * modification, are permitted provided that the following conditions are met:
6 * 6 *
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // method 42 // method
43 #ifdef check 43 #ifdef check
44 #undef check 44 #undef check
45 #endif 45 #endif
46 46
47 namespace blink { 47 namespace blink {
48 48
49 class CSSFontSelector; 49 class CSSFontSelector;
50 class ExceptionState; 50 class ExceptionState;
51 class Font; 51 class Font;
52 class FontFaceCache;
53 class ExecutionContext; 52 class ExecutionContext;
54 53
55 using FontFaceSetIterable = PairIterable<Member<FontFace>, Member<FontFace>>; 54 using FontFaceSetIterable = PairIterable<Member<FontFace>, Member<FontFace>>;
56 55
57 class FontFaceSet final : public EventTargetWithInlineData, 56 class FontFaceSet final : public EventTargetWithInlineData,
58 public Supplement<Document>, 57 public Supplement<Document>,
59 public SuspendableObject, 58 public SuspendableObject,
60 public FontFaceSetIterable, 59 public FontFaceSetIterable,
61 public FontFace::LoadFontCallback { 60 public FontFace::LoadFontCallback {
62 USING_GARBAGE_COLLECTED_MIXIN(FontFaceSet); 61 USING_GARBAGE_COLLECTED_MIXIN(FontFaceSet);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void suspend() override; 99 void suspend() override;
101 void resume() override; 100 void resume() override;
102 void contextDestroyed(ExecutionContext*) override; 101 void contextDestroyed(ExecutionContext*) override;
103 102
104 static FontFaceSet* from(Document&); 103 static FontFaceSet* from(Document&);
105 static void didLayout(Document&); 104 static void didLayout(Document&);
106 static size_t approximateBlankCharacterCount(Document&); 105 static size_t approximateBlankCharacterCount(Document&);
107 106
108 static const char* supplementName() { return "FontFaceSet"; } 107 static const char* supplementName() { return "FontFaceSet"; }
109 108
110 void addFontFacesToFontFaceCache(FontFaceCache*, CSSFontSelector*); 109 void addFontFacesToFontFaceCache(CSSFontSelector*);
111 110
112 DECLARE_VIRTUAL_TRACE(); 111 DECLARE_VIRTUAL_TRACE();
113 112
114 private: 113 private:
115 static FontFaceSet* create(Document& document) { 114 static FontFaceSet* create(Document& document) {
116 return new FontFaceSet(document); 115 return new FontFaceSet(document);
117 } 116 }
118 117
119 FontFaceSetIterable::IterationSource* startIteration( 118 FontFaceSetIterable::IterationSource* startIteration(
120 ScriptState*, 119 ScriptState*,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 HeapListHashSet<Member<FontFace>> m_nonCSSConnectedFaces; 181 HeapListHashSet<Member<FontFace>> m_nonCSSConnectedFaces;
183 182
184 Member<AsyncMethodRunner<FontFaceSet>> m_asyncRunner; 183 Member<AsyncMethodRunner<FontFaceSet>> m_asyncRunner;
185 184
186 FontLoadHistogram m_histogram; 185 FontLoadHistogram m_histogram;
187 }; 186 };
188 187
189 } // namespace blink 188 } // namespace blink
190 189
191 #endif // FontFaceSet_h 190 #endif // FontFaceSet_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontSelector.cpp ('k') | third_party/WebKit/Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698