Commit fcac99d2 authored by Daniel Hosseinian's avatar Daniel Hosseinian Committed by Commit Bot

Remove page rotation from Print Preview

Custom margins break when the previewed content is rotated. Rotating is
also a very rare user action in print preview, and it is already
unavailable through a UI.

Remove the keyboard shortcuts and the context menu options.

Bug: 275471
Change-Id: Ia8e9e0efa0c2a676bd0e7a916e1fa848a4a21527
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2527905Reviewed-by: default avatarRaymes Khoury <raymes@chromium.org>
Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Commit-Queue: Daniel Hosseinian <dhoss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826347}
parent 63487313
......@@ -120,21 +120,11 @@ class PDFViewerPPElement extends PDFViewerBaseElement {
e.preventDefault();
}
return;
case '[':
if (e.ctrlKey) {
this.rotateCounterclockwise();
}
return;
case '\\':
if (e.ctrlKey) {
this.getZoomToolbar_().fitToggleFromHotKey();
}
return;
case ']':
if (e.ctrlKey) {
this.rotateClockwise();
}
return;
}
// Give print preview a chance to handle the key event.
......
......@@ -1961,10 +1961,8 @@ bool PepperPluginInstanceImpl::IsPdfPlugin() {
}
bool PepperPluginInstanceImpl::CanRotateView() {
if (!LoadPdfInterface() || module()->is_crashed())
return false;
return true;
return LoadPdfInterface() && !module()->is_crashed() &&
!IsPrintPreviewUrl(document_url_);
}
void PepperPluginInstanceImpl::RotateView(WebPlugin::RotationType type) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment