Bug 202530 - [GTK] WebAutomation: make setWindowRect synchronous
Summary: [GTK] WebAutomation: make setWindowRect synchronous
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: Gtk
Depends on:
Blocks: 202047
  Show dependency treegraph
Reported: 2019-10-03 09:05 PDT by Carlos Garcia Campos
Modified: 2019-10-03 23:15 PDT (History)
5 users (show)

See Also:

Patch (3.81 KB, patch)
2019-10-03 09:08 PDT, Carlos Garcia Campos
clopez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2019-10-03 09:05:41 PDT
Move/resize window is asynchronous in GTK, but automation expects it to be synchronous so that get window rect after setting it always returns the value set.
Comment 1 Carlos Garcia Campos 2019-10-03 09:08:15 PDT
Created attachment 380119 [details]
Comment 2 EWS Watchlist 2019-10-03 09:09:07 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Carlos Alberto Lopez Perez 2019-10-03 09:26:38 PDT
Comment on attachment 380119 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=380119&action=review

> Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp:156
> +            if (geometry.x >= 0 && geometry.y >= 0) {

curly braces are not needed around this if.

> Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp:159
> +            if (geometry.width > 0 && geometry.height > 0) {

Same here.
Comment 4 Carlos Garcia Campos 2019-10-03 23:15:50 PDT
Committed r250707: <https://trac.webkit.org/changeset/250707>