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:
Tim van der Meij 2023-07-01 12:58:30 +02:00 committed by GitHub
commit 366a4ff1e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 34 deletions

View File

@ -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();
}

View File

@ -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")) &&