Chromium Code Reviews| 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/15 18:35:51
SG on the explanation, please add it as a comment
csilv
2011/11/19 00:17:45
Done.
|
| *enable_decrement = percent > minimum_zoom_percent_; |
| *enable_increment = percent < maximum_zoom_percent_; |
| return percent; |