[webkit-reviews] review denied: [Bug 221456] [GTK] event.ctrlKey and other are false in keydown event : [Attachment 419387] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 5 07:02:21 PST 2021

Adrian Perez <aperez at igalia.com> has denied  review:
Bug 221456: [GTK] event.ctrlKey and other are false in keydown event

Attachment 419387: Patch


--- Comment #2 from Adrian Perez <aperez at igalia.com> ---
Comment on attachment 419387
  --> https://bugs.webkit.org/attachment.cgi?id=419387

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

> Source/WebKit/Shared/gtk/WebEventFactory.cpp:70
> +    if (keyboardEvent) {

When ”keyboardEvent” is true, the event type will always be “GDK_KEY_PRESS” or
“GDK_KEY_RELEASE”; so instead of adding this ”keyboardEvent” flag to the
signature, I think we can directly check for “GDK_KEY_PRESS” instead:

  if (gdk_event_get_event_type(const_cast<GdkEvent*>(event)) == GDK_KEY_PRESS)
      guint keyval;
      gdk_event_get_keyval(event, &keyval);
      switch (keyval) {
	  // ...

  return modifiers;

…or is there something else I am missing here?

> Source/WebKit/Shared/gtk/WebEventFactory.cpp:340
> +

Please remove this stray empty line before landing.

More information about the webkit-reviews mailing list