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

Side by Side Diff: webkit/glue/webpreferences.cc

Issue 10916279: Chromium compositor change implementing page-scale driven pinch-zoom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Change m_unpinchedViewportSize and remove unnecessary >1 page scale clamping. Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/glue/webpreferences.h" 5 #include "webkit/glue/webpreferences.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi er.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi er.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 css_variables_enabled(false), 113 css_variables_enabled(false),
114 device_supports_touch(false), 114 device_supports_touch(false),
115 device_supports_mouse(true), 115 device_supports_mouse(true),
116 default_tile_width(256), 116 default_tile_width(256),
117 default_tile_height(256), 117 default_tile_height(256),
118 max_untiled_layer_width(512), 118 max_untiled_layer_width(512),
119 max_untiled_layer_height(512), 119 max_untiled_layer_height(512),
120 fixed_position_creates_stacking_context(false), 120 fixed_position_creates_stacking_context(false),
121 sync_xhr_in_documents_enabled(true), 121 sync_xhr_in_documents_enabled(true),
122 number_of_cpu_cores(1), 122 number_of_cpu_cores(1),
123 cookie_enabled(true) { 123 cookie_enabled(true),
124 apply_page_scale_factor_in_compositor(false) {
124 standard_font_family_map[kCommonScript] = 125 standard_font_family_map[kCommonScript] =
125 ASCIIToUTF16("Times New Roman"); 126 ASCIIToUTF16("Times New Roman");
126 fixed_font_family_map[kCommonScript] = 127 fixed_font_family_map[kCommonScript] =
127 ASCIIToUTF16("Courier New"); 128 ASCIIToUTF16("Courier New");
128 serif_font_family_map[kCommonScript] = 129 serif_font_family_map[kCommonScript] =
129 ASCIIToUTF16("Times New Roman"); 130 ASCIIToUTF16("Times New Roman");
130 sans_serif_font_family_map[kCommonScript] = 131 sans_serif_font_family_map[kCommonScript] =
131 ASCIIToUTF16("Arial"); 132 ASCIIToUTF16("Arial");
132 cursive_font_family_map[kCommonScript] = 133 cursive_font_family_map[kCommonScript] =
133 ASCIIToUTF16("Script"); 134 ASCIIToUTF16("Script");
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 settings); 229 settings);
229 ApplyFontsFromMap(fantasy_font_family_map, setFantasyFontFamilyWrapper, 230 ApplyFontsFromMap(fantasy_font_family_map, setFantasyFontFamilyWrapper,
230 settings); 231 settings);
231 settings->setDefaultFontSize(default_font_size); 232 settings->setDefaultFontSize(default_font_size);
232 settings->setDefaultFixedFontSize(default_fixed_font_size); 233 settings->setDefaultFixedFontSize(default_fixed_font_size);
233 settings->setMinimumFontSize(minimum_font_size); 234 settings->setMinimumFontSize(minimum_font_size);
234 settings->setMinimumLogicalFontSize(minimum_logical_font_size); 235 settings->setMinimumLogicalFontSize(minimum_logical_font_size);
235 settings->setDefaultTextEncodingName(ASCIIToUTF16(default_encoding)); 236 settings->setDefaultTextEncodingName(ASCIIToUTF16(default_encoding));
236 settings->setApplyDefaultDeviceScaleFactorInCompositor( 237 settings->setApplyDefaultDeviceScaleFactorInCompositor(
237 apply_default_device_scale_factor_in_compositor); 238 apply_default_device_scale_factor_in_compositor);
239 settings->setApplyPageScaleFactorInCompositor(
240 apply_page_scale_factor_in_compositor);
238 settings->setJavaScriptEnabled(javascript_enabled); 241 settings->setJavaScriptEnabled(javascript_enabled);
239 settings->setWebSecurityEnabled(web_security_enabled); 242 settings->setWebSecurityEnabled(web_security_enabled);
240 settings->setJavaScriptCanOpenWindowsAutomatically( 243 settings->setJavaScriptCanOpenWindowsAutomatically(
241 javascript_can_open_windows_automatically); 244 javascript_can_open_windows_automatically);
242 settings->setLoadsImagesAutomatically(loads_images_automatically); 245 settings->setLoadsImagesAutomatically(loads_images_automatically);
243 settings->setImagesEnabled(images_enabled); 246 settings->setImagesEnabled(images_enabled);
244 settings->setPluginsEnabled(plugins_enabled); 247 settings->setPluginsEnabled(plugins_enabled);
245 settings->setDOMPasteAllowed(dom_paste_enabled); 248 settings->setDOMPasteAllowed(dom_paste_enabled);
246 settings->setDeveloperExtrasEnabled(developer_extras_enabled); 249 settings->setDeveloperExtrasEnabled(developer_extras_enabled);
247 settings->setNeedsSiteSpecificQuirks(site_specific_quirks_enabled); 250 settings->setNeedsSiteSpecificQuirks(site_specific_quirks_enabled);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 settings->setDeviceSupportsMouse(device_supports_mouse); 415 settings->setDeviceSupportsMouse(device_supports_mouse);
413 416
414 settings->setDefaultTileSize( 417 settings->setDefaultTileSize(
415 WebSize(default_tile_width, default_tile_height)); 418 WebSize(default_tile_width, default_tile_height));
416 settings->setMaxUntiledLayerSize( 419 settings->setMaxUntiledLayerSize(
417 WebSize(max_untiled_layer_width, max_untiled_layer_height)); 420 WebSize(max_untiled_layer_width, max_untiled_layer_height));
418 421
419 settings->setFixedPositionCreatesStackingContext( 422 settings->setFixedPositionCreatesStackingContext(
420 fixed_position_creates_stacking_context); 423 fixed_position_creates_stacking_context);
421 424
425 settings->setApplyPageScaleFactorInCompositor(
426 apply_page_scale_factor_in_compositor);
427
422 WebNetworkStateNotifier::setOnLine(is_online); 428 WebNetworkStateNotifier::setOnLine(is_online);
423 } 429 }
424 430
425 } // namespace webkit_glue 431 } // namespace webkit_glue
OLDNEW
« content/browser/web_contents/web_contents_impl.cc ('K') | « webkit/glue/webpreferences.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698