Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 0xbfe99999a0000000, // NSFontWeightUltraLight | 50 0xbfe99999a0000000, // NSFontWeightUltraLight |
| 51 0xbfe3333340000000, // NSFontWeightThin | 51 0xbfe3333340000000, // NSFontWeightThin |
| 52 0xbfd99999a0000000, // NSFontWeightLight | 52 0xbfd99999a0000000, // NSFontWeightLight |
| 53 0x0000000000000000, // NSFontWeightRegular | 53 0x0000000000000000, // NSFontWeightRegular |
| 54 0x3fcd70a3e0000000, // NSFontWeightMedium | 54 0x3fcd70a3e0000000, // NSFontWeightMedium |
| 55 0x3fd3333340000000, // NSFontWeightSemibold | 55 0x3fd3333340000000, // NSFontWeightSemibold |
| 56 0x3fd99999a0000000, // NSFontWeightBold | 56 0x3fd99999a0000000, // NSFontWeightBold |
| 57 0x3fe1eb8520000000, // NSFontWeightHeavy | 57 0x3fe1eb8520000000, // NSFontWeightHeavy |
| 58 0x3fe3d70a40000000, // NSFontWeightBlack | 58 0x3fe3d70a40000000, // NSFontWeightBlack |
| 59 }; | 59 }; |
| 60 ASSERT(fontWeight >= 0 && fontWeight <= 8); | 60 DCHECK(fontWeight >= 0 && fontWeight <= 8); |
|
tkent
2017/04/09 23:13:23
Split this into two DCHECKs.
Hwanseung Lee
2017/04/11 22:25:09
Done.
| |
| 61 CGFloat* weight = reinterpret_cast<CGFloat*>(&nsFontWeights[fontWeight]); | 61 CGFloat* weight = reinterpret_cast<CGFloat*>(&nsFontWeights[fontWeight]); |
| 62 return *weight; | 62 return *weight; |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 | 65 |
| 66 namespace blink { | 66 namespace blink { |
| 67 | 67 |
| 68 const NSFontTraitMask SYNTHESIZED_FONT_TRAITS = | 68 const NSFontTraitMask SYNTHESIZED_FONT_TRAITS = |
| 69 (NSBoldFontMask | NSItalicFontMask); | 69 (NSBoldFontMask | NSItalicFontMask); |
| 70 | 70 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 305 6, // FontWeight500 | 305 6, // FontWeight500 |
| 306 8, // FontWeight600 | 306 8, // FontWeight600 |
| 307 9, // FontWeight700 | 307 9, // FontWeight700 |
| 308 10, // FontWeight800 | 308 10, // FontWeight800 |
| 309 12, // FontWeight900 | 309 12, // FontWeight900 |
| 310 }; | 310 }; |
| 311 return appKitFontWeights[fontWeight]; | 311 return appKitFontWeights[fontWeight]; |
| 312 } | 312 } |
| 313 | 313 |
| 314 } // namespace blink | 314 } // namespace blink |
| OLD | NEW |