Skip to content

Commit 1778982

Browse files
Snuffleupagusbackstroke-bot
authored andcommitted
[PDFSidebarResizer] Skip the CSS.supports checks for MOZCENTRAL builds
Since CSS variable support cannot be disabled any more in Firefox, the run-time checks are of no using for MOZCENTRAL builds.
1 parent 87eb0c5 commit 1778982

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

web/pdf_sidebar_resizer.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ class PDFSidebarResizer {
4747
this.eventBus = eventBus;
4848
this.l10n = l10n;
4949

50-
if (typeof CSS === 'undefined' || typeof CSS.supports !== 'function' ||
51-
!CSS.supports(SIDEBAR_WIDTH_VAR, `calc(-1 * ${SIDEBAR_MIN_WIDTH}px)`)) {
50+
if ((typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) &&
51+
(typeof CSS === 'undefined' || typeof CSS.supports !== 'function' ||
52+
!CSS.supports(SIDEBAR_WIDTH_VAR,
53+
`calc(-1 * ${SIDEBAR_MIN_WIDTH}px)`))) {
5254
console.warn('PDFSidebarResizer: ' +
5355
'The browser does not support resizing of the sidebar.');
5456
return;

0 commit comments

Comments
 (0)