Opened 4 years ago
Closed 4 years ago
#17650 closed enhancement (fixed)
Add support for WebKit2GTK+ API in wxWebViewWebKit
Reported by: | swt2c | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 3.0.4 |
Component: | wxGTK | Version: | dev-latest |
Keywords: | Cc: | ojwb | |
Blocked By: | Blocking: | ||
Patch: | no |
Description
The older WebKitGTK+ libraries are apparently no longer receiving security updates, and Fedora, for example, is looking to remove them. It would be good if wxWidgets could have support for the newer WebKit2GTK+ APIs.
I am willing to work on a patch to add this support, but I would like to ask for advice before I start - would it be better to add this support with #ifdefs in the existing webview_webkit.cpp, or would it be better to just create a new file with the WebKit2GTK+ implementation?
Attachments (1)
Change History (16)
comment:1 Changed 4 years ago by vadz
- Status changed from new to confirmed
comment:2 Changed 4 years ago by steve_lamerton
- Type changed from defect to enhancement
- Version changed from 3.0.2 to dev-latest
I would prefer a new file for the WebKit2GTK+ implementation as from what I remember from looking at this some time ago the changes needed will be fairly significant.
It is possible that the WebKit2 move to more asynchronous apis will mean that it doesn't fit the wxWebView api particularly well. If that is the case it will need some additional discussion.
comment:3 Changed 4 years ago by swt2c
I attached a logfile of a compile where I've changed webkit.h to webkit2.h to give you a rough idea of how much will need to be changed. It does seem like quite a bit so perhaps a separate file will be better.
Steve, I saw your mailing list post earlier today about this. Let me know if you have found any existing work on this, or if you plan to work on it.
comment:4 Changed 4 years ago by vadz
If Steve is right and the API semantics has changed, we definitely need a new file, trying to shoehorn both sync and async implementation in a single one is not going to end well.
comment:5 Changed 4 years ago by steve_lamerton
You can find the start I made here, from what I remember it compiled and ran, although much of the more advanced behaviour was missing.
Feel free to use any bits that might be useful and let me know if you want a hand working on it.
comment:6 Changed 4 years ago by ojwb
- Cc ojwb added
Debian are also aiming to remove libwebkitgtk-1.0-0: https://bugs.debian.org/790222
It'd be great to see this done.
comment:7 Changed 4 years ago by vadz
- Keywords gsoc added
For future references: https://wiki.gnome.org/Projects/WebKitGtk/ProgrammingGuide and notably its section with the examples of porting from WebKit1 to WebKit2 should be useful.
Tagging this with "gsoc" as it could be a potential candidate project for one, if we ever participate again.
comment:8 Changed 4 years ago by steve_lamerton
Have you managed to start work on this yet? If not I'll try and re-animate my old version over the weekend and make a start on this.
comment:9 Changed 4 years ago by swt2c
Yes, I've made some good progress on this. I'm working on the 'Find' implementation now. There are a few other things to fix/deal with after that.
comment:10 Changed 4 years ago by steve_lamerton
Sounds great, thanks again for working on this!
comment:11 Changed 4 years ago by swt2c
- Keywords gsoc removed
At long last, I've finally got this to a point where it is ready for review.
Comments/review appreciated:
https://github.com/wxWidgets/wxWidgets/pull/439
comment:12 Changed 4 years ago by swt2c
Backport for 3.0:
https://github.com/wxWidgets/wxWidgets/pull/469
It would be great if this could make 3.0.3, but I can understand if you'd prefer to hold it off for 3.0.4.
comment:13 Changed 4 years ago by vadz
- Milestone set to 3.0.4
comment:14 follow-up: ↓ 15 Changed 4 years ago by pcor
Monolithic and non-shared builds are now broken when using WebKit2GTK+
src/gtk/webview_webkit2.cpp:413:53: error: ‘WX_WEB_EXTENSIONS_DIRECTORY’ was not declared in this scope
comment:15 in reply to: ↑ 14 Changed 4 years ago by swt2c
- Resolution set to fixed
- Status changed from confirmed to closed
Replying to pcor:
Monolithic and non-shared builds are now broken when using WebKit2GTK+
src/gtk/webview_webkit2.cpp:413:53: error: ‘WX_WEB_EXTENSIONS_DIRECTORY’ was not declared in this scope
Fixed.
Closing this ticket as WebKit2GTK+ support has been implemented in master and WX_3_0_BRANCH.
Thanks for the offer, it's much appreciated!
The answer to your question depends on how different is the new API from the old one. I couldn't find this information quickly, could you please answer this if you already know? TIA!