Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1056)

Side by Side Diff: third_party/WebKit/Source/core/css/CSSFontSelector.cpp

Issue 1806653002: Shape unicode-range: font faces in only one iteration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update UnicodeRangeSetTests to RefPtrtr, rm copy constructor and test Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 return FontCache::fontCache()->getFontData(fontDescription, settingsFamilyNa me); 140 return FontCache::fontCache()->getFontData(fontDescription, settingsFamilyNa me);
141 } 141 }
142 142
143 void CSSFontSelector::willUseFontData(const FontDescription& fontDescription, co nst AtomicString& family, UChar32 character) 143 void CSSFontSelector::willUseFontData(const FontDescription& fontDescription, co nst AtomicString& family, UChar32 character)
144 { 144 {
145 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family); 145 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family);
146 if (face) 146 if (face)
147 face->willUseFontData(fontDescription, character); 147 face->willUseFontData(fontDescription, character);
148 } 148 }
149 149
150 void CSSFontSelector::willUseRange(const FontDescription& fontDescription, const AtomicString& family, const FontDataRange& range) 150 void CSSFontSelector::willUseRange(const FontDescription& fontDescription, const AtomicString& family, const FontDataForRangeSet& rangeSet)
151 { 151 {
152 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family); 152 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family);
153 if (face) 153 if (face)
154 face->willUseRange(fontDescription, range); 154 face->willUseRange(fontDescription, rangeSet);
155 } 155 }
156 156
157 bool CSSFontSelector::isPlatformFontAvailable(const FontDescription& fontDescrip tion, const AtomicString& passedFamily) 157 bool CSSFontSelector::isPlatformFontAvailable(const FontDescription& fontDescrip tion, const AtomicString& passedFamily)
158 { 158 {
159 AtomicString family = familyNameFromSettings(m_genericFontFamilySettings, fo ntDescription, passedFamily); 159 AtomicString family = familyNameFromSettings(m_genericFontFamilySettings, fo ntDescription, passedFamily);
160 if (family.isEmpty()) 160 if (family.isEmpty())
161 family = passedFamily; 161 family = passedFamily;
162 return FontCache::fontCache()->isPlatformFontAvailable(fontDescription, fami ly); 162 return FontCache::fontCache()->isPlatformFontAvailable(fontDescription, fami ly);
163 } 163 }
164 164
(...skipping 19 matching lines...) Expand all
184 #if ENABLE(OILPAN) 184 #if ENABLE(OILPAN)
185 visitor->trace(m_document); 185 visitor->trace(m_document);
186 visitor->trace(m_fontFaceCache); 186 visitor->trace(m_fontFaceCache);
187 visitor->trace(m_clients); 187 visitor->trace(m_clients);
188 visitor->trace(m_fontLoader); 188 visitor->trace(m_fontLoader);
189 #endif 189 #endif
190 FontSelector::trace(visitor); 190 FontSelector::trace(visitor);
191 } 191 }
192 192
193 } // namespace blink 193 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontSelector.h ('k') | third_party/WebKit/Source/core/css/CSSSegmentedFontFace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698