Bug 12876 - Gdk improvements
Summary: Gdk improvements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-23 23:21 PST by Krzysztof Kowalczyk
Modified: 2007-02-24 00:57 PST (History)
0 users

See Also:


Attachments
Gdk improvements (15.65 KB, patch)
2007-02-23 23:23 PST, Krzysztof Kowalczyk
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Kowalczyk 2007-02-23 23:21:08 PST
Gdk improvements.
Comment 1 Krzysztof Kowalczyk 2007-02-23 23:23:28 PST
Created attachment 13357 [details]
Gdk improvements

* fix a crash caused by freeing memory we don't own
* only scroll on keydown, not both keydown and keyup
* improve gdklauncher by adding text field for entering url
Comment 2 Adam Roben (:aroben) 2007-02-24 00:26:43 PST
Comment on attachment 13357 [details]
Gdk improvements

+                StringImpl *txt = new StringImpl("Welcome to Gdk Web Browser");

   I know this is commented out, but you can just allocate this on the stack.

 #include "PlatformString.h"
 
+#include "ResourceHandleManager.h"

   No need for the newline between these two.

+    if (!str || !*str)
+        return true;
+    return false;

   This can just be:

return !str || !*str;

     if (0 == strcmp(str1, str2))
-        return 1;
-    return 0;
+        return true;
+    return false;

   Similar comment here.

+    GtkWidget *topLevelWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);

   You've got a misplaced * here.

+    gFrame = new FrameGdk(page, 0, frameLoaderClient);

   This can also be on the stack.

   r=me
Comment 3 Krzysztof Kowalczyk 2007-02-24 00:57:43 PST
landed in r19839, including changes to address review comments (except not creating gFrame on the stack because it has to be referred to from other parts of the code so needs to be a global variable).