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

Side by Side Diff: content/renderer/render_view_win.cc

Issue 1763803002: Pass Windows font rendering preferences from browser to blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | third_party/WebKit/Source/platform/fonts/FontCache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/common/renderer_preferences.h" 5 #include "content/public/common/renderer_preferences.h"
6 #include "content/child/webthemeengine_impl_default.h" 6 #include "content/child/webthemeengine_impl_default.h"
7 #include "content/renderer/render_view_impl.h" 7 #include "content/renderer/render_view_impl.h"
8 #include "third_party/WebKit/public/web/win/WebFontRendering.h" 8 #include "third_party/WebKit/public/web/win/WebFontRendering.h"
9 #include "ui/gfx/font_render_params.h" 9 #include "ui/gfx/font_render_params.h"
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 blink::WebFontRendering::setStatusFontMetrics( 26 blink::WebFontRendering::setStatusFontMetrics(
27 prefs.status_font_family_name.c_str(), prefs.status_font_height); 27 prefs.status_font_family_name.c_str(), prefs.status_font_height);
28 28
29 blink::WebFontRendering::setLCDOrder( 29 blink::WebFontRendering::setLCDOrder(
30 gfx::FontRenderParams::SubpixelRenderingToSkiaLCDOrder( 30 gfx::FontRenderParams::SubpixelRenderingToSkiaLCDOrder(
31 prefs.subpixel_rendering)); 31 prefs.subpixel_rendering));
32 blink::WebFontRendering::setLCDOrientation( 32 blink::WebFontRendering::setLCDOrientation(
33 gfx::FontRenderParams::SubpixelRenderingToSkiaLCDOrientation( 33 gfx::FontRenderParams::SubpixelRenderingToSkiaLCDOrientation(
34 prefs.subpixel_rendering)); 34 prefs.subpixel_rendering));
35
36 blink::WebFontRendering::setAntialiasedTextEnabled(
37 prefs.should_antialias_text);
38 blink::WebFontRendering::setLCDTextEnabled(prefs.subpixel_rendering
39 != gfx::FontRenderParams::SUBPIXEL_RENDERING_NONE);
35 } 40 }
36 41
37 void RenderViewImpl::UpdateThemePrefs() { 42 void RenderViewImpl::UpdateThemePrefs() {
38 WebThemeEngineImpl::cacheScrollBarMetrics( 43 WebThemeEngineImpl::cacheScrollBarMetrics(
39 renderer_preferences_.vertical_scroll_bar_width_in_dips, 44 renderer_preferences_.vertical_scroll_bar_width_in_dips,
40 renderer_preferences_.horizontal_scroll_bar_height_in_dips, 45 renderer_preferences_.horizontal_scroll_bar_height_in_dips,
41 renderer_preferences_.arrow_bitmap_height_vertical_scroll_bar_in_dips, 46 renderer_preferences_.arrow_bitmap_height_vertical_scroll_bar_in_dips,
42 renderer_preferences_.arrow_bitmap_width_horizontal_scroll_bar_in_dips); 47 renderer_preferences_.arrow_bitmap_width_horizontal_scroll_bar_in_dips);
43 } 48 }
44 49
45 } // namespace content 50 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/FontCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698