From b932eaf6a79d8fc3dd28bcd8e5e509a7fe06a4ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 14 Mar 2021 15:00:04 +0100 Subject: [PATCH] print: Remove invalid @supports condition. @supports() is not supposed to report support for page descriptors, this is depending on a Chromium bug, which doesn't treat as invalid: ```
``` Even though it should. That is https://bugs.chromium.org/p/chromium/issues/detail?id=1079214 There's no need to use @supports for this. If the descriptor is not accepted it will just be ignored. That way, when Firefox implements @page { size }, which is in progress, it will get the right behavior. --- web/pdf_print_service.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/web/pdf_print_service.js b/web/pdf_print_service.js index e384aaafe..e269f0398 100644 --- a/web/pdf_print_service.js +++ b/web/pdf_print_service.js @@ -120,15 +120,7 @@ PDFPrintService.prototype = { this.pageStyleSheet = document.createElement("style"); const pageSize = this.pagesOverview[0]; this.pageStyleSheet.textContent = - // "size: " is what we need. But also add "A4" because - // Firefox incorrectly reports support for the other value. - "@supports ((size:A4) and (size:1pt 1pt)) {" + - "@page { size: " + - pageSize.width + - "pt " + - pageSize.height + - "pt;}" + - "}"; + "@page { size: " + pageSize.width + "pt " + pageSize.height + "pt;}"; body.appendChild(this.pageStyleSheet); },