Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index 6ca3936ddd5a466e8bd50bd772874986276caaf1..dd539337297f4495e1ddef6c6d744a1d2ca197c5 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -38,6 +38,7 @@ |
#include "content/child/v8_value_converter_impl.h" |
#include "content/child/webmessageportchannel_impl.h" |
#include "content/common/content_constants_internal.h" |
+#include "content/common/content_switches_internal.h" |
#include "content/common/database_messages.h" |
#include "content/common/dom_storage/dom_storage_types.h" |
#include "content/common/drag_messages.h" |
@@ -743,8 +744,10 @@ void RenderViewImpl::Initialize(const ViewMsg_New_Params& params, |
// completing initialization. Otherwise, we can finish it now. |
if (opener_id_ == MSG_ROUTING_NONE) |
did_show_ = true; |
- |
- webview()->setDeviceScaleFactor(device_scale_factor_); |
+ if (IsUseZoomForDSFEnabled()) |
+ webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
+ else |
+ webview()->setDeviceScaleFactor(device_scale_factor_); |
webview()->setDisplayMode(display_mode_); |
webview()->settings()->setPreferCompositingToLCDTextEnabled( |
PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
@@ -3183,7 +3186,10 @@ void RenderViewImpl::OnImeConfirmComposition( |
void RenderViewImpl::SetDeviceScaleFactor(float device_scale_factor) { |
RenderWidget::SetDeviceScaleFactor(device_scale_factor); |
if (webview()) { |
- webview()->setDeviceScaleFactor(device_scale_factor); |
+ if (IsUseZoomForDSFEnabled()) |
+ webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor); |
+ else |
+ webview()->setDeviceScaleFactor(device_scale_factor); |
webview()->settings()->setPreferCompositingToLCDTextEnabled( |
PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
} |