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

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

Issue 1314843009: Add DocumentTiming metrics for "time to first text paint" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/core/css/CSSFontSelector.h ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 return FontCache::fontCache()->getFontData(fontDescription, settingsFamilyNa me); 141 return FontCache::fontCache()->getFontData(fontDescription, settingsFamilyNa me);
142 } 142 }
143 143
144 void CSSFontSelector::willUseFontData(const FontDescription& fontDescription, co nst AtomicString& family, UChar32 character) 144 void CSSFontSelector::willUseFontData(const FontDescription& fontDescription, co nst AtomicString& family, UChar32 character)
145 { 145 {
146 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family); 146 CSSSegmentedFontFace* face = m_fontFaceCache.get(fontDescription, family);
147 if (face) 147 if (face)
148 face->willUseFontData(fontDescription, character); 148 face->willUseFontData(fontDescription, character);
149 } 149 }
150 150
151 void CSSFontSelector::reportFirstCustomFontText()
152 {
153 m_document->markFirstCustomFontText();
154 }
155
156 void CSSFontSelector::reportFirstNonBlankText()
157 {
158 m_document->markFirstNonBlankText();
159 }
160
151 bool CSSFontSelector::isPlatformFontAvailable(const FontDescription& fontDescrip tion, const AtomicString& passedFamily) 161 bool CSSFontSelector::isPlatformFontAvailable(const FontDescription& fontDescrip tion, const AtomicString& passedFamily)
152 { 162 {
153 AtomicString family = familyNameFromSettings(m_genericFontFamilySettings, fo ntDescription, passedFamily); 163 AtomicString family = familyNameFromSettings(m_genericFontFamilySettings, fo ntDescription, passedFamily);
154 if (family.isEmpty()) 164 if (family.isEmpty())
155 family = passedFamily; 165 family = passedFamily;
156 return FontCache::fontCache()->isPlatformFontAvailable(fontDescription, fami ly); 166 return FontCache::fontCache()->isPlatformFontAvailable(fontDescription, fami ly);
157 } 167 }
158 168
159 #if !ENABLE(OILPAN) 169 #if !ENABLE(OILPAN)
160 void CSSFontSelector::clearDocument() 170 void CSSFontSelector::clearDocument()
(...skipping 18 matching lines...) Expand all
179 #if ENABLE(OILPAN) 189 #if ENABLE(OILPAN)
180 visitor->trace(m_document); 190 visitor->trace(m_document);
181 visitor->trace(m_fontFaceCache); 191 visitor->trace(m_fontFaceCache);
182 visitor->trace(m_clients); 192 visitor->trace(m_clients);
183 visitor->trace(m_fontLoader); 193 visitor->trace(m_fontLoader);
184 #endif 194 #endif
185 FontSelector::trace(visitor); 195 FontSelector::trace(visitor);
186 } 196 }
187 197
188 } 198 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSFontSelector.h ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698