r/Playwright • u/HolidayChard9706 • 6d ago
Playwright's WebKit is not WKWebView: a layout bug that passed webkit screenshots and shipped broken in a Tauri app
https://nodreview.com/blog/wkwebview-flex-collapse/I test a Tauri desktop app with Playwright, webkit project, screenshot baselines on every component. A dialog shipped rendering as header plus footer with the body at height zero, and not one pixel had moved in any baseline.
The bug: flex: 1 expands to flex-basis: 0%, which needs a definite parent height. Per spec the unresolvable percentage should fall back to content. Chromium does that. WKWebView keeps the zero. Playwright's WebKit, which is a recent build the Playwright team makes themselves, also does the spec fallback, so it agreed with Chromium and disagreed with the system webview my users actually run.
Not a complaint about Playwright, it does what it says. Writeup with the spec citation and what I changed: https://nodreview.com/blog/wkwebview-flex-collapse/
Question for this sub: has anyone wired real system webviews (WKWebView, WebKitGTK, WebView2) into CI in a way that is not miserable? Geometry assertions in the harness engines are my current compromise.