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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutThemeFontProviderWin.cpp

Issue 1609083002: Remove blink::isWindowsVistaOrGreater. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set metrics->cbSize properly Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/blink_platform.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutThemeFontProviderWin.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutThemeFontProviderWin.cpp b/third_party/WebKit/Source/core/layout/LayoutThemeFontProviderWin.cpp
index 1202835a02b502f5b489d2519eb51d1e83f69618..985aa1f38a7b1800e5d71e70628096b8e9ead0b3 100644
--- a/third_party/WebKit/Source/core/layout/LayoutThemeFontProviderWin.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutThemeFontProviderWin.cpp
@@ -29,16 +29,9 @@
#include "platform/fonts/FontCache.h"
#include "platform/fonts/FontDescription.h"
#include "platform/win/HWndDC.h"
-#include "platform/win/SystemInfo.h"
#include "wtf/text/WTFString.h"
#include <windows.h>
-#define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(structName, member) \
- offsetof(structName, member) + \
- (sizeof static_cast<structName*>(nullptr)->member)
-#define NONCLIENTMETRICS_SIZE_PRE_VISTA \
- SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(NONCLIENTMETRICS, lfMessageFont)
-
namespace blink {
// Converts |points| to pixels. One point is 1/72 of an inch.
@@ -59,10 +52,8 @@ static float pointsToPixels(float points)
static bool getNonClientMetrics(NONCLIENTMETRICS* metrics)
{
- static UINT size = isWindowsVistaOrGreater() ?
- sizeof(NONCLIENTMETRICS) : NONCLIENTMETRICS_SIZE_PRE_VISTA;
- metrics->cbSize = size;
- bool success = !!SystemParametersInfo(SPI_GETNONCLIENTMETRICS, size, metrics, 0);
+ metrics->cbSize = sizeof(NONCLIENTMETRICS);
+ bool success = !!SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), metrics, 0);
ASSERT_UNUSED(success, success);
return success;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698