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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 void fontFaceInvalidated(); | 60 void fontFaceInvalidated(); |
61 | 61 |
62 void addFontFace(FontFace*, bool cssConnected); | 62 void addFontFace(FontFace*, bool cssConnected); |
63 void removeFontFace(FontFace*); | 63 void removeFontFace(FontFace*); |
64 bool isEmpty() const { return m_fontFaces.isEmpty(); } | 64 bool isEmpty() const { return m_fontFaces.isEmpty(); } |
65 | 65 |
66 PassRefPtr<FontData> getFontData(const FontDescription&); | 66 PassRefPtr<FontData> getFontData(const FontDescription&); |
67 | 67 |
68 bool checkFont(const String&) const; | 68 bool checkFont(const String&) const; |
69 void match(const String&, HeapVector<Member<FontFace>>&) const; | 69 void match(const String&, HeapVector<Member<FontFace>>&) const; |
70 void willUseFontData(const FontDescription&, UChar32); | 70 void willUseFontData(const FontDescription&, const String& text); |
71 void willUseRange(const FontDescription&, const blink::FontDataForRangeSet&)
; | 71 void willUseRange(const FontDescription&, const blink::FontDataForRangeSet&)
; |
72 | 72 |
73 DECLARE_TRACE(); | 73 DECLARE_TRACE(); |
74 | 74 |
75 private: | 75 private: |
76 CSSSegmentedFontFace(CSSFontSelector*, FontTraits); | 76 CSSSegmentedFontFace(CSSFontSelector*, FontTraits); |
77 | 77 |
78 void pruneTable(); | 78 void pruneTable(); |
79 bool isValid() const; | 79 bool isValid() const; |
80 | 80 |
81 using FontFaceList = HeapListHashSet<Member<FontFace>>; | 81 using FontFaceList = HeapListHashSet<Member<FontFace>>; |
82 | 82 |
83 Member<CSSFontSelector> m_fontSelector; | 83 Member<CSSFontSelector> m_fontSelector; |
84 FontTraits m_traits; | 84 FontTraits m_traits; |
85 HashMap<unsigned, RefPtr<SegmentedFontData>> m_fontDataTable; | 85 HashMap<unsigned, RefPtr<SegmentedFontData>> m_fontDataTable; |
86 // All non-CSS-connected FontFaces are stored after the CSS-connected ones. | 86 // All non-CSS-connected FontFaces are stored after the CSS-connected ones. |
87 FontFaceList m_fontFaces; | 87 FontFaceList m_fontFaces; |
88 FontFaceList::iterator m_firstNonCssConnectedFace; | 88 FontFaceList::iterator m_firstNonCssConnectedFace; |
89 }; | 89 }; |
90 | 90 |
91 } // namespace blink | 91 } // namespace blink |
92 | 92 |
93 #endif // CSSSegmentedFontFace_h | 93 #endif // CSSSegmentedFontFace_h |
OLD | NEW |