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

Side by Side Diff: Source/core/platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp

Issue 39693002: Introduce isWindowsVistaOrGreater() as replacement of windowsVersion() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-10-28T12:54:24 Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (c) 2008, 2009, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 if (!getGlyphIndices(fontData->platformData().hfont(), dc, buffer, length, l ocalGlyphBuffer, GGI_MARK_NONEXISTING_GLYPHS)) { 142 if (!getGlyphIndices(fontData->platformData().hfont(), dc, buffer, length, l ocalGlyphBuffer, GGI_MARK_NONEXISTING_GLYPHS)) {
143 SelectObject(dc, oldFont); 143 SelectObject(dc, oldFont);
144 fillEmptyGlyphs(page); 144 fillEmptyGlyphs(page);
145 return false; 145 return false;
146 } 146 }
147 147
148 // Copy the output to the GlyphPage 148 // Copy the output to the GlyphPage
149 bool haveGlyphs = false; 149 bool haveGlyphs = false;
150 int invalidGlyph = 0xFFFF; 150 int invalidGlyph = 0xFFFF;
151 const DWORD cffTableTag = 0x20464643; // 4-byte identifier for OpenType CFF table ('CFF '). 151 const DWORD cffTableTag = 0x20464643; // 4-byte identifier for OpenType CFF table ('CFF ').
152 if ((windowsVersion() < WindowsVista) && !(tm.tmPitchAndFamily & TMPF_TRUETY PE) && (GetFontData(dc, cffTableTag, 0, 0, 0) == GDI_ERROR)) 152 if (!isWindowsVistaOrGreater() && !(tm.tmPitchAndFamily & TMPF_TRUETYPE) && (GetFontData(dc, cffTableTag, 0, 0, 0) == GDI_ERROR))
153 invalidGlyph = 0x1F; 153 invalidGlyph = 0x1F;
154 154
155 Glyph spaceGlyph = 0; // Glyph for a space. Lazily filled. 155 Glyph spaceGlyph = 0; // Glyph for a space. Lazily filled.
156 bool spaceGlyphInitialized = false; 156 bool spaceGlyphInitialized = false;
157 157
158 for (unsigned i = 0; i < length; i++) { 158 for (unsigned i = 0; i < length; i++) {
159 UChar c = buffer[i]; 159 UChar c = buffer[i];
160 Glyph glyph = localGlyphBuffer[i]; 160 Glyph glyph = localGlyphBuffer[i];
161 const SimpleFontData* glyphFontData = fontData; 161 const SimpleFontData* glyphFontData = fontData;
162 // When this character should be a space, we ignore whatever the font 162 // When this character should be a space, we ignore whatever the font
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // because each character in the non-BMP input buffer will be 251 // because each character in the non-BMP input buffer will be
252 // represented by a surrogate pair (two UChar's). 252 // represented by a surrogate pair (two UChar's).
253 return fillNonBMPGlyphs(offset, length, characterBuffer, this, fontData) ; 253 return fillNonBMPGlyphs(offset, length, characterBuffer, this, fontData) ;
254 } 254 }
255 255
256 ASSERT_NOT_REACHED(); 256 ASSERT_NOT_REACHED();
257 return false; 257 return false;
258 } 258 }
259 259
260 } // namespace WebCore 260 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/platform/ScrollbarThemeWin.cpp ('k') | Source/core/rendering/RenderThemeChromiumFontProviderWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698