Bug 255937
| Summary: | [WinCairo]REGRESSION(263118@main): Small viewport does end up in broken screenshots via Page.snapshotRect | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Max Schmitt <max> |
| Component: | Platform | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | Normal | CC: | fujii.hironori |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Windows 10 | ||
Max Schmitt
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Max Schmitt
Pull request: https://github.com/WebKit/WebKit/pull/13158
Fujii Hironori
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
We have now a minimal viewport of 250x250 which works for us.