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

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

Issue 1392213002: Call setUseMobileViewportStyle before setViewportEnabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/DevToolsEmulator.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 // 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 "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 1050
1051 settings->setUnsafePluginPastingEnabled(false); 1051 settings->setUnsafePluginPastingEnabled(false);
1052 settings->setEditingBehavior( 1052 settings->setEditingBehavior(
1053 static_cast<WebSettings::EditingBehavior>(prefs.editing_behavior)); 1053 static_cast<WebSettings::EditingBehavior>(prefs.editing_behavior));
1054 1054
1055 settings->setSupportsMultipleWindows(prefs.supports_multiple_windows); 1055 settings->setSupportsMultipleWindows(prefs.supports_multiple_windows);
1056 1056
1057 // TODO(bokan): Remove once Blink side is gone. 1057 // TODO(bokan): Remove once Blink side is gone.
1058 settings->setInvertViewportScrollOrder(true); 1058 settings->setInvertViewportScrollOrder(true);
1059 1059
1060 #if defined(OS_ANDROID)
1061 settings->setUseMobileViewportStyle(true);
1062 #endif
1060 settings->setViewportEnabled(prefs.viewport_enabled); 1063 settings->setViewportEnabled(prefs.viewport_enabled);
bokan 2015/10/08 15:03:47 How about moving this block (viewportEnabled to Ma
1061 settings->setLoadWithOverviewMode(prefs.initialize_at_minimum_page_scale); 1064 settings->setLoadWithOverviewMode(prefs.initialize_at_minimum_page_scale);
1062 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled); 1065 settings->setViewportMetaEnabled(prefs.viewport_meta_enabled);
1063 settings->setMainFrameResizesAreOrientationChanges( 1066 settings->setMainFrameResizesAreOrientationChanges(
1064 prefs.main_frame_resizes_are_orientation_changes); 1067 prefs.main_frame_resizes_are_orientation_changes);
1065 1068
1066 settings->setSmartInsertDeleteEnabled(prefs.smart_insert_delete_enabled); 1069 settings->setSmartInsertDeleteEnabled(prefs.smart_insert_delete_enabled);
1067 1070
1068 settings->setSpatialNavigationEnabled(prefs.spatial_navigation_enabled); 1071 settings->setSpatialNavigationEnabled(prefs.spatial_navigation_enabled);
1069 1072
1070 settings->setSelectionIncludesAltImageText(true); 1073 settings->setSelectionIncludesAltImageText(true);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 prefs.viewport_meta_zero_values_quirk); 1114 prefs.viewport_meta_zero_values_quirk);
1112 settings->setClobberUserAgentInitialScaleQuirk( 1115 settings->setClobberUserAgentInitialScaleQuirk(
1113 prefs.clobber_user_agent_initial_scale_quirk); 1116 prefs.clobber_user_agent_initial_scale_quirk);
1114 settings->setIgnoreMainFrameOverflowHiddenQuirk( 1117 settings->setIgnoreMainFrameOverflowHiddenQuirk(
1115 prefs.ignore_main_frame_overflow_hidden_quirk); 1118 prefs.ignore_main_frame_overflow_hidden_quirk);
1116 settings->setReportScreenSizeInPhysicalPixelsQuirk( 1119 settings->setReportScreenSizeInPhysicalPixelsQuirk(
1117 prefs.report_screen_size_in_physical_pixels_quirk); 1120 prefs.report_screen_size_in_physical_pixels_quirk);
1118 settings->setPreferHiddenVolumeControls(true); 1121 settings->setPreferHiddenVolumeControls(true);
1119 settings->setMainFrameClipsContent(!prefs.record_whole_document); 1122 settings->setMainFrameClipsContent(!prefs.record_whole_document);
1120 settings->setShrinksViewportContentToFit(true); 1123 settings->setShrinksViewportContentToFit(true);
1121 settings->setUseMobileViewportStyle(true);
1122 settings->setAutoplayExperimentMode( 1124 settings->setAutoplayExperimentMode(
1123 blink::WebString::fromUTF8(prefs.autoplay_experiment_mode)); 1125 blink::WebString::fromUTF8(prefs.autoplay_experiment_mode));
1124 #endif 1126 #endif
1125 1127
1126 WebNetworkStateNotifier::setOnLine(prefs.is_online); 1128 WebNetworkStateNotifier::setOnLine(prefs.is_online);
1127 WebNetworkStateNotifier::setWebConnection( 1129 WebNetworkStateNotifier::setWebConnection(
1128 NetConnectionTypeToWebConnectionType(prefs.net_info_connection_type), 1130 NetConnectionTypeToWebConnectionType(prefs.net_info_connection_type),
1129 prefs.net_info_max_bandwidth_mbps); 1131 prefs.net_info_max_bandwidth_mbps);
1130 1132
1131 settings->setPinchOverlayScrollbarThickness( 1133 settings->setPinchOverlayScrollbarThickness(
(...skipping 2609 matching lines...) Expand 10 before | Expand all | Expand 10 after
3741 std::vector<gfx::Size> sizes; 3743 std::vector<gfx::Size> sizes;
3742 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 3744 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
3743 if (!url.isEmpty()) 3745 if (!url.isEmpty())
3744 urls.push_back( 3746 urls.push_back(
3745 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 3747 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
3746 } 3748 }
3747 SendUpdateFaviconURL(urls); 3749 SendUpdateFaviconURL(urls);
3748 } 3750 }
3749 3751
3750 } // namespace content 3752 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/DevToolsEmulator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698