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

Unified Diff: content/renderer/render_view_impl.cc

Issue 678343002: Default zoom was never read from chrome://settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed rounding errors for maxium zoom level Created 5 years, 11 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 | « chrome/test/base/testing_profile.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 623cb14b38daf82935e19ba89717cf0ca615aa36..9867cdc30046bc147da7a0cd01e0b276db426f6c 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -3761,9 +3761,9 @@ void RenderViewImpl::zoomLimitsChanged(double minimum_level,
double maximum_level) {
int minimum_percent = static_cast<int>(
ZoomLevelToZoomFactor(minimum_level) * 100);
Alexei Svitkine (slow) 2015/01/13 14:51:13 This should probably be rounded too.
+ // Round double before dispatching the async IPC.
int maximum_percent = static_cast<int>(
- ZoomLevelToZoomFactor(maximum_level) * 100);
-
+ ZoomLevelToZoomFactor(maximum_level) * 100 + .5);
Alexei Svitkine (slow) 2015/01/13 14:51:13 Nit: 0.5
Send(new ViewHostMsg_UpdateZoomLimits(
routing_id_, minimum_percent, maximum_percent));
}
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698