[webkit-reviews] review granted: [Bug 142673] [GTK] Automatically adjust font size when gtk-xft-dpi changes : [Attachment 326755] Patch

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


Michael Catanzaro <mcatanzaro at igalia.com> has granted Gabriel Ivașcu
<givascu at igalia.com>'s request for review:
Bug 142673: [GTK] Automatically adjust font size when gtk-xft-dpi changes
https://bugs.webkit.org/show_bug.cgi?id=142673

Attachment 326755: Patch

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




--- 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.


More information about the webkit-reviews mailing list