| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "core/CSSValueKeywords.h" | 29 #include "core/CSSValueKeywords.h" |
| 30 #include "platform/fonts/FontCache.h" | 30 #include "platform/fonts/FontCache.h" |
| 31 #include "platform/fonts/FontDescription.h" | 31 #include "platform/fonts/FontDescription.h" |
| 32 #include "platform/win/HWndDC.h" | 32 #include "platform/win/HWndDC.h" |
| 33 #include "platform/win/SystemInfo.h" | 33 #include "platform/win/SystemInfo.h" |
| 34 #include "wtf/text/WTFString.h" | 34 #include "wtf/text/WTFString.h" |
| 35 #include <windows.h> | 35 #include <windows.h> |
| 36 | 36 |
| 37 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(structName, member) \ | 37 #define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(structName, member) \ |
| 38 offsetof(structName, member) + \ | 38 offsetof(structName, member) + \ |
| 39 (sizeof static_cast<structName*>(0)->member) | 39 (sizeof static_cast<structName*>(nullptr)->member) |
| 40 #define NONCLIENTMETRICS_SIZE_PRE_VISTA \ | 40 #define NONCLIENTMETRICS_SIZE_PRE_VISTA \ |
| 41 SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(NONCLIENTMETRICS, lfMessageFont) | 41 SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(NONCLIENTMETRICS, lfMessageFont) |
| 42 | 42 |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| 45 // Converts |points| to pixels. One point is 1/72 of an inch. | 45 // Converts |points| to pixels. One point is 1/72 of an inch. |
| 46 static float pointsToPixels(float points) | 46 static float pointsToPixels(float points) |
| 47 { | 47 { |
| 48 static float pixelsPerInch = 0.0f; | 48 static float pixelsPerInch = 0.0f; |
| 49 if (!pixelsPerInch) { | 49 if (!pixelsPerInch) { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 | 165 |
| 166 // static | 166 // static |
| 167 void LayoutThemeFontProvider::setDefaultFontSize(int fontSize) | 167 void LayoutThemeFontProvider::setDefaultFontSize(int fontSize) |
| 168 { | 168 { |
| 169 s_defaultFontSize = static_cast<float>(fontSize); | 169 s_defaultFontSize = static_cast<float>(fontSize); |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace blink | 172 } // namespace blink |
| OLD | NEW |