[api-minor] Remove the CSS.supports
checks for the pageColors
-option in the GENERIC viewer
Given the browsers that we currently support it's probably not necessary to keep the checks for the color-values.
This commit is contained in:
parent
ac937a9b3c
commit
be775143b2
@ -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