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

Side by Side Diff: third_party/WebKit/WebCore/platform/graphics/FontCache.h

Issue 56198: Roll out dominantScript, getGenericFontForScript patches to unfork a bunch of... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Computer, 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 13 matching lines...) Expand all
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #ifndef FontCache_h 29 #ifndef FontCache_h
30 #define FontCache_h 30 #define FontCache_h
31 31
32 #include <limits.h> 32 #include <limits.h>
33 #include <wtf/Vector.h> 33 #include <wtf/Vector.h>
34 #include <unicode/uscript.h>
35 #include <wtf/unicode/Unicode.h> 34 #include <wtf/unicode/Unicode.h>
36 35
37 #if PLATFORM(WIN) 36 #if PLATFORM(WIN)
38 #include <objidl.h> 37 #include <objidl.h>
39 #include <mlang.h> 38 #include <mlang.h>
40 #endif 39 #endif
41 40
42 namespace WebCore 41 namespace WebCore
43 { 42 {
44 43
(...skipping 24 matching lines...) Expand all
69 #endif 68 #endif
70 69
71 void getTraitsInFamily(const AtomicString&, Vector<unsigned>&); 70 void getTraitsInFamily(const AtomicString&, Vector<unsigned>&);
72 71
73 FontPlatformData* getCachedFontPlatformData(const FontDescription&, const At omicString& family, bool checkingAlternateName = false); 72 FontPlatformData* getCachedFontPlatformData(const FontDescription&, const At omicString& family, bool checkingAlternateName = false);
74 SimpleFontData* getCachedFontData(const FontPlatformData*); 73 SimpleFontData* getCachedFontData(const FontPlatformData*);
75 FontPlatformData* getLastResortFallbackFont(const FontDescription&); 74 FontPlatformData* getLastResortFallbackFont(const FontDescription&);
76 75
77 void addClient(FontSelector*); 76 void addClient(FontSelector*);
78 void removeClient(FontSelector*); 77 void removeClient(FontSelector*);
79 // TODO(jungshik): Is this the best place to put this function? It may
80 // or may not be. Font.h is another place we can cosider.
81 // Return a font family for |script| and |FontDescription.genericFamily()|.
82 // It will return an empty atom if we can't find a font matching
83 // script and genericFamily in FontDescription. A caller should check
84 // the emptyness before using it.
85 static AtomicString getGenericFontForScript(UScriptCode script, const FontDe scription&);
86 78
87 unsigned generation(); 79 unsigned generation();
88 void invalidate(); 80 void invalidate();
89 81
90 size_t fontDataCount(); 82 size_t fontDataCount();
91 size_t inactiveFontDataCount(); 83 size_t inactiveFontDataCount();
92 void purgeInactiveFontData(int count = INT_MAX); 84 void purgeInactiveFontData(int count = INT_MAX);
93 85
94 private: 86 private:
95 FontCache(); 87 FontCache();
96 88
97 // These methods are implemented by each platform. 89 // These methods are implemented by each platform.
98 FontPlatformData* getSimilarFontPlatformData(const Font&); 90 FontPlatformData* getSimilarFontPlatformData(const Font&);
99 FontPlatformData* createFontPlatformData(const FontDescription&, const Atomi cString& family); 91 FontPlatformData* createFontPlatformData(const FontDescription&, const Atomi cString& family);
100 92
101 friend class SimpleFontData; 93 friend class SimpleFontData;
102 friend class FontFallbackList; 94 friend class FontFallbackList;
103 }; 95 };
104 96
105 // Get the global fontCache. 97 // Get the global fontCache.
106 FontCache* fontCache(); 98 FontCache* fontCache();
107 } 99 }
108 100
109 #endif 101 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/dom/Document.cpp ('k') | third_party/WebKit/WebCore/platform/graphics/FontDescription.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698