[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.
This commit is contained in:
Jonas Jenwald 2019-10-03 11:55:13 +02:00
parent 4ae3f9fcf6
commit c1cfe2881b

View File

@ -47,8 +47,10 @@ class PDFSidebarResizer {
this.eventBus = eventBus;
this.l10n = l10n;
if (typeof CSS === 'undefined' || typeof CSS.supports !== 'function' ||
!CSS.supports(SIDEBAR_WIDTH_VAR, `calc(-1 * ${SIDEBAR_MIN_WIDTH}px)`)) {
if ((typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) &&
(typeof CSS === 'undefined' || typeof CSS.supports !== 'function' ||
!CSS.supports(SIDEBAR_WIDTH_VAR,
`calc(-1 * ${SIDEBAR_MIN_WIDTH}px)`))) {
console.warn('PDFSidebarResizer: ' +
'The browser does not support resizing of the sidebar.');
return;