Merge pull request #17771 from calixteman/bug1832519

[GeckoView] Remove the open-in-app button (bug 1832519)
This commit is contained in:
calixteman 2024-03-05 14:11:12 +01:00 committed by GitHub
commit f1272ee435
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 0 additions and 42 deletions

View File

@ -58,14 +58,6 @@ pdfjs-bookmark-button =
.title = Current Page (View URL from Current Page) .title = Current Page (View URL from Current Page)
pdfjs-bookmark-button-label = Current Page pdfjs-bookmark-button-label = Current Page
# Used in Firefox for Android.
pdfjs-open-in-app-button =
.title = Open in app
# Used in Firefox for Android.
# Length of the translation matters since we are in a mobile context, with limited screen estate.
pdfjs-open-in-app-button-label = Open in app
## Secondary toolbar and context menu ## Secondary toolbar and context menu
pdfjs-tools-button = pdfjs-tools-button =

View File

@ -1168,10 +1168,6 @@ const PDFViewerApplication = {
} }
}, },
openInExternalApp() {
this.downloadOrSave({ openInExternalApp: true });
},
/** /**
* Report the error; used for errors affecting loading and/or parsing of * Report the error; used for errors affecting loading and/or parsing of
* the entire PDF document. * the entire PDF document.
@ -1928,7 +1924,6 @@ const PDFViewerApplication = {
); );
eventBus._on("print", webViewerPrint); eventBus._on("print", webViewerPrint);
eventBus._on("download", webViewerDownload); eventBus._on("download", webViewerDownload);
eventBus._on("openinexternalapp", webViewerOpenInExternalApp);
eventBus._on("firstpage", webViewerFirstPage); eventBus._on("firstpage", webViewerFirstPage);
eventBus._on("lastpage", webViewerLastPage); eventBus._on("lastpage", webViewerLastPage);
eventBus._on("nextpage", webViewerNextPage); eventBus._on("nextpage", webViewerNextPage);
@ -2064,7 +2059,6 @@ const PDFViewerApplication = {
eventBus._off("presentationmode", webViewerPresentationMode); eventBus._off("presentationmode", webViewerPresentationMode);
eventBus._off("print", webViewerPrint); eventBus._off("print", webViewerPrint);
eventBus._off("download", webViewerDownload); eventBus._off("download", webViewerDownload);
eventBus._off("openinexternalapp", webViewerOpenInExternalApp);
eventBus._off("firstpage", webViewerFirstPage); eventBus._off("firstpage", webViewerFirstPage);
eventBus._off("lastpage", webViewerLastPage); eventBus._off("lastpage", webViewerLastPage);
eventBus._off("nextpage", webViewerNextPage); eventBus._off("nextpage", webViewerNextPage);
@ -2485,9 +2479,6 @@ function webViewerPrint() {
function webViewerDownload() { function webViewerDownload() {
PDFViewerApplication.downloadOrSave(); PDFViewerApplication.downloadOrSave();
} }
function webViewerOpenInExternalApp() {
PDFViewerApplication.openInExternalApp();
}
function webViewerFirstPage() { function webViewerFirstPage() {
PDFViewerApplication.page = 1; PDFViewerApplication.page = 1;
} }

View File

@ -1,11 +0,0 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 4.5H6.5V7H4V4.5Z" fill="black"/>
<path d="M6.5 10.5H4V13H6.5V10.5Z" fill="black"/>
<path d="M13.25 10.5H10.75V13H13.25V10.5Z" fill="black"/>
<path d="M17.5 10.5H20V13H17.5V10.5Z" fill="black"/>
<path d="M6.5 16.5H4V19H6.5V16.5Z" fill="black"/>
<path d="M10.75 16.5H13.25V19H10.75V16.5Z" fill="black"/>
<path d="M20 16.5H17.5V19H20V16.5Z" fill="black"/>
<path d="M13.25 4.5H10.75V7H13.25V4.5Z" fill="black"/>
<path d="M17.5 4.5H20V7H17.5V4.5Z" fill="black"/>
</svg>

Before

Width:  |  Height:  |  Size: 573 B

View File

@ -38,11 +38,6 @@ class Toolbar {
eventName: "download", eventName: "download",
nimbusName: "download-button", nimbusName: "download-button",
}, },
{
element: options.openInApp,
eventName: "openinexternalapp",
nimbusName: "open-in-app-button",
},
]; ];
if (nimbusData) { if (nimbusData) {

View File

@ -39,7 +39,6 @@
--toolbar-fg-color: #15141a; --toolbar-fg-color: #15141a;
--toolbarButton-download-icon: url(images/gv-toolbarButton-download.svg); --toolbarButton-download-icon: url(images/gv-toolbarButton-download.svg);
--toolbarButton-openinapp-icon: url(images/gv-toolbarButton-openinapp.svg);
} }
:root:dir(rtl) { :root:dir(rtl) {
@ -232,10 +231,6 @@ body {
mask-image: var(--toolbarButton-download-icon); mask-image: var(--toolbarButton-download-icon);
} }
#openInApp::before {
mask-image: var(--toolbarButton-openinapp-icon);
}
.dialogButton { .dialogButton {
width: auto; width: auto;
margin: 3px 4px 2px !important; margin: 3px 4px 2px !important;

View File

@ -95,9 +95,6 @@ See https://github.com/adobe-type-tools/cmap-resources
<button id="download" class="toolbarButton" title="Download" tabindex="31" data-l10n-id="pdfjs-download-button"> <button id="download" class="toolbarButton" title="Download" tabindex="31" data-l10n-id="pdfjs-download-button">
<span data-l10n-id="pdfjs-download-button-label">Download</span> <span data-l10n-id="pdfjs-download-button-label">Download</span>
</button> </button>
<button id="openInApp" class="toolbarButton" title="Open in app" tabindex="32" data-l10n-id="pdfjs-open-in-app-button">
<span data-l10n-id="pdfjs-open-in-app-button-label">Open in app</span>
</button>
</div> </div>
<div id="viewerContainer" tabindex="0"> <div id="viewerContainer" tabindex="0">

View File

@ -44,7 +44,6 @@ function getViewerConfiguration() {
mainContainer, mainContainer,
container: document.getElementById("floatingToolbar"), container: document.getElementById("floatingToolbar"),
download: document.getElementById("download"), download: document.getElementById("download"),
openInApp: document.getElementById("openInApp"),
}, },
passwordOverlay: { passwordOverlay: {