Merge pull request #16001 from Snuffleupagus/rm-GeckoView-cursor-tools

[GeckoView] Don't initalize the cursor-tools, since they're unused
This commit is contained in:
Jonas Jenwald 2023-02-03 18:50:42 +01:00 committed by GitHub
commit 25253034d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 26 deletions

View File

@ -576,11 +576,15 @@ const PDFViewerApplication = {
);
}
this.pdfCursorTools = new PDFCursorTools({
container,
eventBus,
cursorToolOnLoad: AppOptions.get("cursorToolOnLoad"),
});
// NOTE: The cursor-tools are unlikely to be helpful/useful in GeckoView,
// in particular the `HandTool` which basically simulates touch scrolling.
if (appConfig.secondaryToolbar?.cursorHandToolButton) {
this.pdfCursorTools = new PDFCursorTools({
container,
eventBus,
cursorToolOnLoad: AppOptions.get("cursorToolOnLoad"),
});
}
if (appConfig.toolbar) {
this.toolbar = new Toolbar(appConfig.toolbar, eventBus, this.l10n);

View File

@ -221,27 +221,6 @@ dialog :link {
width: 200px;
}
.grab-to-pan-grab {
cursor: grab !important;
}
.grab-to-pan-grab
*:not(input):not(textarea):not(button):not(select):not(:link) {
cursor: inherit !important;
}
.grab-to-pan-grab:active,
.grab-to-pan-grabbing {
cursor: grabbing !important;
position: fixed;
background: rgba(0, 0, 0, 0);
display: block;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
z-index: 50000; /* should be higher than anything else in PDF.js! */
}
@page {
margin: 0;
}