Bug 22207 - [Gtk] Font sizes are not handled properly when updated at runtime
Summary: [Gtk] Font sizes are not handled properly when updated at runtime
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Christian Dywan
URL: http://www.twotoasts.de/bugs/index.ph...
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2008-11-12 10:29 PST by Christian Dywan
Modified: 2008-11-16 06:12 PST (History)
2 users (show)

See Also:


Attachments
Update fonts properly (3.87 KB, patch)
2008-11-12 15:24 PST, Christian Dywan
zecke: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Dywan 2008-11-12 10:29:31 PST
The appropriate font handling code in WebKitWebView is only used in the initial display of the web view (screen-changed). The notification callback simply passes the values of the font size properties to WebCore, whithout taking the Pango factor and DPI into account.

In the end this means that the font size is wrong as soon as the user attempts to change it at runtime, such as in a Preference dialog.
Comment 1 Christian Dywan 2008-11-12 15:24:44 PST
Created attachment 25105 [details]
Update fonts properly

This change moves the DPI/ conversion into a helper function and applies the logic in the notification callback. From a bit of testing in Midori it seems to work properly now.
Comment 2 Holger Freyther 2008-11-15 17:12:11 PST
Comment on attachment 25105 [details]
Update fonts properly

Okay, this mostly moving things around and using the new webViewGetDPI API.
Comment 3 Christian Dywan 2008-11-16 06:12:44 PST
2008-11-16  Christian Dywan  <christian@twoasts.de>

        Reviewed by Holger Freyther.

        https://bugs.webkit.org/show_bug.cgi?id=22207
        [Gtk] Font sizes are not handled properly when updated at runtime

        * webkit/webkitwebview.cpp: Move the DPI/ conversion into a
        helper function and apply the logic in the notification callback.