If a small viewport like 50x50 is used, on Windows it does not get rendered at all on the window (since its outside of the window). Since still a WebView::onSizeEvent event gets emitted with 50x0, we want to ignore it and not use it as an actual window size in the drawing area. Thats how it was done before the patch. Downstream bug: https://github.com/microsoft/playwright/issues/22616
Pull request: https://github.com/WebKit/WebKit/pull/13158
Windows WebKit Playwright is still using non-GPU process mode. We have to modify MiniBrowser to use non-GPU process mode in MiniBrowser. diff --git a/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp b/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp index fac65d82f8ab..ff977c47f1c7 100644 --- a/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp +++ b/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp @@ -145,6 +145,10 @@ Ref<BrowserWindow> WebKitBrowserWindow::create(BrowserWindowClient& client, HWND WKPreferencesSetMediaCapabilitiesEnabled(preferences.get(), false); WKPreferencesSetDeveloperExtrasEnabled(preferences.get(), true); +#if 1 // Don't land this + WKPreferencesSetBoolValueForKeyForTesting(preferences.get(), false, createWKString("UseGPUProcessForWebGLEnabled").get()); +#endif + auto pageGroup = adoptWK(WKPageGroupCreateWithIdentifier(createWKString("WinMiniBrowser").get())); WKPageGroupSetPreferences(pageGroup.get(), preferences.get()); However, I can't see any problems with small window size.
We have now a minimal viewport of 250x250 which works for us.