Remove some useless operations when getting the text content

The removed code has been added in #20624 and it's useless since these
operations (i.e. save/restore) are already handled in preprocessor.read.
This commit is contained in:
Calixte Denizet 2026-03-17 16:00:19 +01:00
parent 1f94023d42
commit fd1fea5f6a
No known key found for this signature in database
GPG Key ID: 0C5442631EE0691F

View File

@ -3197,6 +3197,9 @@ class PartialEvaluator {
break;
}
// preprocessor.read() already handles save, restore and transform
// operations, so we don't need to worry about them here.
textState = stateManager.state;
currentTextState ||= textState.clone();
const fn = operation.fn;
@ -3570,12 +3573,6 @@ class PartialEvaluator {
});
}
break;
case OPS.restore:
stateManager.restore();
break;
case OPS.save:
stateManager.save();
break;
} // switch
if (textContent.items.length >= (sink?.desiredSize ?? 1)) {
// Wait for ready, if we reach highWaterMark.