After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773550 - Do not use unstable WebKit DOM API
Do not use unstable WebKit DOM API
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
3.23.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2016-10-26 18:03 UTC by Michael Catanzaro
Modified: 2017-07-12 15:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Catanzaro 2016-10-26 18:03:29 UTC
The unstable DOM API has been removed from WebKitGTK+ 2.15.1. All the functions needed by Evolution should have been moved to the stable API prior to this removal. I believe the unstable headers included by Evolution will be removed for 2.16, so now would be a good time to stop using them. It should be trivial, but I wasn't able to build evolution-data-server due to bug #773549 so I don't have a patch. But see this example commit:

https://git.gnome.org/browse/epiphany/commit/?id=b9f0578c7f82c801c0a46b7c6ff248b232fe7937
Comment 1 Carlos Garcia Campos 2016-10-27 15:22:49 UTC
The unstable headers used by evolution will not be removed, we will keep them for backwards compatibility until we bump the ABI version. In any case, if you bump the WebKitGTK+ required version you can of course remove the includes.
Comment 2 Milan Crha 2016-12-07 21:24:07 UTC
I'm not sure how we are on this at the moment. Maybe Tom will have any insight, or I can compile any more recent development release of the WebKitGTK+ to give it a try.

If I got it right, then it's all about
   #define WEBKIT_DOM_USE_UNSTABLE_API
and all those headers which has a suffix "Unstable.h" and the right fix is to not use the define, nether those include files and everything should just work, with no function rename. Am I right or completely wrong?

As of git master of the evolution at commit e61ece11cad495fdf7:
$ git grep -c WEBKIT_DOM_USE_UNSTABLE_API
src/modules/itip-formatter/web-extension/module-itip-formatter-dom-utils.c:1
src/modules/webkit-editor/web-extension/e-composer-dom-functions.c:2
src/modules/webkit-editor/web-extension/e-dialogs-dom-functions.c:2
src/modules/webkit-editor/web-extension/e-editor-dom-functions.c:2
src/modules/webkit-editor/web-extension/e-editor-undo-redo-manager.c:2
src/modules/webkit-editor/web-extension/e-editor-web-extension.c:2
src/web-extensions/e-dom-utils.c:1
src/web-extensions/e-web-extension.c:1
Comment 3 Michael Catanzaro 2016-12-07 21:51:12 UTC
(In reply to Milan Crha from comment #2)
> I'm not sure how we are on this at the moment. Maybe Tom will have any
> insight, or I can compile any more recent development release of the
> WebKitGTK+ to give it a try.
> 
> If I got it right, then it's all about
>    #define WEBKIT_DOM_USE_UNSTABLE_API
> and all those headers which has a suffix "Unstable.h" and the right fix is
> to not use the define, nether those include files and everything should just
> work, with no function rename. Am I right or completely wrong?

Right.

You might also need to #include <webkitdom/webkitdom.h> in places it's missing.
Comment 4 Michael Catanzaro 2016-12-07 21:54:23 UTC
Just landed this example in Ephy (thanks for the reminder!):

https://git.gnome.org/browse/epiphany/commit/?id=22912b6cabe99b20e3f4e59c6bdacaccb1e890a6
Comment 5 Tomas Popela 2016-12-08 09:42:36 UTC
(In reply to Carlos Garcia Campos from comment #1)
> The unstable headers used by evolution will not be removed, we will keep
> them for backwards compatibility until we bump the ABI version. In any case,
> if you bump the WebKitGTK+ required version you can of course remove the
> includes.

Let's do this as Carlos suggests - when we will bump the WebKitGTK+ required version.
Comment 6 Milan Crha 2016-12-08 16:22:27 UTC
I just gave it a try, to see whether anything is missing, and with the
webkitgtk-2.15.2 release the build succeeded without any issue, while the change itself looks very similar to the one in epiphany (comment #4). If you are not going to change anything in the API, then we can be safe to bump the dependency and remove the headers and the define usage in the evolution code any time.
Comment 7 Milan Crha 2017-07-12 15:45:21 UTC
With a webkit2gtk version bump to 2.16.0:

Created commit 1f7e053 in evo master (3.25.4+)