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

Side by Side Diff: Source/platform/fonts/FontDescription.cpp

Issue 813883002: replace COMPILE_ASSERT with static_assert in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: final fixups Created 6 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) 2007 Nicholas Shanks <contact@nickshanks.com> 2 * Copyright (C) 2007 Nicholas Shanks <contact@nickshanks.com>
3 * Copyright (C) 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2008 Apple Inc. All rights reserved.
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 28 matching lines...) Expand all
39 struct SameSizeAsFontDescription { 39 struct SameSizeAsFontDescription {
40 FontFamily familyList; 40 FontFamily familyList;
41 RefPtr<FontFeatureSettings> m_featureSettings; 41 RefPtr<FontFeatureSettings> m_featureSettings;
42 String locale; 42 String locale;
43 float sizes[4]; 43 float sizes[4];
44 // FXIME: Make them fit into one word. 44 // FXIME: Make them fit into one word.
45 uint32_t bitfields; 45 uint32_t bitfields;
46 uint32_t bitfields2 : 7; 46 uint32_t bitfields2 : 7;
47 }; 47 };
48 48
49 COMPILE_ASSERT(sizeof(FontDescription) == sizeof(SameSizeAsFontDescription), Fon tDescription_should_stay_small); 49 static_assert(sizeof(FontDescription) == sizeof(SameSizeAsFontDescription), "Fon tDescription should stay small");
50 50
51 TypesettingFeatures FontDescription::s_defaultTypesettingFeatures = 0; 51 TypesettingFeatures FontDescription::s_defaultTypesettingFeatures = 0;
52 52
53 bool FontDescription::s_useSubpixelTextPositioning = false; 53 bool FontDescription::s_useSubpixelTextPositioning = false;
54 54
55 FontWeight FontDescription::lighterWeight(FontWeight weight) 55 FontWeight FontDescription::lighterWeight(FontWeight weight)
56 { 56 {
57 switch (weight) { 57 switch (weight) {
58 case FontWeight100: 58 case FontWeight100:
59 case FontWeight200: 59 case FontWeight200:
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesSt ate 219 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesSt ate
220 || historicalLigaturesState() == FontDescription::EnabledLigaturesSt ate 220 || historicalLigaturesState() == FontDescription::EnabledLigaturesSt ate
221 || contextualLigaturesState() == FontDescription::EnabledLigaturesSt ate) { 221 || contextualLigaturesState() == FontDescription::EnabledLigaturesSt ate) {
222 m_typesettingFeatures |= blink::Ligatures; 222 m_typesettingFeatures |= blink::Ligatures;
223 } 223 }
224 } 224 }
225 } 225 }
226 226
227 } // namespace blink 227 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/exported/WebCryptoAlgorithm.cpp ('k') | Source/platform/fonts/FontWidthVariant.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698