Skip to content

fix(webview): support site isolation and fix postData#41041

Merged
yury-s merged 3 commits into
microsoft:mainfrom
yury-s:webview-site-isolation
May 29, 2026
Merged

fix(webview): support site isolation and fix postData#41041
yury-s merged 3 commits into
microsoft:mainfrom
yury-s:webview-site-isolation

Conversation

@yury-s
Copy link
Copy Markdown
Member

@yury-s yury-s commented May 29, 2026

No description provided.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@yury-s yury-s changed the title fix(webview): support iOS 26 site isolation and fix input/postData fix(webview): support site isolation and fix input/postData May 29, 2026
yury-s added 3 commits May 29, 2026 10:52
Stock Mobile Safari on iOS 26 site-isolates frames, reporting a separate
Target.targetCreated with type 'frame' for every page (even pages without
iframes). wvPage asserted page-only targets and threw, breaking the entire
WebView suite. Ignore non-page frame targets (resuming any paused ones) and
drive the page through the top-level page target.

Also fixes three input/network bugs uncovered once the suite ran again:
- postData: stock WebKit reports Network.Request.postData as a plain string,
  not base64 like the patched fork — decode as utf8.
- keyboard: synthetic key events never performed the default text insertion,
  so press/type left inputs unchanged — emulate insertion honoring selection.
- mouse: move() only dispatched mousemove — fire the full out/leave ->
  over/enter -> move sequence (mouse + pointer) when the hovered element
  changes, so hover-driven UI reacts.

Removes the 56 now-passing tests from the webkit-webview-page expectations
and recategorizes the remaining genuine failures.
Revert the keyboard text-insertion and mouse hover-sequence changes in
wvInput.ts; they will land in their own PR. Re-add the input-dependent tests
that depended on them back to the expectations file as expected failures:
- elementhandle-press / elementhandle-type 'should not modify selection when focused'

The iOS 26 site-isolation (wvPage) and postData (wvInterceptableRequest) fixes
remain.
… fulfill tests

- Update the webkit-webview snapshots for the subresource-image fulfill tests
  (mock-binary-response, mock-svg); these now pass reliably.
- Un-skip 'should allow mocking binary responses' / 'should allow mocking svg
  with charset' (reliable once snapshots match — they fulfill an <img>
  subresource, no process swap).
- Keep the main-navigation fulfill tests skipped: they are flaky on iOS 26
  because the navigation process-swaps and the provisional target arrives
  un-paused, racing interception so page.goto returns null. Grouped under a new
  'main-navigation-fulfill-flaky' section.
@yury-s yury-s force-pushed the webview-site-isolation branch from d9cf308 to 1c96ca0 Compare May 29, 2026 17:55
@yury-s yury-s changed the title fix(webview): support site isolation and fix input/postData fix(webview): support site isolation and fix postData May 29, 2026
@yury-s yury-s merged commit c27ccc4 into microsoft:main May 29, 2026
48 of 49 checks passed
@yury-s yury-s deleted the webview-site-isolation branch May 29, 2026 18:01
@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

7233 passed, 1113 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests 1"

4 flaky ⚠️ [chromium-library] › library/video.spec.ts:647 › screencast › should capture full viewport `@ubuntu-22.04-chromium-tip-of-tree`
⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:700 › should indicate current test status `@windows-latest-node20`

43982 passed, 864 skipped


Merge workflow run.

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