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

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: Rouding off double value for the minimum zoom factor 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..8b7bd70618a448cbd0343a21502ebc727b411999 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -3759,11 +3759,11 @@ blink::WebSpeechRecognizer* RenderViewImpl::speechRecognizer() {
void RenderViewImpl::zoomLimitsChanged(double minimum_level,
double maximum_level) {
+ // Round the double before dispatching the async IPC.
sky 2015/01/15 00:45:49 You're documenting what the code is doing. Documen
int minimum_percent = static_cast<int>(
- ZoomLevelToZoomFactor(minimum_level) * 100);
+ ZoomLevelToZoomFactor(minimum_level) * 100 + 0.5);
int maximum_percent = static_cast<int>(
- ZoomLevelToZoomFactor(maximum_level) * 100);
-
+ ZoomLevelToZoomFactor(maximum_level) * 100 + 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