[webkit-reviews] review granted: [Bug 80032] [GTK] Move the code to get the screen DPI to WebCore : [Attachment 129715] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 1 09:57:10 PST 2012


Martin Robinson <mrobinson at webkit.org> has granted Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 80032: [GTK] Move the code to get the screen DPI to WebCore
https://bugs.webkit.org/show_bug.cgi?id=80032

Attachment 129715: Patch
https://bugs.webkit.org/attachment.cgi?id=129715&action=review

------- Additional Comments from Martin Robinson <mrobinson at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=129715&action=review


> Source/WebCore/platform/gtk/GtkUtilities.cpp:65
> +    static const double kMillimetresPerInch = 25.4;
> +    double diagonalSizeInPixels = hypot(gdk_screen_get_width(screen),
gdk_screen_get_height(screen));
> +    double diagonalSizeInInches = hypot(gdk_screen_get_width_mm(screen),
gdk_screen_get_height_mm(screen)) / kMillimetresPerInch;
> +    return diagonalSizeInPixels / diagonalSizeInInches;

I like the way you're falling back here.


More information about the webkit-reviews mailing list