microsoft / microsoft/playwright

[Bug]: WebGPU support in WebKit

Open
#39,762 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

browser-webkit P3-collecting-feedback
Dominant language
TypeScript
Stars
96.3k
Forks
6.5k
Avg merge
1d 6h
Merged PRs (30d)
180

Description

### Version

1.58.2

### Steps to reproduce

1. On macOS 26.3.1, create `repro.mjs`:
```js
import { webkit } from "@playwright/test"

const browser = await webkit.launch({ headless: false })
const page = await browser.newPage()

await page.goto("about:blank")

const result = await page.evaluate(async () => {
const gpu = navigator.gpu ?? null
const adapter = gpu ? await gpu.requestAdapter() : null

return {
userAgent: navigator.userAgent,
hasGpu: Boolean(gpu),
hasGPUBufferUsage: typeof globalThis.GPUBufferUsage !== "undefined",
hasGPUMapMode: typeof globalThis.GPUMapMode !== "undefined",
hasAdapter: Boolean(adapter),
}
})

console.log(result)
```
2. Run:
```bash
pnpm exec node repro.mjs
```
3. Alternatively, open the page directly:
```bash
pnpm exec playwright open --browser=webkit https://webgpureport.org
```

### Expected behavior

Playwright `webkit` should expose WebGPU on this machine, since stock Safari 26.3.1 on the same host supports it.

### Actual behavior

The script prints:
```js
{
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Safari/605.1.15',
hasGpu: false,
hasGPUBufferUsage: false,
hasGPUMapMode: false,
hasAdapter: false
}
```

And `webgpureport.org` shows:
```text
webgpu is not available on this browser
It's possible it may be enabled via flags.
See this link for more info
```

### Additional context

_No response_

### Environment

```shell
System:
OS: macOS 26.3.1
CPU: (16) arm64 Apple M4 Max
Memory: 1.83 GB / 64.00 GB
Binaries:
Node: 24.14.0 - /Users/redacted/.nvm/versions/node/v24.14.0/bin/node
npm: 11.9.0 - /Users/redacted/.nvm/versions/node/v24.14.0/bin/npm
pnpm: 10.28.2 - /Users/redacted/.nvm/versions/node/v24.14.0/bin/pnpm
IDEs:
VSCode: 1.111.0 - /opt/homebrew/bin/code
Languages:
Bash: 5.3.9 - /opt/homebrew/bin/bash
npmPackages:
@playwright/test: ^1.51.0 => 1.58.2
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running repro.mjs with the documented pnpm exec node command and inspect the webkit.launch and page.evaluate entry points. Compare the reported WebGPU globals and adapter result with the expected behavior on the same macOS host; done means the Playwright WebKit browser exposes WebGPU consistently with the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
testing-qa, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.