Skip to content

Commit

Permalink
Merge pull request #17771 from calixteman/bug1832519
Browse files Browse the repository at this point in the history
[GeckoView] Remove the open-in-app button (bug 1832519)
  • Loading branch information
calixteman authored Mar 5, 2024
2 parents b447a62 + 3cb58f8 commit f1272ee
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 42 deletions.
8 changes: 0 additions & 8 deletions l10n/en-US/viewer.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ pdfjs-bookmark-button =
.title = Current Page (View URL from 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

pdfjs-tools-button =
Expand Down
9 changes: 0 additions & 9 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1168,10 +1168,6 @@ const PDFViewerApplication = {
}
},

openInExternalApp() {
this.downloadOrSave({ openInExternalApp: true });
},

/**
* Report the error; used for errors affecting loading and/or parsing of
* the entire PDF document.
Expand Down Expand Up @@ -1928,7 +1924,6 @@ const PDFViewerApplication = {
);
eventBus._on("print", webViewerPrint);
eventBus._on("download", webViewerDownload);
eventBus._on("openinexternalapp", webViewerOpenInExternalApp);
eventBus._on("firstpage", webViewerFirstPage);
eventBus._on("lastpage", webViewerLastPage);
eventBus._on("nextpage", webViewerNextPage);
Expand Down Expand Up @@ -2064,7 +2059,6 @@ const PDFViewerApplication = {
eventBus._off("presentationmode", webViewerPresentationMode);
eventBus._off("print", webViewerPrint);
eventBus._off("download", webViewerDownload);
eventBus._off("openinexternalapp", webViewerOpenInExternalApp);
eventBus._off("firstpage", webViewerFirstPage);
eventBus._off("lastpage", webViewerLastPage);
eventBus._off("nextpage", webViewerNextPage);
Expand Down Expand Up @@ -2485,9 +2479,6 @@ function webViewerPrint() {
function webViewerDownload() {
PDFViewerApplication.downloadOrSave();
}
function webViewerOpenInExternalApp() {
PDFViewerApplication.openInExternalApp();
}
function webViewerFirstPage() {
PDFViewerApplication.page = 1;
}
Expand Down
11 changes: 0 additions & 11 deletions web/images/gv-toolbarButton-openinapp.svg

This file was deleted.

5 changes: 0 additions & 5 deletions web/toolbar-geckoview.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ class Toolbar {
eventName: "download",
nimbusName: "download-button",
},
{
element: options.openInApp,
eventName: "openinexternalapp",
nimbusName: "open-in-app-button",
},
];

if (nimbusData) {
Expand Down
5 changes: 0 additions & 5 deletions web/viewer-geckoview.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
--toolbar-fg-color: #15141a;

--toolbarButton-download-icon: url(images/gv-toolbarButton-download.svg);
--toolbarButton-openinapp-icon: url(images/gv-toolbarButton-openinapp.svg);
}

:root:dir(rtl) {
Expand Down Expand Up @@ -232,10 +231,6 @@ body {
mask-image: var(--toolbarButton-download-icon);
}

#openInApp::before {
mask-image: var(--toolbarButton-openinapp-icon);
}

.dialogButton {
width: auto;
margin: 3px 4px 2px !important;
Expand Down
3 changes: 0 additions & 3 deletions web/viewer-geckoview.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@
<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>
</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 id="viewerContainer" tabindex="0">
Expand Down
1 change: 0 additions & 1 deletion web/viewer-geckoview.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ function getViewerConfiguration() {
mainContainer,
container: document.getElementById("floatingToolbar"),
download: document.getElementById("download"),
openInApp: document.getElementById("openInApp"),
},

passwordOverlay: {
Expand Down

0 comments on commit f1272ee

Please sign in to comment.