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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 1972803002: Scale the scroll offset from viewport to dip in use-zoom-for-dsf mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 921f42b4a1828e143ed950ae000c2a9411f76457..e239e22efa56ae5ccd1552af512e177e53d856fa 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -1285,8 +1285,9 @@ void PepperPluginInstanceImpl::ViewChanged(
view_data_.css_scale *= viewport_to_dip_scale_;
view_data_.device_scale /= viewport_to_dip_scale_;
- gfx::Size scroll_offset =
- container_->document().frame()->scrollOffset();
+ gfx::Size scroll_offset = gfx::ScaleToRoundedSize(
+ container_->document().frame()->scrollOffset(), viewport_to_dip_scale_);
+
view_data_.scroll_offset = PP_MakePoint(scroll_offset.width(),
scroll_offset.height());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698