Skip to content

fix(webview): page.getContentQuads should work for elements inside <iframe>#41437

Open
dcrousso wants to merge 1 commit into
microsoft:mainfrom
dcrousso:fix-WKWebView-iframe-quads
Open

fix(webview): page.getContentQuads should work for elements inside <iframe>#41437
dcrousso wants to merge 1 commit into
microsoft:mainfrom
dcrousso:fix-WKWebView-iframe-quads

Conversation

@dcrousso

Copy link
Copy Markdown
Contributor

leverage elementFromPoint, getBoundingClientRect, and getComputedStyle to manually compute the offsets of each ancestor <iframe>

…`<iframe>`

leverage `elementFromPoint`, `getBoundingClientRect`, and `getComputedStyle` to manually compute the offsets of each ancestor `<iframe>`
@dcrousso dcrousso requested review from pavelfeldman and yury-s June 23, 2026 22:33
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

7380 passed, 1122 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

2 failed
❌ [chromium-library] › library/browsercontext-add-init-script.spec.ts:28 › should work without navigation, after all bindings @chromium-ubuntu-22.04-arm-node20
❌ [chromium-library] › library/browsercontext-expose-function.spec.ts:77 › should be callable from-inside addInitScript @chromium-ubuntu-22.04-arm-node20

3 flaky ⚠️ [chromium-page] › page/page-request-continue.spec.ts:756 › propagate headers cross origin redirect after interception `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:717 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node24`

49047 passed, 1142 skipped


Merge workflow run.

let frameDoc: Document | null = null;
let frameView: (Window & typeof globalThis) | null = null;
try {
frameDoc = frame.contentDocument;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch is unlikely to work as iframes are typically cross-origin.

target.value = target.value.slice(0, start) + text + target.value.slice(end);
if (!target)
return;
const view = target.ownerDocument.defaultView;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a part of a separate change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants