[Webkit-unassigned] [Bug 142673] [GTK] Automatically adjust font size when gtk-xft-dpi changes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 13 05:40:10 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=142673

Michael Catanzaro <mcatanzaro at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #326755|review?, commit-queue?      |review+, commit-queue-
              Flags|                            |

--- Comment #51 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 326755
  --> https://bugs.webkit.org/attachment.cgi?id=326755
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=326755&action=review

Good!

> Source/WebCore/platform/gtk/PlatformScreenGtk.cpp:43
> +#include <wtf/Optional.h>
>  
>  #include <cmath>
>  #include <gtk/gtk.h>

This header should go down below with the other <> includes; it's treated as a "system" header even though it's really part of WebKit, because it's not in the WebCore subproject.

> Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp:180
> +        double newScreenDpi = WebCore::screenDPI();
> +
> +        if (newScreenDpi == settings->priv->screenDpi)

Style nit: I'd use auto here, and remove the blank line.

> Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp:185
> +        double scalingFactor = newScreenDpi / settings->priv->screenDpi;
> +        uint32_t prevFontSize = settings->priv->preferences->defaultFontSize();
> +        uint32_t prevMonospaceFontSize = settings->priv->preferences->defaultFixedFontSize();

Probably best to use auto for all of these declarations, instead of writing out the type and hoping it never changes.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171113/632d5a40/attachment.html>


More information about the webkit-unassigned mailing list