Title: [290321] trunk/Source/WebCore
- Revision
- 290321
- Author
- [email protected]
- Date
- 2022-02-22 11:04:39 -0800 (Tue, 22 Feb 2022)
Log Message
Hide PDF.js sidebar shown for long documents
https://bugs.webkit.org/show_bug.cgi?id=236850
Reviewed by Chris Dumez.
Use the built-in PDF.js `#pagemode=none` parameter to do this: https://github.com/mozilla/pdf.js/wiki/Viewer-options
* html/PDFDocument.cpp:
(WebCore::PDFDocument::createDocumentStructure):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (290320 => 290321)
--- trunk/Source/WebCore/ChangeLog 2022-02-22 19:02:52 UTC (rev 290320)
+++ trunk/Source/WebCore/ChangeLog 2022-02-22 19:04:39 UTC (rev 290321)
@@ -1,3 +1,15 @@
+2022-02-22 Tim Nguyen <[email protected]>
+
+ Hide PDF.js sidebar shown for long documents
+ https://bugs.webkit.org/show_bug.cgi?id=236850
+
+ Reviewed by Chris Dumez.
+
+ Use the built-in PDF.js `#pagemode=none` parameter to do this: https://github.com/mozilla/pdf.js/wiki/Viewer-options
+
+ * html/PDFDocument.cpp:
+ (WebCore::PDFDocument::createDocumentStructure):
+
2022-02-22 Antti Koivisto <[email protected]>
[CSS container Queries] getComputedStyle should update style for invalid query containers
Modified: trunk/Source/WebCore/html/PDFDocument.cpp (290320 => 290321)
--- trunk/Source/WebCore/html/PDFDocument.cpp 2022-02-22 19:02:52 UTC (rev 290320)
+++ trunk/Source/WebCore/html/PDFDocument.cpp 2022-02-22 19:04:39 UTC (rev 290321)
@@ -138,8 +138,10 @@
void PDFDocument::createDocumentStructure()
{
- // The empty file parameter prevents default pdf from loading.
- auto viewerURL = "webkit-pdfjs-viewer://pdfjs/web/viewer.html?file=";
+ // Description of parameters:
+ // - `#pagemode=none` prevents the sidebar from showing on load.
+ // - Empty `?file=` parameter prevents default pdf from loading.
+ auto viewerURL = "webkit-pdfjs-viewer://pdfjs/web/viewer.html?file=#pagemode=none";
auto rootElement = HTMLHtmlElement::create(*this);
appendChild(rootElement);
rootElement->insertedByParser();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes