Bug 199000 - [GTK] Fix compilation errors for the GTK2 plugin process
Summary: [GTK] Fix compilation errors for the GTK2 plugin process
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-19 07:47 PDT by Adrian Perez
Modified: 2019-06-19 10:42 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.75 KB, patch)
2019-06-19 07:54 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff
Patch v2 (2.26 KB, patch)
2019-06-19 10:17 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2019-06-19 07:47:04 PDT
Build error:

../Source/WebKit/Shared/gtk/WebEventFactory.cpp:104:30: error: assigning to 'guint' (aka 'unsigned int') from incompatible type 'const GdkEventButton' (aka 'const _GdkEventButton')                                                                                             
        eventButton = event->button;
                      ~~~~~~~^~~~~~
../Source/WebKit/Shared/gtk/WebEventFactory.cpp:158:26: error: assigning to 'guint' (aka 'unsigned int') from incompatible type 'const GdkEventButton' (aka 'const _GdkEventButton')                                                                                             
    eventButton = event->button;
                  ~~~~~~~^~~~~~
../Source/WebKit/Shared/gtk/WebEventFactory.cpp:287:21: error: no member named 'keyval' in '_GdkEvent'
    keyval = event->keyval;
             ~~~~~  ^
../Source/WebKit/Shared/gtk/WebEventFactory.cpp:288:22: error: no member named 'hardware_keycode' in '_GdkEvent'
    keycode = event->hardware_keycode;
              ~~~~~  ^
4 errors generated.
Comment 1 Adrian Perez 2019-06-19 07:54:00 PDT
Created attachment 372462 [details]
Patch
Comment 2 Michael Catanzaro 2019-06-19 08:53:17 PDT
Comment on attachment 372462 [details]
Patch

This is a bit weird though, because we are about to delete the plugin process so no more GTK 2, and our minimum GTK version is already 3.6. So it'd be nice to not remove the GTK_API_VERSION_2 guards since that makes it obvious that the code is there to support the plugin process.

I think it's important to investigate what's actually gone wrong here. Clearly something else is up, because #ifndef GTK_API_VERSION_2 and #if GTK_CHECK_VERSION(3, 2, 0) should be equivalent when we know GTK version is either 2 or 3 >= 3.6.
Comment 3 Adrian Perez 2019-06-19 09:00:36 PDT
(In reply to Michael Catanzaro from comment #2)
> Comment on attachment 372462 [details]
> Patch
> 
> This is a bit weird though, because we are about to delete the plugin
> process so no more GTK 2, and our minimum GTK version is already 3.6. So
> it'd be nice to not remove the GTK_API_VERSION_2 guards since that makes it
> obvious that the code is there to support the plugin process.
> 
> I think it's important to investigate what's actually gone wrong here.
> Clearly something else is up, because #ifndef GTK_API_VERSION_2 and #if
> GTK_CHECK_VERSION(3, 2, 0) should be equivalent when we know GTK version is
> either 2 or 3 >= 3.6.

What fixes the issue is the changes in the code, not the difference in
the preprocessor guards themselves. I can re-submit the same fix with
old guards, if you would prefer that :-)
Comment 4 Michael Catanzaro 2019-06-19 09:13:24 PDT
Comment on attachment 372462 [details]
Patch

Oh oops, I even missed that. Yes please.
Comment 5 Adrian Perez 2019-06-19 10:17:26 PDT
Created attachment 372471 [details]
Patch v2
Comment 6 WebKit Commit Bot 2019-06-19 10:42:57 PDT
Comment on attachment 372471 [details]
Patch v2

Clearing flags on attachment: 372471

Committed r246597: <https://trac.webkit.org/changeset/246597>
Comment 7 WebKit Commit Bot 2019-06-19 10:42:59 PDT
All reviewed patches have been landed.  Closing bug.