Am Wed, 13 Feb 2008 16:06:50 +0530
schrieb "Sriram Neelakandan" <[EMAIL PROTECTED]>:

> Alp
> 
> for some reason DPI reported by     gdk_screen_get_resolution(screen);
> in webkitwebview.cpp is incorrect !!
> It returns a -1 !! so i fixed the DPI to 96 when its -1
> 
> so probably we need this change !!
> 
> *************** static void webkit_web_view_screen_chang
> *** 1097,1102 ****
> --- 1097,1103 ----
>   #if GTK_CHECK_VERSION(2, 10, 0)
>       GdkScreen* screen = gtk_widget_has_screen(GTK_WIDGET(webView)) ?
> gtk_widget_get_screen(GTK_WIDGET(webView)) : gdk_screen_get_default();
>       gdouble DPI = gdk_screen_get_resolution(screen);
> +     if (DPI == -1) DPI = 96;
>   #else
>       gdouble DPI = 96;
>       g_warning("Cannot retrieve resolution, falling back to 96 DPI");
> 

While that might fix the problem, hardcoding arbitrary values is not
exactly advisable.

It should be interesting to figure out what causes this function to fail
in the first place.

Regards,
    Christian
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to