Merge pull request #16626 from Snuffleupagus/rm-pageColors-supports-check
[api-minor] Remove the `CSS.supports` checks for the `pageColors`-option in the GENERIC viewer
This commit is contained in:
commit
366a4ff1e9
@ -67,23 +67,6 @@ class PDFThumbnailViewer {
|
||||
this.l10n = l10n;
|
||||
this.pageColors = pageColors || null;
|
||||
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
|
||||
if (
|
||||
this.pageColors &&
|
||||
!(
|
||||
CSS.supports("color", this.pageColors.background) &&
|
||||
CSS.supports("color", this.pageColors.foreground)
|
||||
)
|
||||
) {
|
||||
if (this.pageColors.background || this.pageColors.foreground) {
|
||||
console.warn(
|
||||
"PDFThumbnailViewer: Ignoring `pageColors`-option, since the browser doesn't support the values used."
|
||||
);
|
||||
}
|
||||
this.pageColors = null;
|
||||
}
|
||||
}
|
||||
|
||||
this.scroll = watchScroll(this.container, this._scrollUpdated.bind(this));
|
||||
this._resetView();
|
||||
}
|
||||
|
@ -283,23 +283,6 @@ class PDFViewer {
|
||||
this.#enablePermissions = options.enablePermissions || false;
|
||||
this.pageColors = options.pageColors || null;
|
||||
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
|
||||
if (
|
||||
this.pageColors &&
|
||||
!(
|
||||
CSS.supports("color", this.pageColors.background) &&
|
||||
CSS.supports("color", this.pageColors.foreground)
|
||||
)
|
||||
) {
|
||||
if (this.pageColors.background || this.pageColors.foreground) {
|
||||
console.warn(
|
||||
"PDFViewer: Ignoring `pageColors`-option, since the browser doesn't support the values used."
|
||||
);
|
||||
}
|
||||
this.pageColors = null;
|
||||
}
|
||||
}
|
||||
|
||||
this.defaultRenderingQueue = !options.renderingQueue;
|
||||
if (
|
||||
(typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user