mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-08 08:05:49 +02:00
Merge pull request #20904 from calixteman/rm_useless_op_gettextcontent
Remove some useless operations when getting the text content
This commit is contained in:
commit
feea0e2f00
@ -3197,6 +3197,9 @@ class PartialEvaluator {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// preprocessor.read() already handles save, restore and transform
|
||||||
|
// operations, so we don't need to worry about them here.
|
||||||
|
|
||||||
textState = stateManager.state;
|
textState = stateManager.state;
|
||||||
currentTextState ||= textState.clone();
|
currentTextState ||= textState.clone();
|
||||||
const fn = operation.fn;
|
const fn = operation.fn;
|
||||||
@ -3570,12 +3573,6 @@ class PartialEvaluator {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OPS.restore:
|
|
||||||
stateManager.restore();
|
|
||||||
break;
|
|
||||||
case OPS.save:
|
|
||||||
stateManager.save();
|
|
||||||
break;
|
|
||||||
} // switch
|
} // switch
|
||||||
if (textContent.items.length >= (sink?.desiredSize ?? 1)) {
|
if (textContent.items.length >= (sink?.desiredSize ?? 1)) {
|
||||||
// Wait for ready, if we reach highWaterMark.
|
// Wait for ready, if we reach highWaterMark.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user