OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 private: | 61 private: |
62 FontFallbackList& m_fallbackList; | 62 FontFallbackList& m_fallbackList; |
63 GlyphPages& m_pages; | 63 GlyphPages& m_pages; |
64 GlyphPageTreeNode* m_pageZero; | 64 GlyphPageTreeNode* m_pageZero; |
65 }; | 65 }; |
66 | 66 |
67 static PassRefPtr<FontFallbackList> create() { return adoptRef(new FontFallb
ackList()); } | 67 static PassRefPtr<FontFallbackList> create() { return adoptRef(new FontFallb
ackList()); } |
68 | 68 |
69 ~FontFallbackList() { releaseFontData(); } | 69 ~FontFallbackList() { releaseFontData(); } |
70 void invalidate(PassRefPtrWillBeRawPtr<FontSelector>); | 70 void invalidate(PassRefPtr<FontSelector>); |
71 | 71 |
72 bool isFixedPitch(const FontDescription& fontDescription) const | 72 bool isFixedPitch(const FontDescription& fontDescription) const |
73 { | 73 { |
74 if (m_pitch == UnknownPitch) | 74 if (m_pitch == UnknownPitch) |
75 determinePitch(fontDescription); | 75 determinePitch(fontDescription); |
76 return m_pitch == FixedPitch; | 76 return m_pitch == FixedPitch; |
77 } | 77 } |
78 void determinePitch(const FontDescription&) const; | 78 void determinePitch(const FontDescription&) const; |
79 | 79 |
80 bool loadingCustomFonts() const; | 80 bool loadingCustomFonts() const; |
(...skipping 21 matching lines...) Expand all Loading... |
102 | 102 |
103 const FontData* primaryFontData(const FontDescription&) const; | 103 const FontData* primaryFontData(const FontDescription&) const; |
104 const FontData* fontDataAt(const FontDescription&, unsigned index) const; | 104 const FontData* fontDataAt(const FontDescription&, unsigned index) const; |
105 | 105 |
106 void releaseFontData(); | 106 void releaseFontData(); |
107 | 107 |
108 mutable Vector<RefPtr<FontData>, 1> m_fontList; | 108 mutable Vector<RefPtr<FontData>, 1> m_fontList; |
109 mutable GlyphPages m_pages; | 109 mutable GlyphPages m_pages; |
110 mutable GlyphPageTreeNode* m_pageZero; | 110 mutable GlyphPageTreeNode* m_pageZero; |
111 mutable const SimpleFontData* m_cachedPrimarySimpleFontData; | 111 mutable const SimpleFontData* m_cachedPrimarySimpleFontData; |
112 RefPtrWillBePersistent<FontSelector> m_fontSelector; | 112 RefPtr<FontSelector> m_fontSelector; |
113 mutable WidthCache m_widthCache; | 113 mutable WidthCache m_widthCache; |
114 unsigned m_fontSelectorVersion; | 114 unsigned m_fontSelectorVersion; |
115 mutable int m_familyIndex; | 115 mutable int m_familyIndex; |
116 unsigned short m_generation; | 116 unsigned short m_generation; |
117 mutable unsigned m_pitch : 3; // Pitch | 117 mutable unsigned m_pitch : 3; // Pitch |
118 mutable bool m_hasLoadingFallback : 1; | 118 mutable bool m_hasLoadingFallback : 1; |
119 | 119 |
120 friend class Font; | 120 friend class Font; |
121 }; | 121 }; |
122 | 122 |
123 } | 123 } |
124 | 124 |
125 #endif | 125 #endif |
OLD | NEW |