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

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

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 * Copyright (C) 2005, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Alexey Proskuryakov 3 * Copyright (C) 2006 Alexey Proskuryakov
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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 bool SimpleFontData::isTextOrientationFallbackOf( 351 bool SimpleFontData::isTextOrientationFallbackOf(
352 const SimpleFontData* fontData) const { 352 const SimpleFontData* fontData) const {
353 if (!isTextOrientationFallback() || !fontData->m_derivedFontData) 353 if (!isTextOrientationFallback() || !fontData->m_derivedFontData)
354 return false; 354 return false;
355 return fontData->m_derivedFontData->uprightOrientation == this || 355 return fontData->m_derivedFontData->uprightOrientation == this ||
356 fontData->m_derivedFontData->verticalRightOrientation == this; 356 fontData->m_derivedFontData->verticalRightOrientation == this;
357 } 357 }
358 358
359 std::unique_ptr<SimpleFontData::DerivedFontData> 359 std::unique_ptr<SimpleFontData::DerivedFontData>
360 SimpleFontData::DerivedFontData::create() { 360 SimpleFontData::DerivedFontData::create() {
361 return wrapUnique(new DerivedFontData()); 361 return WTF::wrapUnique(new DerivedFontData());
362 } 362 }
363 363
364 PassRefPtr<SimpleFontData> SimpleFontData::createScaledFontData( 364 PassRefPtr<SimpleFontData> SimpleFontData::createScaledFontData(
365 const FontDescription& fontDescription, 365 const FontDescription& fontDescription,
366 float scaleFactor) const { 366 float scaleFactor) const {
367 const float scaledSize = 367 const float scaledSize =
368 lroundf(fontDescription.computedSize() * scaleFactor); 368 lroundf(fontDescription.computedSize() * scaleFactor);
369 return SimpleFontData::create( 369 return SimpleFontData::create(
370 FontPlatformData(m_platformData, scaledSize), 370 FontPlatformData(m_platformData, scaledSize),
371 isCustomFont() ? CustomFontData::create() : nullptr); 371 isCustomFont() ? CustomFontData::create() : nullptr);
(...skipping 13 matching lines...) Expand all
385 float SimpleFontData::platformWidthForGlyph(Glyph glyph) const { 385 float SimpleFontData::platformWidthForGlyph(Glyph glyph) const {
386 if (!m_platformData.size()) 386 if (!m_platformData.size())
387 return 0; 387 return 0;
388 388
389 static_assert(sizeof(glyph) == 2, "Glyph id should not be truncated."); 389 static_assert(sizeof(glyph) == 2, "Glyph id should not be truncated.");
390 390
391 return SkiaTextMetrics(&m_paint).getSkiaWidthForGlyph(glyph); 391 return SkiaTextMetrics(&m_paint).getSkiaWidthForGlyph(glyph);
392 } 392 }
393 393
394 } // namespace blink 394 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698