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 790680 - Start using WebKit's new font size functionality
Start using WebKit's new font size functionality
Status: RESOLVED FIXED
Product: devhelp
Classification: Applications
Component: General
git master
Other Linux
: Normal enhancement
: ---
Assigned To: devhelp-maint
devhelp-maint
Depends on:
Blocks:
 
 
Reported: 2017-11-21 21:25 UTC by Gabriel Ivașcu
Modified: 2017-12-14 10:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
WebKit automatically updates font size on DPI change now (9.13 KB, patch)
2017-11-21 21:26 UTC, Gabriel Ivașcu
none Details | Review
WebKit automatically updates font size on DPI change now (5.67 KB, patch)
2017-11-22 20:36 UTC, Gabriel Ivașcu
none Details | Review
WebKit automatically updates font size on DPI change now (9.13 KB, patch)
2017-11-22 20:38 UTC, Gabriel Ivașcu
reviewed Details | Review

Description Gabriel Ivașcu 2017-11-21 21:25:39 UTC
WebKitGTK+ 2.19.2 introduces functions to convert font size between points and pixels; moreover, the font size is updated automatically by WebKit when GtkSettings:gtk-xft-dpi changes.

https://webkitgtk.org/releases/webkitgtk-2.19.2.tar.xz.news
Comment 1 Gabriel Ivașcu 2017-11-21 21:26:52 UTC
Created attachment 364145 [details] [review]
WebKit automatically updates font size on DPI change now

This was introduced in WebKitGTK+ 2.19.2.
Comment 2 Gabriel Ivașcu 2017-11-22 20:36:17 UTC
Created attachment 364228 [details] [review]
WebKit automatically updates font size on DPI change now

This was introduced in WebKitGTK+ 2.19.2.
Comment 3 Gabriel Ivașcu 2017-11-22 20:38:49 UTC
Created attachment 364230 [details] [review]
WebKit automatically updates font size on DPI change now

This was introduced in WebKitGTK+ 2.19.2.
Comment 4 Sébastien Wilmet 2017-11-23 10:28:16 UTC
Review of attachment 364230 [details] [review]:

Thanks for the patch! It's great to delete all this code, especially since gdk_screen_get_width() etc are deprecated.

I'm building WebKitGTK+ 2.19.2, I'll test the patch when it's finished.
Comment 5 Sébastien Wilmet 2017-11-23 14:45:46 UTC
And four hours later… jhbuild problem, don't know how to pass -j1 to ninja when building WebKit:
https://bugzilla.gnome.org/show_bug.cgi?id=778784#c11
Comment 6 Sébastien Wilmet 2017-11-23 17:21:00 UTC
One question: does the old code in Devhelp work fine with WebKitGTK+ 2.19.2? Or is there an API break?

Because when WebKitGTK+ 2.20 will be released, for example on Fedora 27 the WebKitGTK+ package will probably be upgraded but Devhelp will stay at 3.26 (so the old Devhelp code against the new WebKitGTK+). Will that cause a problem?
Comment 7 Gabriel Ivașcu 2017-11-23 17:38:18 UTC
There shouldn't be any problem. Basically WebKit adds its own handler to gtk-xft-dpi::notify and does the same pixel calculations. The point was to do this in WebKit so we don't have that many code duplicated in apps (Devhelp, Epiphany, Yelp). So if you use Devhelp 3.26 with WebKitGTK+ 2.20, you'd have two handlers for the same signal that do the same thing. The result would be the same.
Comment 8 Sébastien Wilmet 2017-11-23 17:47:08 UTC
OK great.
Comment 9 Sébastien Wilmet 2017-11-24 07:26:39 UTC
I've run the WebKit build during all night, but it failed:

-----
In file included from DerivedSources/WebCore/unified-sources/UnifiedSource366.cpp:1:0:
Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp:37:10: fatal error: WebCore/GUniquePtrSoup.h: No such file or directory
 #include <WebCore/GUniquePtrSoup.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
-----

I don't want to investigate this, I've already lost too much time trying to build WebKit, I prefer to wait that Fedora provides a package for WebKitGTK+ 2.20, so the patch will need to wait, sorry.
Comment 10 Sébastien Wilmet 2017-11-24 11:52:40 UTC
I've pushed this branch:
https://git.gnome.org/browse/devhelp/log/?h=wip/webkit-font-size

with a separate commit to modify the configure.ac, because it is planned to port the build system to Meson, see bug #783819.
Comment 11 Michael Catanzaro 2017-11-27 21:22:48 UTC
(In reply to Sébastien Wilmet from comment #9)
> I've run the WebKit build during all night, but it failed:
> 
> -----
> In file included from
> DerivedSources/WebCore/unified-sources/UnifiedSource366.cpp:1:0:
> Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp:37:10:
> fatal error: WebCore/GUniquePtrSoup.h: No such file or directory
>  #include <WebCore/GUniquePtrSoup.h>
>           ^~~~~~~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> -----
> 
> I don't want to investigate this, I've already lost too much time trying to
> build WebKit, I prefer to wait that Fedora provides a package for WebKitGTK+
> 2.20, so the patch will need to wait, sorry.

Oops. Fixed in https://trac.webkit.org/changeset/225192/webkit.
Comment 12 Sébastien Wilmet 2017-12-14 10:02:12 UTC
WebKitGTK+ 2.19.3 now compiles fine for me, so I've merged the commit.

commit 25cd3af113d1b450ed8415c47cefc2ef7a50bca0

Thanks!