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

Side by Side Diff: third_party/WebKit/Source/core/css/BinaryDataFontFaceSource.cpp

Issue 1878253003: Allow explicit conversion operators and implement WTF::OwnPtr::operator bool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 8 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/BinaryDataFontFaceSource.h" 5 #include "core/css/BinaryDataFontFaceSource.h"
6 6
7 #include "platform/SharedBuffer.h" 7 #include "platform/SharedBuffer.h"
8 #include "platform/fonts/FontCustomPlatformData.h" 8 #include "platform/fonts/FontCustomPlatformData.h"
9 #include "platform/fonts/FontDescription.h" 9 #include "platform/fonts/FontDescription.h"
10 #include "platform/fonts/SimpleFontData.h" 10 #include "platform/fonts/SimpleFontData.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 BinaryDataFontFaceSource::BinaryDataFontFaceSource(SharedBuffer* data, String& o tsParseMessage) 14 BinaryDataFontFaceSource::BinaryDataFontFaceSource(SharedBuffer* data, String& o tsParseMessage)
15 : m_customPlatformData(FontCustomPlatformData::create(data, otsParseMessage) ) 15 : m_customPlatformData(FontCustomPlatformData::create(data, otsParseMessage) )
16 { 16 {
17 } 17 }
18 18
19 BinaryDataFontFaceSource::~BinaryDataFontFaceSource() 19 BinaryDataFontFaceSource::~BinaryDataFontFaceSource()
20 { 20 {
21 } 21 }
22 22
23 bool BinaryDataFontFaceSource::isValid() const 23 bool BinaryDataFontFaceSource::isValid() const
24 { 24 {
25 return m_customPlatformData; 25 return m_customPlatformData.get();
26 } 26 }
27 27
28 PassRefPtr<SimpleFontData> BinaryDataFontFaceSource::createFontData(const FontDe scription& fontDescription) 28 PassRefPtr<SimpleFontData> BinaryDataFontFaceSource::createFontData(const FontDe scription& fontDescription)
29 { 29 {
30 return SimpleFontData::create( 30 return SimpleFontData::create(
31 m_customPlatformData->fontPlatformData(fontDescription.effectiveFontSize (), 31 m_customPlatformData->fontPlatformData(fontDescription.effectiveFontSize (),
32 fontDescription.isSyntheticBold(), fontDescription.isSyntheticItalic (), 32 fontDescription.isSyntheticBold(), fontDescription.isSyntheticItalic (),
33 fontDescription.orientation()), CustomFontData::create()); 33 fontDescription.orientation()), CustomFontData::create());
34 } 34 }
35 35
36 } // namespace blink 36 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698