| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 bool operator<(UChar32 c) const { return m_to < c; } | 90 bool operator<(UChar32 c) const { return m_to < c; } |
| 91 | 91 |
| 92 private: | 92 private: |
| 93 UChar32 m_from; | 93 UChar32 m_from; |
| 94 UChar32 m_to; | 94 UChar32 m_to; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 class UnicodeRangeSet { | 97 class UnicodeRangeSet { |
| 98 public: | 98 public: |
| 99 explicit UnicodeRangeSet(const Vector<UnicodeRange>&); | 99 explicit UnicodeRangeSet(const Vector<UnicodeRange>&); |
| 100 bool contains(UChar32) const; | |
| 101 bool intersectsWith(const String&) const; | 100 bool intersectsWith(const String&) const; |
| 102 bool isEntireRange() const { return m_ranges.isEmpty(); } | 101 bool isEntireRange() const { return m_ranges.isEmpty(); } |
| 103 size_t size() const { return m_ranges.size(); } | 102 size_t size() const { return m_ranges.size(); } |
| 104 const UnicodeRange& rangeAt(size_t i) const { return m_ranges[i]; } | 103 const UnicodeRange& rangeAt(size_t i) const { return m_ranges[i]; } |
| 105 private: | 104 private: |
| 106 Vector<UnicodeRange> m_ranges; // If empty, represents the whole code sp
ace. | 105 Vector<UnicodeRange> m_ranges; // If empty, represents the whole code sp
ace. |
| 107 }; | 106 }; |
| 108 | 107 |
| 109 FontFace::LoadStatus loadStatus() const { return m_fontFace->loadStatus(); } | 108 FontFace::LoadStatus loadStatus() const { return m_fontFace->loadStatus(); } |
| 110 bool maybeScheduleFontLoad(const FontDescription&, UChar32); | 109 void willUseFontData(const FontDescription&); |
| 111 void load(const FontDescription&, CSSFontSelector* = 0); | 110 void load(const FontDescription&, CSSFontSelector* = 0); |
| 112 | 111 |
| 113 bool hadBlankText() { return isValid() && m_sources.first()->hadBlankText();
} | 112 bool hadBlankText() { return isValid() && m_sources.first()->hadBlankText();
} |
| 114 | 113 |
| 115 void trace(Visitor*); | 114 void trace(Visitor*); |
| 116 | 115 |
| 117 private: | 116 private: |
| 118 void setLoadStatus(FontFace::LoadStatus); | 117 void setLoadStatus(FontFace::LoadStatus); |
| 119 | 118 |
| 120 UnicodeRangeSet m_ranges; | 119 UnicodeRangeSet m_ranges; |
| 121 RawPtrWillBeMember<CSSSegmentedFontFace> m_segmentedFontFace; | 120 RawPtrWillBeMember<CSSSegmentedFontFace> m_segmentedFontFace; |
| 122 Deque<OwnPtr<CSSFontFaceSource> > m_sources; | 121 Deque<OwnPtr<CSSFontFaceSource> > m_sources; |
| 123 RawPtrWillBeMember<FontFace> m_fontFace; | 122 RawPtrWillBeMember<FontFace> m_fontFace; |
| 124 }; | 123 }; |
| 125 | 124 |
| 126 } | 125 } |
| 127 | 126 |
| 128 #endif | 127 #endif |
| OLD | NEW |