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

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

Issue 1270723002: Improve CSS Style matching spec compliance (Closed) Base URL: git@github.com:drott/blink-crosswalk.git@reimplementMatching
Patch Set: TODOs with bugs, redundant file removed, test expectations fix Created 5 years, 4 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 if (genericFamilyName == FontFamilyNames::webkit_pictograph) 123 if (genericFamilyName == FontFamilyNames::webkit_pictograph)
124 return settings.pictograph(script); 124 return settings.pictograph(script);
125 if (genericFamilyName == FontFamilyNames::webkit_standard) 125 if (genericFamilyName == FontFamilyNames::webkit_standard)
126 return settings.standard(script); 126 return settings.standard(script);
127 #endif 127 #endif
128 return emptyAtom; 128 return emptyAtom;
129 } 129 }
130 130
131 PassRefPtr<FontData> CSSFontSelector::getFontData(const FontDescription& fontDes cription, const AtomicString& familyName) 131 PassRefPtr<FontData> CSSFontSelector::getFontData(const FontDescription& fontDes cription, const AtomicString& familyName)
132 { 132 {
133 if (CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family Name)) 133 if (CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family Name)) {
Kunihiko Sakamoto 2015/08/05 10:36:36 Unnecessary braces.
134 return face->getFontData(fontDescription); 134 return face->getFontData(fontDescription);
135 }
135 136
136 // Try to return the correct font based off our settings, in case we were ha nded the generic font family name. 137 // Try to return the correct font based off our settings, in case we were ha nded the generic font family name.
137 AtomicString settingsFamilyName = familyNameFromSettings(m_genericFontFamily Settings, fontDescription, familyName); 138 AtomicString settingsFamilyName = familyNameFromSettings(m_genericFontFamily Settings, fontDescription, familyName);
138 if (settingsFamilyName.isEmpty()) 139 if (settingsFamilyName.isEmpty())
139 return nullptr; 140 return nullptr;
140 141
141 return FontCache::fontCache()->getFontData(fontDescription, settingsFamilyNa me); 142 return FontCache::fontCache()->getFontData(fontDescription, settingsFamilyNa me);
142 } 143 }
143 144
144 void CSSFontSelector::willUseFontData(const FontDescription& fontDescription, co nst AtomicString& family, UChar32 character) 145 void CSSFontSelector::willUseFontData(const FontDescription& fontDescription, co nst AtomicString& family, UChar32 character)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 #if ENABLE(OILPAN) 180 #if ENABLE(OILPAN)
180 visitor->trace(m_document); 181 visitor->trace(m_document);
181 visitor->trace(m_fontFaceCache); 182 visitor->trace(m_fontFaceCache);
182 visitor->trace(m_clients); 183 visitor->trace(m_clients);
183 visitor->trace(m_fontLoader); 184 visitor->trace(m_fontLoader);
184 #endif 185 #endif
185 FontSelector::trace(visitor); 186 FontSelector::trace(visitor);
186 } 187 }
187 188
188 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698