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

Side by Side Diff: Source/core/layout/LayoutThemeFontProviderWin.cpp

Issue 1162383003: C++11: Replace 0 with nullptr where applicable in layout code. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add one more file. Created 5 years, 6 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/core/layout/LayoutTextControlMultiLine.cpp ('k') | Source/core/layout/LayoutVideo.cpp » ('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 * 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
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
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
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTextControlMultiLine.cpp ('k') | Source/core/layout/LayoutVideo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698