| Summary: | [WPE][GTK] There should be an easily accessible way to disable pdf.js at runtime | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Martin Demlon <m> |
| Component: | Assignee: | Nobody <webkit-unassigned> | |
| Status: | NEW --- | ||
| Severity: | Enhancement | CC: | berto, cgarcia, mcatanzaro, ntim, thorton, webkit-bug-importer, wilander |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | All | ||
| OS: | Linux | ||
|
Description
Martin Demlon
2023-08-10 03:33:08 PDT
Also reported downstream in Debian recently for WebKitGTK: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053713 There is a PdfJSViewerEnabled setting for this, but it's not exposed for WPE/GTK APIs. This would be a good first pull request for anyone interested in contributing. Add the setting to WebKitSettings.h.in and WebKitSettings.cpp, then add a sanity-check test to TestWebKitSettings.cpp just to ensure that toggling the setting works. Most of the work will be copy/pasting from an existing setting and then renaming things. OK, this can sort of be done already using webkit_settings_get_all_features(), iterate through the list until you find PdfJSViewerEnabled, and then webkit_settings_set_feature_enabled(). That's not very convenient, though. |