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

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

Issue 879533003: Remove Mac native font type members from FontPlatformData (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removing MemoryActivatedFont Created 5 years, 10 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/platform/fonts/FontPlatformData.cpp ('k') | Source/platform/fonts/mac/FontCacheMac.mm » ('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 * 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 virtual bool isCustomFont() const override { return m_customFontData; } 126 virtual bool isCustomFont() const override { return m_customFontData; }
127 virtual bool isLoading() const override { return m_customFontData ? m_custom FontData->isLoading() : false; } 127 virtual bool isLoading() const override { return m_customFontData ? m_custom FontData->isLoading() : false; }
128 virtual bool isLoadingFallback() const override { return m_customFontData ? m_customFontData->isLoadingFallback() : false; } 128 virtual bool isLoadingFallback() const override { return m_customFontData ? m_customFontData->isLoadingFallback() : false; }
129 virtual bool isSegmented() const override; 129 virtual bool isSegmented() const override;
130 virtual bool shouldSkipDrawing() const override { return m_customFontData && m_customFontData->shouldSkipDrawing(); } 130 virtual bool shouldSkipDrawing() const override { return m_customFontData && m_customFontData->shouldSkipDrawing(); }
131 131
132 const GlyphData& missingGlyphData() const { return m_missingGlyphData; } 132 const GlyphData& missingGlyphData() const { return m_missingGlyphData; }
133 void setMissingGlyphData(const GlyphData& glyphData) { m_missingGlyphData = glyphData; } 133 void setMissingGlyphData(const GlyphData& glyphData) { m_missingGlyphData = glyphData; }
134 134
135 #if OS(MACOSX) 135 #if OS(MACOSX)
136 NSFont* getNSFont() const { return m_platformData.font(); } 136 // TODO(dro): Where is this really used other than WebSubStringUtil.mm
137 const NSFont* getNSFont() const { return reinterpret_cast<const NSFont*>(m_p latformData.ctFont()); }
137 #endif 138 #endif
138 139
139 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; 140 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const;
140 141
141 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData; } 142 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData; }
142 143
143 // Implemented by the platform. 144 // Implemented by the platform.
144 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const; 145 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const;
145 146
146 protected: 147 protected:
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 width = platformWidthForGlyph(glyph); 235 width = platformWidthForGlyph(glyph);
235 236
236 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); 237 m_glyphToWidthMap.setMetricsForGlyph(glyph, width);
237 return width; 238 return width;
238 } 239 }
239 240
240 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); 241 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false);
241 242
242 } // namespace blink 243 } // namespace blink
243 #endif // SimpleFontData_h 244 #endif // SimpleFontData_h
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontPlatformData.cpp ('k') | Source/platform/fonts/mac/FontCacheMac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698