mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #16401 from Snuffleupagus/Safari-15.4
[api-minor] Update the minimum supported Safari version to 15.4
This commit is contained in:
commit
a5336d9d79
6 changed files with 17 additions and 66 deletions
|
@ -37,24 +37,6 @@ class OverlayManager {
|
|||
}
|
||||
this.#overlays.set(dialog, { canForceClose });
|
||||
|
||||
if (
|
||||
typeof PDFJSDev !== "undefined" &&
|
||||
PDFJSDev.test("GENERIC && !SKIP_BABEL") &&
|
||||
!dialog.showModal
|
||||
) {
|
||||
const dialogPolyfill = require("dialog-polyfill/dist/dialog-polyfill.js");
|
||||
dialogPolyfill.registerDialog(dialog);
|
||||
|
||||
if (!this._dialogPolyfillCSS) {
|
||||
this._dialogPolyfillCSS = true;
|
||||
|
||||
const style = document.createElement("style");
|
||||
style.textContent = PDFJSDev.eval("DIALOG_POLYFILL_CSS");
|
||||
|
||||
document.head.prepend(style);
|
||||
}
|
||||
}
|
||||
|
||||
dialog.addEventListener("cancel", evt => {
|
||||
this.#active = null;
|
||||
});
|
||||
|
|
|
@ -2180,14 +2180,7 @@ class PDFViewer {
|
|||
for (const entry of entries) {
|
||||
if (entry.target === this.container) {
|
||||
this.#updateContainerHeightCss(
|
||||
// Safari doesn't support `borderBoxSize` until version 15.4.
|
||||
Math.floor(
|
||||
typeof PDFJSDev !== "undefined" &&
|
||||
!PDFJSDev.test("SKIP_BABEL") &&
|
||||
!entry.borderBoxSize?.length
|
||||
? entry.contentRect.height
|
||||
: entry.borderBoxSize[0].blockSize
|
||||
)
|
||||
Math.floor(entry.borderBoxSize[0].blockSize)
|
||||
);
|
||||
this.#containerTopLeft = null;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue