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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 public: | 49 public: |
50 static PassRefPtrWillBeRawPtr<CSSSegmentedFontFace> create(CSSFontSelector*
selector, FontTraits traits) | 50 static PassRefPtrWillBeRawPtr<CSSSegmentedFontFace> create(CSSFontSelector*
selector, FontTraits traits) |
51 { | 51 { |
52 return adoptRefWillBeNoop(new CSSSegmentedFontFace(selector, traits)); | 52 return adoptRefWillBeNoop(new CSSSegmentedFontFace(selector, traits)); |
53 } | 53 } |
54 ~CSSSegmentedFontFace(); | 54 ~CSSSegmentedFontFace(); |
55 | 55 |
56 CSSFontSelector* fontSelector() const { return m_fontSelector; } | 56 CSSFontSelector* fontSelector() const { return m_fontSelector; } |
57 FontTraits traits() const { return m_traits; } | 57 FontTraits traits() const { return m_traits; } |
58 | 58 |
59 void fontLoaded(CSSFontFace*); | 59 // Called when status of a FontFace has changed (e.g. loaded or timed out) |
60 void fontLoadWaitLimitExceeded(CSSFontFace*); | 60 // so cached FontData must be discarded. |
| 61 void fontFaceInvalidated(); |
61 | 62 |
62 void addFontFace(PassRefPtrWillBeRawPtr<FontFace>, bool cssConnected); | 63 void addFontFace(PassRefPtrWillBeRawPtr<FontFace>, bool cssConnected); |
63 void removeFontFace(PassRefPtrWillBeRawPtr<FontFace>); | 64 void removeFontFace(PassRefPtrWillBeRawPtr<FontFace>); |
64 bool isEmpty() const { return m_fontFaces.isEmpty(); } | 65 bool isEmpty() const { return m_fontFaces.isEmpty(); } |
65 | 66 |
66 PassRefPtr<FontData> getFontData(const FontDescription&); | 67 PassRefPtr<FontData> getFontData(const FontDescription&); |
67 | 68 |
68 bool checkFont(const String&) const; | 69 bool checkFont(const String&) const; |
69 void match(const String&, WillBeHeapVector<RefPtrWillBeMember<FontFace>>&) c
onst; | 70 void match(const String&, WillBeHeapVector<RefPtrWillBeMember<FontFace>>&) c
onst; |
70 void willUseFontData(const FontDescription&, UChar32); | 71 void willUseFontData(const FontDescription&, UChar32); |
(...skipping 13 matching lines...) Expand all Loading... |
84 FontTraits m_traits; | 85 FontTraits m_traits; |
85 HashMap<unsigned, RefPtr<SegmentedFontData>> m_fontDataTable; | 86 HashMap<unsigned, RefPtr<SegmentedFontData>> m_fontDataTable; |
86 // 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. |
87 FontFaceList m_fontFaces; | 88 FontFaceList m_fontFaces; |
88 FontFaceList::iterator m_firstNonCssConnectedFace; | 89 FontFaceList::iterator m_firstNonCssConnectedFace; |
89 }; | 90 }; |
90 | 91 |
91 } // namespace blink | 92 } // namespace blink |
92 | 93 |
93 #endif // CSSSegmentedFontFace_h | 94 #endif // CSSSegmentedFontFace_h |
OLD | NEW |