mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 18:25:37 +02:00
Remove the unused rules
parameter from the _prepareFontLoadEvent
method (PR 3477 follow-up)
This is yet another small piece of functionality that became unused in PR 3477 (which landed nine years ago).
This commit is contained in:
parent
da1780f826
commit
ca05b650aa
1 changed files with 3 additions and 4 deletions
|
@ -114,7 +114,7 @@ class FontLoader {
|
||||||
}
|
}
|
||||||
await new Promise(resolve => {
|
await new Promise(resolve => {
|
||||||
const request = this._queueLoadingCallback(resolve);
|
const request = this._queueLoadingCallback(resolve);
|
||||||
this._prepareFontLoadEvent([rule], [font], request);
|
this._prepareFontLoadEvent([font], request);
|
||||||
});
|
});
|
||||||
// The font was, asynchronously, loaded.
|
// The font was, asynchronously, loaded.
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ class FontLoader {
|
||||||
return shadow(this, "_loadTestFont", testFont);
|
return shadow(this, "_loadTestFont", testFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
_prepareFontLoadEvent(rules, fonts, request) {
|
_prepareFontLoadEvent(fonts, request) {
|
||||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
|
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
|
||||||
throw new Error("Not implemented: _prepareFontLoadEvent");
|
throw new Error("Not implemented: _prepareFontLoadEvent");
|
||||||
}
|
}
|
||||||
|
@ -252,9 +252,8 @@ class FontLoader {
|
||||||
|
|
||||||
let called = 0;
|
let called = 0;
|
||||||
function isFontReady(name, callback) {
|
function isFontReady(name, callback) {
|
||||||
called++;
|
|
||||||
// With setTimeout clamping this gives the font ~100ms to load.
|
// With setTimeout clamping this gives the font ~100ms to load.
|
||||||
if (called > 30) {
|
if (++called > 30) {
|
||||||
warn("Load test font never loaded.");
|
warn("Load test font never loaded.");
|
||||||
callback();
|
callback();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue