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

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

Issue 23464095: WTF::notFound looks too much like a local variable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/AnimationStack.h ('k') | Source/core/css/CSSParser-in.cpp » ('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, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2010, 2011 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 if (m_font) { 152 if (m_font) {
153 #if ENABLE(SVG_FONTS) 153 #if ENABLE(SVG_FONTS)
154 if (m_hasExternalSVGFont) { 154 if (m_hasExternalSVGFont) {
155 // For SVG fonts parse the external SVG document, and extract th e <font> element. 155 // For SVG fonts parse the external SVG document, and extract th e <font> element.
156 if (!m_font->ensureSVGFontData()) 156 if (!m_font->ensureSVGFontData())
157 return 0; 157 return 0;
158 158
159 if (!m_externalSVGFontElement) { 159 if (!m_externalSVGFontElement) {
160 String fragmentIdentifier; 160 String fragmentIdentifier;
161 size_t start = m_string.find('#'); 161 size_t start = m_string.find('#');
162 if (start != notFound) 162 if (start != kNotFound)
163 fragmentIdentifier = m_string.string().substring(start + 1); 163 fragmentIdentifier = m_string.string().substring(start + 1);
164 m_externalSVGFontElement = m_font->getSVGFontById(fragmentId entifier); 164 m_externalSVGFontElement = m_font->getSVGFontById(fragmentId entifier);
165 } 165 }
166 166
167 if (!m_externalSVGFontElement) 167 if (!m_externalSVGFontElement)
168 return 0; 168 return 0;
169 169
170 SVGFontFaceElement* fontFaceElement = 0; 170 SVGFontFaceElement* fontFaceElement = 0;
171 171
172 // Select first <font-face> child 172 // Select first <font-face> child
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 if (size < 50 * 1024) 303 if (size < 50 * 1024)
304 return "WebFont.DownloadTime.1.10KBTo50KB"; 304 return "WebFont.DownloadTime.1.10KBTo50KB";
305 if (size < 100 * 1024) 305 if (size < 100 * 1024)
306 return "WebFont.DownloadTime.2.50KBTo100KB"; 306 return "WebFont.DownloadTime.2.50KBTo100KB";
307 if (size < 1024 * 1024) 307 if (size < 1024 * 1024)
308 return "WebFont.DownloadTime.3.100KBTo1MB"; 308 return "WebFont.DownloadTime.3.100KBTo1MB";
309 return "WebFont.DownloadTime.4.Over1MB"; 309 return "WebFont.DownloadTime.4.Over1MB";
310 } 310 }
311 311
312 } 312 }
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationStack.h ('k') | Source/core/css/CSSParser-in.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698