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

Unified Diff: content/browser/tab_contents/tab_contents.cc

Issue 8528011: Page zoom improvements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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/tab_contents/tab_contents.cc
===================================================================
--- content/browser/tab_contents/tab_contents.cc (revision 109526)
+++ content/browser/tab_contents/tab_contents.cc (working copy)
@@ -197,9 +197,9 @@
opener_web_ui_type_(WebUI::kNoWebUI),
closed_by_user_gesture_(false),
minimum_zoom_percent_(
- static_cast<int>(WebKit::WebView::minTextSizeMultiplier * 100)),
+ static_cast<int>(content::kMinimumZoomFactor * 100)),
maximum_zoom_percent_(
- static_cast<int>(WebKit::WebView::maxTextSizeMultiplier * 100)),
+ static_cast<int>(content::kMaximumZoomFactor * 100)),
temporary_zoom_settings_(false),
content_restrictions_(0),
view_type_(content::VIEW_TYPE_TAB_CONTENTS) {
@@ -863,7 +863,7 @@
bool* enable_decrement) {
*enable_decrement = *enable_increment = false;
int percent = static_cast<int>(
- WebKit::WebView::zoomLevelToZoomFactor(GetZoomLevel()) * 100);
+ WebKit::WebView::zoomLevelToZoomFactor(GetZoomLevel()) * 100 + 0.5);
James Hawkins 2011/11/14 18:09:05 What's the 0.5 about?
csilv 2011/11/14 23:10:29 Rouding a fractional value to the nearest integer.
*enable_decrement = percent > minimum_zoom_percent_;
*enable_increment = percent < maximum_zoom_percent_;
return percent;

Powered by Google App Engine
This is Rietveld 408576698