fix(vom): iframe oopif geometry

This commit is contained in:
Ljy-0827
2026-08-18 19:28:16 +08:00
committed by Zhang GH
parent 42403e55f2
commit 94ec7e73fc
8 changed files with 125 additions and 169 deletions
-1
View File
@@ -1057,7 +1057,6 @@ export async function captureViewModel(
frameId: snapshotFrameId(doc0, strings),
ownerFrameBackendNodeId: null,
projection: {
sourceViewport: viewport,
sourceClips: [],
edges: [],
topViewport: viewport,
@@ -1,6 +1,6 @@
import type { CdpFrame, CdpFrameGraph } from "@/browser-driver/frame-graph";
import { type FrameProjection, resolveFrameProjection } from "../frame-geometry";
import { projectRectToViewport } from "../geometry";
import { resolveFrameProjection } from "../frame-geometry";
import { type GeometryProjection, projectRectToViewport } from "../geometry";
import { type CdpRunner, cdpRunnerForTarget, sendToCdpTarget } from "../shared";
import { type CapturedNode, type CapturedViewModel, captureViewModel } from "./capture";
import {
@@ -31,7 +31,10 @@ async function discoverFrameGraph(cdp: CdpRunner, tabId: number): Promise<CdpFra
}
}
function transformFrameNodes(nodes: CapturedNode[], projection: FrameProjection): CapturedNode[] {
function transformFrameNodes(
nodes: CapturedNode[],
projection: GeometryProjection,
): CapturedNode[] {
return nodes.map((node) => ({
...node,
rect: (() => {