Bug 171431 - [GTK] Add GTK+ implementation of WebAutomationSession
Summary: [GTK] Add GTK+ implementation of WebAutomationSession
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: 171107 171428
  Show dependency treegraph
Reported: 2017-04-28 07:11 PDT by Carlos Garcia Campos
Modified: 2017-05-03 01:56 PDT (History)
5 users (show)

See Also:

Patch (22.73 KB, patch)
2017-04-28 07:14 PDT, Carlos Garcia Campos
mcatanzaro: 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 2017-04-28 07:11:10 PDT
Add platform dependent methods for GTK+ to synthesize events.
Comment 1 Carlos Garcia Campos 2017-04-28 07:14:22 PDT
Created attachment 308528 [details]

This won't apply because it depends on two other patches.
Comment 2 BJ Burg 2017-05-01 11:53:07 PDT
Comment on attachment 308528 [details]

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

This looks good to me, though I cannot really assess bugs in usage of GTK platform specifics. You probably want a GTK reviewer too.

> Source/WebKit2/UIProcess/Automation/WebAutomationSession.h:231
> +    // GTK+ doesn't keep track of the active modifiers when using synthesizez events.

Typo: synthesized.

> Source/WebKit2/UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:36
> +static inline unsigned modifiersToEventState(WebEvent::Modifiers modifiers)

These probably don't need to be 'inline'.

> Source/WebKit2/UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:51
> +static inline unsigned mouseButtonToGdkButton(Inspector::Protocol::Automation::MouseButton button)


> Source/WebKit2/UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:86
> +static void doMotionEvent(GtkWidget* widget, const WebCore::IntPoint& location, unsigned state)

Just FYI, on Mac we don't interpolate intermediate mouse positions. We might do so once the Actions API is implemented since it naturally specifies a duration for transitions.
Comment 3 Carlos Garcia Campos 2017-05-02 01:01:25 PDT
Brian, this patch depends on bug #171107, could you cq+ the patch there when you are around to make sure it doesn't break anything on your side?
Comment 4 Carlos Garcia Campos 2017-05-03 01:56:06 PDT
Committed r216114: <http://trac.webkit.org/changeset/216114>