GNOME Bugzilla – Bug 790680
Start using WebKit's new font size functionality
Last modified: 2017-12-14 10:02:12 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
Created attachment 364145 [details] [review] WebKit automatically updates font size on DPI change now This was introduced in WebKitGTK+ 2.19.2.
Created attachment 364228 [details] [review] WebKit automatically updates font size on DPI change now This was introduced in WebKitGTK+ 2.19.2.
Created attachment 364230 [details] [review] WebKit automatically updates font size on DPI change now This was introduced in WebKitGTK+ 2.19.2.
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.
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
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?
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.
OK great.
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.
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.
(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.
WebKitGTK+ 2.19.3 now compiles fine for me, so I've merged the commit. commit 25cd3af113d1b450ed8415c47cefc2ef7a50bca0 Thanks!