Chromium Code Reviews| Index: pdf/instance.cc |
| diff --git a/pdf/instance.cc b/pdf/instance.cc |
| index 8ec4a9e7e365c4243da41af98ee536c936c7ec83..4bd2f787dfec69d80534de5f9686dc5e619f32b9 100644 |
| --- a/pdf/instance.cc |
| +++ b/pdf/instance.cc |
| @@ -779,6 +779,14 @@ void Instance::StopFind() { |
| void Instance::Zoom(double scale, bool text_only) { |
| UserMetricsRecordAction("PDF.ZoomFromBrowser"); |
| + |
| + // If the zoom level doesn't change it means that this zoom change might have |
| + // been initiated by the plugin. In that case, we don't want to change the |
| + // zoom mode to ZOOM_SCALE as it may have been intentionally set to |
| + // ZOOM_FIT_TO_PAGE or some other value when the zoom was last changed. |
| + if (scale == zoom_) |
| + return; |
| + |
| SetZoom(ZOOM_SCALE, scale); |
|
wjmaclean
2014/10/20 13:25:13
This looks better ... lgtm.
|
| } |