Skip to content

Commit

Permalink
[PDFSidebarResizer] Skip the CSS.supports checks for MOZCENTRAL builds
Browse files Browse the repository at this point in the history
Since CSS variable support cannot be disabled any more in Firefox, the run-time checks are of no using for MOZCENTRAL builds.
  • Loading branch information
Snuffleupagus authored and backstroke-bot committed May 14, 2022
1 parent 87eb0c5 commit 1778982
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web/pdf_sidebar_resizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1778982

Please sign in to comment.