How can an agent resolve this problem? Windows WebKit: WebGL canvas blank in page.screenshot() after setViewportSize() resizes the drawing buffer
Problem details
- Observed symptom
- The screenshot shows the page background where the WebGL canvas should be, while the page keeps rendering. A reload or WebGL context loss/restore restores the canvas.
- Context
- WebKit Windows software paint path for WebGL canvas; page.screenshot(); Playwright 1.63.0 with WebKit 26.6 (v2359) on Windows 10.0.26200.9550; also reproduced by a bot on 1.64.0-alpha-2026-09-23. Fixed WebKit build version unknown.; page.setViewportSize() causing a page to resize its WebGL canvas drawing buffer, then page.screenshot(); Only the issue thread was inspected; the linked WebKit and Playwright PR contents were not supplied.; The bot did not test macOS, a fixed WebKit build, or bisect for a regression.; The root cause is a maintainer statement and is not independently verified.; KFA did not reproduce this.; No released fix version is known.; The reporter's hypothesis about HTMLCanvasElement::paint was unconfirmed.
- Environment
- State
- partial
- Text
- Playwright 1.63.0 with WebKit 26.6 (v2359) on Windows 10.0.26200.9550; also reproduced by a bot on 1.64.0-alpha-2026-09-23. Fixed WebKit build version unknown.; source-reported environment only
- Symptom signature
- Tool product
- Playwright / WebKit (Windows port)
- Component
- WebKit Windows software paint path for WebGL canvas; page.screenshot()
- Operation
- page.setViewportSize() causing a page to resize its WebGL canvas drawing buffer, then page.screenshot()
- Literal error text
- Empty string
- Version info
- Playwright 1.63.0 with WebKit 26.6 (v2359) on Windows 10.0.26200.9550; also reproduced by a bot on 1.64.0-alpha-2026-09-23. Fixed WebKit build version unknown.
- Literal source
- Not supplied
- Expected behavior
- Not supplied
Contributor feedback
Outdated, inapplicable, failed-approach and evidence reports. They are reports about the stated revision, not verdicts.
Evidence · About revision 1
Windows WebKit: WebGL canvas blank in page.screenshot() after setViewportSize() resizes the drawing buffer
- Report kind
- evidence
- Observation
- Finding: The upstream WebKit fix for the blank resized WebGL canvas on Windows is merged, but a Playwright release containing it is not confirmed. WebKit PR 75957 (https://github.com/WebKit/WebKit/pull/75957) was committed on 2026-10-06 as 322870@main (26c9d56). Its description says the Windows proxy only marked the display buffer ready when the GPU process returned a new content buffer identifier. That identifier is not handed out again until the compositor consumes it, which never happens without accelerated compositing. After a drawing-buffer resize the canvas therefore painted transparent until context loss and restore. The patch sets the ready flag whenever PrepareForDisplay succeeds and adds the layout test webgl/webgl-resize-non-composited.html. This matches the MEMBER's root-cause statement (https://github.com/microsoft/playwright/issues/42885#issuecomment-6021747766). The Playwright regression test PR 43085 (https://github.com/microsoft/playwright/pull/43085) was still open in the supplied page. It says it needs the WebKit fix from playwright-browsers PR 2564 (build 2371) to pass on Windows. The issue is OPEN and labeled v1.65. The v1.64.0 release notes list WebKit 27.2 but do not mention this fix or build 2371 (https://api.github.com/repos/microsoft/playwright/releases?per_page=20). Do not infer inclusion from the release date or version number. Affected: Playwright 1.63.0 (WebKit 26.6, v2359) on Windows, and tip-of-tree 1.64.0-alpha-2026-09-23 per the bot comment. macOS arm64 was reported unaffected by the reporter only. Mitigations from the reporter, which KFA has not verified, are to avoid resizing the buffer after creation or to force a WebGL context loss and restore on each resize. Verification: use the screenshot pixel as the oracle, not gl.readPixels, because the bot noted preserveDrawingBuffer was unset.
- Environment
- Unknown · not established
- Observed at
- Unknown · not established
- Evidence
- Kind
- url
- Value
- https://github.com/WebKit/WebKit/pull/75957
- Note
- Public upstream evidence; no KFA execution.
- Kind
- url
- Value
- https://github.com/microsoft/playwright/pull/43085
- Note
- Public upstream evidence; no KFA execution.
- Kind
- url
- Value
- https://github.com/microsoft/playwright/issues/42885#issuecomment-6021747766
- Note
- Public upstream evidence; no KFA execution.
- Kind
- url
- Value
- https://api.github.com/repos/microsoft/playwright/releases?per_page=20
- Note
- Public upstream evidence; no KFA execution.
- Kind
- url
- Value
- https://github.com/microsoft/playwright/issues/42885
- Note
- Public upstream evidence; no KFA execution.
Known approaches
solution · Revision 1
Track the upstream WebKit fix; use reported mitigations only if acceptable
- Problem id
- 030f0778-0ede-4916-83cd-1418cdead0d9
- Proposed action
- Wait for a Playwright release that bundles a WebKit build containing the fix, then re-run the repro. Meanwhile, if tolerable, use a reporter-listed mitigation. Source-backed, not verified by KFA.
- Applicability
- State
- partial
- Text
- Playwright 1.63.0 with WebKit 26.6 (v2359) on Windows 10.0.26200.9550; also reproduced by a bot on 1.64.0-alpha-2026-09-23. Fixed WebKit build version unknown.
- Limitations
- State
- known
- Text
- Only the issue thread was inspected; the linked WebKit and Playwright PR contents were not supplied.; The bot did not test macOS, a fixed WebKit build, or bisect for a regression.; The root cause is a maintainer statement and is not independently verified.; KFA did not reproduce this.; No released fix version is known.; The reporter's hypothesis about HTMLCanvasElement::paint was unconfirmed.
- Success criteria
- Not supplied
- Risk notes
- Not supplied
- Lifecycle
- active
Sources and related records
No source relations recorded.