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

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

Issue 2600853002: Merge "Windows: Fix the default font size for form controls in non-1.0 device scale factor." to M56 (Closed)
Patch Set: Created 3 years, 12 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 | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | 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 16 matching lines...) Expand all
27 27
28 #include "core/CSSValueKeywords.h" 28 #include "core/CSSValueKeywords.h"
29 #include "platform/fonts/FontCache.h" 29 #include "platform/fonts/FontCache.h"
30 #include "platform/fonts/FontDescription.h" 30 #include "platform/fonts/FontDescription.h"
31 #include "wtf/text/WTFString.h" 31 #include "wtf/text/WTFString.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 // Converts |points| to pixels. One point is 1/72 of an inch. 35 // Converts |points| to pixels. One point is 1/72 of an inch.
36 static float pointsToPixels(float points) { 36 static float pointsToPixels(float points) {
37 float pixelsPerInch = 96.0f * FontCache::deviceScaleFactor(); 37 const float pixelsPerInch = 96.0f;
38 static const float pointsPerInch = 72.0f; 38 const float pointsPerInch = 72.0f;
39 return points / pointsPerInch * pixelsPerInch; 39 return points / pointsPerInch * pixelsPerInch;
40 } 40 }
41 41
42 // static 42 // static
43 void LayoutThemeFontProvider::systemFont(CSSValueID systemFontID, 43 void LayoutThemeFontProvider::systemFont(CSSValueID systemFontID,
44 FontStyle& fontStyle, 44 FontStyle& fontStyle,
45 FontWeight& fontWeight, 45 FontWeight& fontWeight,
46 float& fontSize, 46 float& fontSize,
47 AtomicString& fontFamily) { 47 AtomicString& fontFamily) {
48 fontStyle = FontStyleNormal; 48 fontStyle = FontStyleNormal;
(...skipping 27 matching lines...) Expand all
76 break; 76 break;
77 } 77 }
78 } 78 }
79 79
80 // static 80 // static
81 void LayoutThemeFontProvider::setDefaultFontSize(int fontSize) { 81 void LayoutThemeFontProvider::setDefaultFontSize(int fontSize) {
82 s_defaultFontSize = static_cast<float>(fontSize); 82 s_defaultFontSize = static_cast<float>(fontSize);
83 } 83 }
84 84
85 } // namespace blink 85 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698