2008-02-05 Mark Rowe <mrowe@apple.com>
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Feb 2008 01:24:10 +0000 (01:24 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Feb 2008 01:24:10 +0000 (01:24 +0000)
        Reviewed by Alp Toker.

        Fix warnings seen on the Gtk port by declaring variables and using constants of the correct types.

        * webkit/webkitwebbackforwardlist.cpp:
        (_WebKitWebBackForwardListPrivate::webkit_web_back_forward_list_contains_item):
        * webkit/webkitwebhistoryitem.cpp:
        * webkit/webkitwebview.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30031 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/gtk/ChangeLog
WebKit/gtk/webkit/webkitwebbackforwardlist.cpp
WebKit/gtk/webkit/webkitwebhistoryitem.cpp
WebKit/gtk/webkit/webkitwebview.cpp

index 1a2549ae5ef573c42eb965621a3f033ccab82077..42f717d082ab900ab50dd241d6008e424b3fcff4 100644 (file)
@@ -1,3 +1,14 @@
+2008-02-05  Mark Rowe  <mrowe@apple.com>
+
+        Reviewed by Alp Toker.
+
+        Fix warnings seen on the Gtk port by declaring variables and using constants of the correct types.
+
+        * webkit/webkitwebbackforwardlist.cpp:
+        (_WebKitWebBackForwardListPrivate::webkit_web_back_forward_list_contains_item):
+        * webkit/webkitwebhistoryitem.cpp:
+        * webkit/webkitwebview.cpp:
+
 2008-02-04  Christian Dywan  <christian@imendio.com>
 
         Reviewed by Alp Toker.
index a6d42517f69198d06dcce3f4e78b6114b4a7f005..c409557450e1ead98cd034c4cd74ca6ec94bf62c 100644 (file)
@@ -115,8 +115,8 @@ void webkit_web_back_forward_list_go_back(WebKitWebBackForwardList* webBackForwa
  */
 gboolean webkit_web_back_forward_list_contains_item(WebKitWebBackForwardList* webBackForwardList, WebKitWebHistoryItem* webHistoryItem)
 {
-    g_return_val_if_fail(WEBKIT_IS_WEB_BACK_FORWARD_LIST(webBackForwardList), NULL);
-    g_return_val_if_fail(WEBKIT_IS_WEB_HISTORY_ITEM(webHistoryItem), NULL);
+    g_return_val_if_fail(WEBKIT_IS_WEB_BACK_FORWARD_LIST(webBackForwardList), FALSE);
+    g_return_val_if_fail(WEBKIT_IS_WEB_HISTORY_ITEM(webHistoryItem), FALSE);
 
     WebCore::HistoryItem* historyItem = core(webHistoryItem);
 
@@ -304,7 +304,7 @@ WebKitWebHistoryItem* webkit_web_back_forward_list_get_nth_item(WebKitWebBackFor
  */
 gint webkit_web_back_forward_list_get_back_length(WebKitWebBackForwardList* webBackForwardList)
 {
-    g_return_val_if_fail(WEBKIT_IS_WEB_BACK_FORWARD_LIST(webBackForwardList), NULL);
+    g_return_val_if_fail(WEBKIT_IS_WEB_BACK_FORWARD_LIST(webBackForwardList), 0);
 
     WebCore::BackForwardList* backForwardList = core(webBackForwardList);
     if (!backForwardList || !backForwardList->enabled())
@@ -323,7 +323,7 @@ gint webkit_web_back_forward_list_get_back_length(WebKitWebBackForwardList* webB
  */
 gint webkit_web_back_forward_list_get_forward_length(WebKitWebBackForwardList* webBackForwardList)
 {
-    g_return_val_if_fail(WEBKIT_IS_WEB_BACK_FORWARD_LIST(webBackForwardList), NULL);
+    g_return_val_if_fail(WEBKIT_IS_WEB_BACK_FORWARD_LIST(webBackForwardList), 0);
 
     WebCore::BackForwardList* backForwardList = core(webBackForwardList);
     if (!backForwardList || !backForwardList->enabled())
@@ -342,7 +342,7 @@ gint webkit_web_back_forward_list_get_forward_length(WebKitWebBackForwardList* w
  */
 gint webkit_web_back_forward_list_get_limit(WebKitWebBackForwardList* webBackForwardList)
 {
-    g_return_val_if_fail(WEBKIT_IS_WEB_BACK_FORWARD_LIST(webBackForwardList), NULL);
+    g_return_val_if_fail(WEBKIT_IS_WEB_BACK_FORWARD_LIST(webBackForwardList), 0);
 
     WebCore::BackForwardList* backForwardList = core(webBackForwardList);
     if (!backForwardList || !backForwardList->enabled())
index d0c43d7a093366415e68efb518da85b47d08310d..5fbf8c1a1564d6143bf8b2605774523f28edbefa 100644 (file)
@@ -296,7 +296,7 @@ const gchar* webkit_web_history_item_get_original_uri(WebKitWebHistoryItem* webH
  */
 gdouble webkit_web_history_item_get_last_visited_time(WebKitWebHistoryItem* webHistoryItem)
 {
-    g_return_val_if_fail(WEBKIT_IS_WEB_HISTORY_ITEM(webHistoryItem), NULL);
+    g_return_val_if_fail(WEBKIT_IS_WEB_HISTORY_ITEM(webHistoryItem), 0);
 
     WebCore::HistoryItem* item = core(WEBKIT_WEB_HISTORY_ITEM(webHistoryItem));
 
index d2bfb34419fa5ecc99ed6b22b36045ca5be12345..d5834db7963abd23f871190a4151bcf8417c7c0b 100644 (file)
@@ -1096,9 +1096,9 @@ static void webkit_web_view_screen_changed(WebKitWebView* webView, GdkScreen* pr
 
 #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();
-    guint DPI = gdk_screen_get_resolution(screen);
+    gdouble DPI = gdk_screen_get_resolution(screen);
 #else
-    guint DPI = 96;
+    gdouble DPI = 96;
     g_warning("Cannot retrieve resolution, falling back to 96 DPI");
 #endif
     settings->setDefaultFontSize(defaultFontSize / 72.0 * DPI);