fix(geometry): preserve OOPIF scale with occupied scrollbars

This commit is contained in:
drakezhang
2026-09-09 16:58:25 +08:00
parent 896c7944d8
commit a62a28d8cd
14 changed files with 504 additions and 65 deletions
@@ -3380,6 +3380,7 @@ describe("handleSnapshot", () => {
throw new Error(`unexpected root CDP method ${method}`);
});
const sendToTarget = vi.fn(async (_target, method: string) => {
if (method === "Runtime.evaluate") return { result: { value: { width: 400, height: 300 } } };
if (method === "Page.getLayoutMetrics" && ownerGeometry !== "unavailable")
return {
visualViewport: { clientWidth: 1000 },