fix(engine): consolidate capture readiness and retries (#2404)

* fix(engine): await dynamic CSS backgrounds before capture

* fix(render): retry transient network changes

* fix(engine): parse CSS URLs without backtracking

* fix(engine): decode CSS backgrounds in batch capture
This commit is contained in:
Miguel Ángel
2026-07-14 18:10:03 -04:00
committed by GitHub
parent 97cbe48f30
commit 9e2afbcce5
4 changed files with 251 additions and 0 deletions
@@ -941,6 +941,7 @@ export async function produceDrawElementFrameBatch(
__hf_accel_canvases?: HTMLCanvasElement[];
__hf3d?: { update: () => void };
__hf?: { seek?: (t: number) => void };
__hfDecodeDynamicCssBackgroundImages?: () => Promise<void>;
__hfDeInvalidate?: () => boolean;
__HF_ROOT_PROPS__?: boolean;
__HF_ROOT_BASE_OPACITY__?: number;
@@ -975,6 +976,7 @@ export async function produceDrawElementFrameBatch(
const { t, fid } = frame;
try {
if (aw.__hf && typeof aw.__hf.seek === "function") aw.__hf.seek(t);
await aw.__hfDecodeDynamicCssBackgroundImages?.();
aw.__hf3d?.update();
const accel = (aw.__hf_accel_canvases ?? []).filter((c) => root.contains(c));
for (const c of accel) {