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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2551573002: [Touch emulator] Update cursor when device scale factor changes. (Closed)
Patch Set: other platforms Created 4 years 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
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index c088b30459bec86e23e54cdb35844e697c1c7922..6141da6dc17a327adfaad69e89de263e97aec73e 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1420,6 +1420,11 @@ void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
// the screen info as well as the new size (if the screen has changed scale
// factor).
WasResized();
+
+ if (touch_emulator_) {
+ touch_emulator_->SetDeviceScaleFactor(
+ view_.get() ? content::GetScaleFactorForView(view_.get()) : 1.0f);
+ }
}
void RenderWidgetHostImpl::GetSnapshotFromBrowser(

Powered by Google App Engine
This is Rietveld 408576698