OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 void fontLoadWaitLimitExceeded(CSSFontFace*); | 59 void fontLoadWaitLimitExceeded(CSSFontFace*); |
60 | 60 |
61 void addFontFace(PassRefPtrWillBeRawPtr<FontFace>, bool cssConnected); | 61 void addFontFace(PassRefPtrWillBeRawPtr<FontFace>, bool cssConnected); |
62 void removeFontFace(PassRefPtrWillBeRawPtr<FontFace>); | 62 void removeFontFace(PassRefPtrWillBeRawPtr<FontFace>); |
63 bool isEmpty() const { return m_fontFaces.isEmpty(); } | 63 bool isEmpty() const { return m_fontFaces.isEmpty(); } |
64 | 64 |
65 PassRefPtr<FontData> getFontData(const FontDescription&); | 65 PassRefPtr<FontData> getFontData(const FontDescription&); |
66 | 66 |
67 bool checkFont(const String&) const; | 67 bool checkFont(const String&) const; |
68 void match(const String&, WillBeHeapVector<RefPtrWillBeMember<FontFace> >&)
const; | 68 void match(const String&, WillBeHeapVector<RefPtrWillBeMember<FontFace> >&)
const; |
69 void willUseFontData(const FontDescription&); | 69 void willUseFontData(const FontDescription&, UChar32); |
70 | 70 |
71 void trace(Visitor*); | 71 void trace(Visitor*); |
72 | 72 |
73 private: | 73 private: |
74 CSSSegmentedFontFace(CSSFontSelector*, FontTraits); | 74 CSSSegmentedFontFace(CSSFontSelector*, FontTraits); |
75 | 75 |
76 void pruneTable(); | 76 void pruneTable(); |
77 bool isValid() const; | 77 bool isValid() const; |
78 bool isLoading() const; | 78 bool isLoading() const; |
79 bool isLoaded() const; | 79 bool isLoaded() const; |
80 | 80 |
81 // FIXME: Oilpan: Replace by HeapLinkedHashSet or HeapListHashSet. | 81 // FIXME: Oilpan: Replace by HeapLinkedHashSet or HeapListHashSet. |
82 typedef ListHashSet<RefPtrWillBeMember<FontFace> > FontFaceList; | 82 typedef ListHashSet<RefPtrWillBeMember<FontFace> > FontFaceList; |
83 | 83 |
84 RawPtrWillBeMember<CSSFontSelector> m_fontSelector; | 84 RawPtrWillBeMember<CSSFontSelector> m_fontSelector; |
85 FontTraits m_traits; | 85 FontTraits m_traits; |
86 HashMap<unsigned, RefPtr<SegmentedFontData> > m_fontDataTable; | 86 HashMap<unsigned, RefPtr<SegmentedFontData> > m_fontDataTable; |
87 // All non-CSS-connected FontFaces are stored after the CSS-connected ones. | 87 // All non-CSS-connected FontFaces are stored after the CSS-connected ones. |
88 FontFaceList m_fontFaces; | 88 FontFaceList m_fontFaces; |
89 FontFaceList::iterator m_firstNonCssConnectedFace; | 89 FontFaceList::iterator m_firstNonCssConnectedFace; |
90 }; | 90 }; |
91 | 91 |
92 } // namespace WebCore | 92 } // namespace WebCore |
93 | 93 |
94 #endif // CSSSegmentedFontFace_h | 94 #endif // CSSSegmentedFontFace_h |
OLD | NEW |