Bug 175864

Summary: [WPE] Some event handlers not working.
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WPE WebKitAssignee: Carlos Alberto Lopez Perez <clopez>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, cgarcia, commit-queue, csaavedra, mcatanzaro, webkit-bug-importer, zan
Priority: P2    
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=173419
Attachments:
Description Flags
Patch
none
Patch none

Description Carlos Alberto Lopez Perez 2017-08-22 16:54:14 PDT
The following simple test with the onclick event handler is not working on WPE: https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onclick_html
Comment 1 Carlos Alberto Lopez Perez 2017-08-22 17:40:02 PDT
The previous example is not working because of the frames. WPE is not passing the event correctly to the subframes.

Another example that is also not working: https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onwheel_addeventlistener
Comment 2 Carlos Alberto Lopez Perez 2017-08-22 17:54:53 PDT
Created attachment 318837 [details]
Patch
Comment 3 Michael Catanzaro 2017-08-22 18:07:11 PDT
Comment on attachment 318837 [details]
Patch

Good work, but it seems now the files are identical except for EventHandler::shouldTurnVerticalTicksIntoHorizontal, right? Or nearly so? We should merge these files and use #if PLATFORM(GTK) where necessary to avoid duplicate code.
Comment 4 Carlos Alberto Lopez Perez 2017-08-22 18:50:29 PDT
Created attachment 318844 [details]
Patch
Comment 5 WebKit Commit Bot 2017-08-23 08:16:27 PDT
Comment on attachment 318844 [details]
Patch

Clearing flags on attachment: 318844

Committed r221075: <http://trac.webkit.org/changeset/221075>
Comment 6 WebKit Commit Bot 2017-08-23 08:16:29 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Carlos Garcia Campos 2017-08-28 00:54:21 PDT
Comment on attachment 318844 [details]
Patch

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

> Source/WebCore/PlatformGTK.cmake:149
> +    platform/glib/EventHandlerGlib.cpp

I think we agreed on using GLib instead of Glib, at least for new files. But anyway, I don't think GLib is a good name for this file, since it doesn't use glib at all, and it was not GTK because it used GTK+, but because it was the GTK port implementation of event handler.
Comment 8 Carlos Alberto Lopez Perez 2017-08-28 02:59:12 PDT
(In reply to Carlos Garcia Campos from comment #7)
> Comment on attachment 318844 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=318844&action=review
> 
> > Source/WebCore/PlatformGTK.cmake:149
> > +    platform/glib/EventHandlerGlib.cpp
> 
> I think we agreed on using GLib instead of Glib, at least for new files. But
> anyway, I don't think GLib is a good name for this file, since it doesn't
> use glib at all, and it was not GTK because it used GTK+, but because it was
> the GTK port implementation of event handler.

I agree that GLib is likely not the best name, but I don't have a better proposal.

What would be a good name in your opinion?
Comment 9 Carlos Garcia Campos 2017-08-28 03:20:08 PDT
(In reply to Carlos Alberto Lopez Perez from comment #8)
> (In reply to Carlos Garcia Campos from comment #7)
> > Comment on attachment 318844 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=318844&action=review
> > 
> > > Source/WebCore/PlatformGTK.cmake:149
> > > +    platform/glib/EventHandlerGlib.cpp
> > 
> > I think we agreed on using GLib instead of Glib, at least for new files. But
> > anyway, I don't think GLib is a good name for this file, since it doesn't
> > use glib at all, and it was not GTK because it used GTK+, but because it was
> > the GTK port implementation of event handler.
> 
> I agree that GLib is likely not the best name, but I don't have a better
> proposal.
> 
> What would be a good name in your opinion?

Maybe Linux, but it could be that a windows implementation using GTK+ would be the same as the current GTK port implementation, so I'm not sure...
Comment 10 Michael Catanzaro 2017-08-28 04:27:35 PDT
I think GLib is the best suffix to use for these cases. We all agree the file doesn't use GLib, but it seems like the best suffix to use for WPE + GTK.
Comment 11 Carlos Alberto Lopez Perez 2017-08-28 07:21:06 PDT
(In reply to Carlos Garcia Campos from comment #7)
> > Source/WebCore/PlatformGTK.cmake:149
> > +    platform/glib/EventHandlerGlib.cpp
> 
> I think we agreed on using GLib instead of Glib, at least for new files.

I was not aware of this, I just followed (what it looked to me) the pattern the other files there followed.

I can upload a follow-up patch renaming this (or maybe upload a more general patch renaming everything to avoid future confusions like this one)
Comment 12 Carlos Garcia Campos 2017-08-28 07:41:29 PDT
(In reply to Carlos Alberto Lopez Perez from comment #11)
> (In reply to Carlos Garcia Campos from comment #7)
> > > Source/WebCore/PlatformGTK.cmake:149
> > > +    platform/glib/EventHandlerGlib.cpp
> > 
> > I think we agreed on using GLib instead of Glib, at least for new files.
> 
> I was not aware of this, I just followed (what it looked to me) the pattern
> the other files there followed.
> 
> I can upload a follow-up patch renaming this (or maybe upload a more general
> patch renaming everything to avoid future confusions like this one)

I don't think it makes sense to rename all files, we should just make sure we follow the rule for new files. Since this one is still new, feel free to rename it in an unreviewed commit.
Comment 13 Carlos Alberto Lopez Perez 2017-08-28 09:37:40 PDT
Committed r221260: <http://trac.webkit.org/changeset/221260>