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

Side by Side Diff: Source/core/css/CSSFontSelector.h

Issue 93783005: Store a copy of generic font settings at CSSFontSelector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/css/CSSFontSelector.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2011 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
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 12 matching lines...) Expand all
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef CSSFontSelector_h 26 #ifndef CSSFontSelector_h
27 #define CSSFontSelector_h 27 #define CSSFontSelector_h
28 28
29 #include "core/css/CSSSegmentedFontFaceCache.h" 29 #include "core/css/CSSSegmentedFontFaceCache.h"
30 #include "core/fetch/ResourcePtr.h" 30 #include "core/fetch/ResourcePtr.h"
31 #include "platform/Timer.h" 31 #include "platform/Timer.h"
32 #include "platform/fonts/FontSelector.h" 32 #include "platform/fonts/FontSelector.h"
33 #include "platform/fonts/GenericFontFamilySettings.h"
33 #include "wtf/Forward.h" 34 #include "wtf/Forward.h"
34 #include "wtf/HashMap.h" 35 #include "wtf/HashMap.h"
35 #include "wtf/HashSet.h" 36 #include "wtf/HashSet.h"
36 37
37 namespace WebCore { 38 namespace WebCore {
38 39
39 class CSSFontFace; 40 class CSSFontFace;
40 class CSSFontFaceRule; 41 class CSSFontFaceRule;
41 class CSSSegmentedFontFace; 42 class CSSSegmentedFontFace;
42 class FontResource; 43 class FontResource;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 void removeFontFaceRule(const StyleRuleFontFace*); 82 void removeFontFaceRule(const StyleRuleFontFace*);
82 83
83 void fontLoaded(); 84 void fontLoaded();
84 virtual void fontCacheInvalidated(); 85 virtual void fontCacheInvalidated();
85 86
86 virtual void registerForInvalidationCallbacks(FontSelectorClient*); 87 virtual void registerForInvalidationCallbacks(FontSelectorClient*);
87 virtual void unregisterForInvalidationCallbacks(FontSelectorClient*); 88 virtual void unregisterForInvalidationCallbacks(FontSelectorClient*);
88 89
89 Document* document() const { return m_document; } 90 Document* document() const { return m_document; }
90 91
92 const GenericFontFamilySettings& genericFontFamilySettings() const { return m_genericFontFamilySettings; }
93
91 void beginLoadingFontSoon(FontResource*); 94 void beginLoadingFontSoon(FontResource*);
92 void loadPendingFonts(); 95 void loadPendingFonts();
93 96
94 private: 97 private:
95 explicit CSSFontSelector(Document*); 98 explicit CSSFontSelector(Document*);
96 99
97 void dispatchInvalidationCallbacks(); 100 void dispatchInvalidationCallbacks();
98 101
99 Document* m_document; 102 Document* m_document;
100 // FIXME: Move to Document or StyleEngine. 103 // FIXME: Move to Document or StyleEngine.
101 CSSSegmentedFontFaceCache m_cssSegmentedFontFaceCache; 104 CSSSegmentedFontFaceCache m_cssSegmentedFontFaceCache;
102 HashSet<FontSelectorClient*> m_clients; 105 HashSet<FontSelectorClient*> m_clients;
103 106
104 FontLoader m_fontLoader; 107 FontLoader m_fontLoader;
108 GenericFontFamilySettings m_genericFontFamilySettings;
esprehn 2013/12/04 00:57:23 Why not store a reference to it?
105 }; 109 };
106 110
107 } // namespace WebCore 111 } // namespace WebCore
108 112
109 #endif // CSSFontSelector_h 113 #endif // CSSFontSelector_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/CSSFontSelector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698