RESOLVED WORKSFORME 255937
[WinCairo]REGRESSION(263118@main): Small viewport does end up in broken screenshots via Page.snapshotRect
https://bugs.webkit.org/show_bug.cgi?id=255937
Summary [WinCairo]REGRESSION(263118@main): Small viewport does end up in broken scree...
Max Schmitt
Reported 2023-04-25 11:11:06 PDT
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
Attachments
Max Schmitt
Comment 1 2023-04-25 11:14:43 PDT
Fujii Hironori
Comment 2 2023-04-25 13:43:34 PDT
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.
Max Schmitt
Comment 3 2023-05-12 02:48:34 PDT
We have now a minimal viewport of 250x250 which works for us.
Note You need to log in before you can comment on or make changes to this bug.