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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 1653003002: Make scrollAnimatorEnabled work on Mac like it does on other platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Previous patch accidentally lost new files Created 4 years, 10 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
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/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 prefs.device_supports_mouse = false; 473 prefs.device_supports_mouse = false;
474 #endif 474 #endif
475 475
476 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints(); 476 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints();
477 477
478 prefs.touch_adjustment_enabled = 478 prefs.touch_adjustment_enabled =
479 !command_line.HasSwitch(switches::kDisableTouchAdjustment); 479 !command_line.HasSwitch(switches::kDisableTouchAdjustment);
480 480
481 prefs.enable_scroll_animator = 481 prefs.enable_scroll_animator =
482 !command_line.HasSwitch(switches::kDisableSmoothScrolling) && 482 !command_line.HasSwitch(switches::kDisableSmoothScrolling) &&
483 gfx::Animation::ShouldRenderRichAnimation(); 483 gfx::Animation::ScrollAnimationsEnabledBySystem();
484 484
485 // Certain GPU features might have been blacklisted. 485 // Certain GPU features might have been blacklisted.
486 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs); 486 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs);
487 487
488 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( 488 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings(
489 GetProcess()->GetID())) { 489 GetProcess()->GetID())) {
490 prefs.loads_images_automatically = true; 490 prefs.loads_images_automatically = true;
491 prefs.javascript_enabled = true; 491 prefs.javascript_enabled = true;
492 } 492 }
493 493
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 1367
1368 gfx::Point RenderViewHostImpl::ConvertDIPToViewport(const gfx::Point& point) { 1368 gfx::Point RenderViewHostImpl::ConvertDIPToViewport(const gfx::Point& point) {
1369 // The point in guest view is already converted. 1369 // The point in guest view is already converted.
1370 if (!render_widget_host_->scale_input_to_viewport()) 1370 if (!render_widget_host_->scale_input_to_viewport())
1371 return point; 1371 return point;
1372 float scale = GetWidget()->GetView()->current_device_scale_factor(); 1372 float scale = GetWidget()->GetView()->current_device_scale_factor();
1373 return gfx::Point(point.x() * scale, point.y() * scale); 1373 return gfx::Point(point.x() * scale, point.y() * scale);
1374 } 1374 }
1375 1375
1376 } // namespace content 1376 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/browser/theme_helper_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698