Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WinCairo][Regression 263118@main] Small viewport does end up in broken screenshots #13158

Conversation

mxschmitt
Copy link
Contributor

@mxschmitt mxschmitt commented Apr 25, 2023

8ad49cf

[WinCairo][Regression 263118@main] Small viewport does end up in broken screenshots
https://bugs.webkit.org/show_bug.cgi?id=255937

Reviewed by NOBODY (OOPS!).

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.
Page.snapshotRect breaks due to that

* Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
(WebKit::DrawingAreaProxyCoordinatedGraphics::sendUpdateGeometry):

8ad49cf

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 ❌ πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2-stress
βœ… πŸ›  watch
βœ… πŸ›  watch-sim

…en screenshots

https://bugs.webkit.org/show_bug.cgi?id=255937

Reviewed by NOBODY (OOPS!).

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.
Page.snapshotRect breaks due to that

* Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
(WebKit::DrawingAreaProxyCoordinatedGraphics::sendUpdateGeometry):
@mxschmitt
Copy link
Contributor Author

mxschmitt commented Apr 25, 2023

FYI, this change was there before.

Not a huge fan of the way I'm fixing it, I feel like we should address it in a better way, there is microsoft/playwright#22633 as a similar bug.

@fujii
Copy link
Contributor

fujii commented Apr 25, 2023

Please use "REGRESSION(263118@main): " in the commit log title.
Do you know the reason why the view size is empty even though the actual window size is 50x50?

@mxschmitt mxschmitt marked this pull request as draft April 26, 2023 13:02
@mxschmitt
Copy link
Contributor Author

Closing for now and we'll adjust our code to have a minimal viewport of 250x250.

@mxschmitt mxschmitt closed this May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants