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

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: Canvas text metrics test does not need rebaselining after improvement landed, toNSFont in WebSubstringUtil.mm Created 5 years, 9 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
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)
136 NSFont* getNSFont() const { return m_platformData.font(); }
137 #endif
138
139 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const; 135 bool canRenderCombiningCharacterSequence(const UChar*, size_t) const;
140 136
141 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData; } 137 PassRefPtr<CustomFontData> customFontData() const { return m_customFontData; }
142 138
143 // Implemented by the platform. 139 // Implemented by the platform.
144 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const; 140 virtual bool fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const;
145 141
146 protected: 142 protected:
147 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat a, bool isTextOrientationFallback = false); 143 SimpleFontData(const FontPlatformData&, PassRefPtr<CustomFontData> customDat a, bool isTextOrientationFallback = false);
148 144
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 width = platformWidthForGlyph(glyph); 230 width = platformWidthForGlyph(glyph);
235 231
236 m_glyphToWidthMap.setMetricsForGlyph(glyph, width); 232 m_glyphToWidthMap.setMetricsForGlyph(glyph, width);
237 return width; 233 return width;
238 } 234 }
239 235
240 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false); 236 DEFINE_FONT_DATA_TYPE_CASTS(SimpleFontData, false);
241 237
242 } // namespace blink 238 } // namespace blink
243 #endif // SimpleFontData_h 239 #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