engine_->SelectAll();
return true;
}
- } else if (modifier & PP_INPUTEVENT_MODIFIER_CONTROLKEY) {
+ }
+ if (modifier & PP_INPUTEVENT_MODIFIER_CONTROLKEY) {
switch (keyboard_event.GetKeyCode()) {
case ui::VKEY_OEM_4:
// Left bracket.
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);
}
}
void Instance::NotifySelectedFindResultChanged(int current_find_index) {
+ DCHECK_GE(current_find_index, 0);
SelectedFindResultChanged(current_find_index);
}