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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/SimpleFontData.h

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years 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 * This file is part of the internal font implementation. 2 * This file is part of the internal font implementation.
3 * 3 *
4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved.
5 * Copyright (C) 2007-2008 Torch Mobile, Inc. 5 * Copyright (C) 2007-2008 Torch Mobile, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 #else 230 #else
231 FloatRect boundsResult; 231 FloatRect boundsResult;
232 if (m_glyphToBoundsMap) { 232 if (m_glyphToBoundsMap) {
233 boundsResult = m_glyphToBoundsMap->metricsForGlyph(glyph); 233 boundsResult = m_glyphToBoundsMap->metricsForGlyph(glyph);
234 if (boundsResult.width() != cGlyphSizeUnknown) 234 if (boundsResult.width() != cGlyphSizeUnknown)
235 return boundsResult; 235 return boundsResult;
236 } 236 }
237 237
238 boundsResult = platformBoundsForGlyph(glyph); 238 boundsResult = platformBoundsForGlyph(glyph);
239 if (!m_glyphToBoundsMap) 239 if (!m_glyphToBoundsMap)
240 m_glyphToBoundsMap = wrapUnique(new GlyphMetricsMap<FloatRect>); 240 m_glyphToBoundsMap = WTF::wrapUnique(new GlyphMetricsMap<FloatRect>);
241 m_glyphToBoundsMap->setMetricsForGlyph(glyph, boundsResult); 241 m_glyphToBoundsMap->setMetricsForGlyph(glyph, boundsResult);
242 242
243 return boundsResult; 243 return boundsResult;
244 #endif 244 #endif
245 } 245 }
246 246
247 ALWAYS_INLINE float SimpleFontData::widthForGlyph(Glyph glyph) const { 247 ALWAYS_INLINE float SimpleFontData::widthForGlyph(Glyph glyph) const {
248 #if !OS(MACOSX) 248 #if !OS(MACOSX)
249 return platformWidthForGlyph(glyph); 249 return platformWidthForGlyph(glyph);
250 #else 250 #else
251 float width = m_glyphToWidthMap.metricsForGlyph(glyph); 251 float width = m_glyphToWidthMap.metricsForGlyph(glyph);
252 if (width != cGlyphSizeUnknown) 252 if (width != cGlyphSizeUnknown)
253 return width; 253 return width;
254 254
255 width = platformWidthForGlyph(glyph); 255 width = platformWidthForGlyph(glyph);
256 256
257 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); 257 m_glyphToWidthMap.setMetricsForGlyph(glyph, width);
258 return width; 258 return width;
259 #endif 259 #endif
260 } 260 }
261 261
262 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); 262 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false);
263 263
264 } // namespace blink 264 } // namespace blink
265 #endif // SimpleFontData_h 265 #endif // SimpleFontData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698