OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 FontFace* fontFace() const { return m_fontFace; } | 57 FontFace* fontFace() const { return m_fontFace; } |
58 | 58 |
59 PassRefPtr<UnicodeRangeSet> ranges() { return m_ranges; } | 59 PassRefPtr<UnicodeRangeSet> ranges() { return m_ranges; } |
60 | 60 |
61 void setSegmentedFontFace(CSSSegmentedFontFace*); | 61 void setSegmentedFontFace(CSSSegmentedFontFace*); |
62 void clearSegmentedFontFace() { m_segmentedFontFace = nullptr; } | 62 void clearSegmentedFontFace() { m_segmentedFontFace = nullptr; } |
63 | 63 |
64 bool isValid() const { return !m_sources.isEmpty(); } | 64 bool isValid() const { return !m_sources.isEmpty(); } |
65 | 65 |
66 void addSource(RawPtr<CSSFontFaceSource>); | 66 void addSource(CSSFontFaceSource*); |
67 | 67 |
68 void didBeginLoad(); | 68 void didBeginLoad(); |
69 void fontLoaded(RemoteFontFaceSource*); | 69 void fontLoaded(RemoteFontFaceSource*); |
70 void didBecomeVisibleFallback(RemoteFontFaceSource*); | 70 void didBecomeVisibleFallback(RemoteFontFaceSource*); |
71 | 71 |
72 PassRefPtr<SimpleFontData> getFontData(const FontDescription&); | 72 PassRefPtr<SimpleFontData> getFontData(const FontDescription&); |
73 | 73 |
74 FontFace::LoadStatusType loadStatus() const { return m_fontFace->loadStatus(
); } | 74 FontFace::LoadStatusType loadStatus() const { return m_fontFace->loadStatus(
); } |
75 bool maybeScheduleFontLoad(const FontDescription&, UChar32); | 75 bool maybeScheduleFontLoad(const FontDescription&, UChar32); |
76 bool maybeScheduleFontLoad(const FontDescription&, const FontDataForRangeSet
&); | 76 bool maybeScheduleFontLoad(const FontDescription&, const FontDataForRangeSet
&); |
77 void load(); | 77 void load(); |
78 void load(const FontDescription&); | 78 void load(const FontDescription&); |
79 | 79 |
80 bool hadBlankText() { return isValid() && m_sources.first()->hadBlankText();
} | 80 bool hadBlankText() { return isValid() && m_sources.first()->hadBlankText();
} |
81 | 81 |
82 DECLARE_TRACE(); | 82 DECLARE_TRACE(); |
83 | 83 |
84 private: | 84 private: |
85 void setLoadStatus(FontFace::LoadStatusType); | 85 void setLoadStatus(FontFace::LoadStatusType); |
86 | 86 |
87 RefPtr<UnicodeRangeSet> m_ranges; | 87 RefPtr<UnicodeRangeSet> m_ranges; |
88 Member<CSSSegmentedFontFace> m_segmentedFontFace; | 88 Member<CSSSegmentedFontFace> m_segmentedFontFace; |
89 HeapDeque<Member<CSSFontFaceSource>> m_sources; | 89 HeapDeque<Member<CSSFontFaceSource>> m_sources; |
90 Member<FontFace> m_fontFace; | 90 Member<FontFace> m_fontFace; |
91 }; | 91 }; |
92 | 92 |
93 } // namespace blink | 93 } // namespace blink |
94 | 94 |
95 #endif | 95 #endif |
OLD | NEW |