2006-03-08 Eric Seidel <eseidel@apple.com>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Mar 2006 09:52:26 +0000 (09:52 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Mar 2006 09:52:26 +0000 (09:52 +0000)
        Reviewed by mjs.

        Focus URL bar on Spinneret launch, remove border from WebView.
        Stop WebFrame from deleting the job (prevent crash).

        * Spinneret/Spinneret/Spinneret.cpp:
        (_tWinMain):
        * Spinneret/Spinneret/WebFrame.cpp:
        (WebKit::WebFrame::receivedAllData):
        (WebKit::WebFrame::paint):
        * Spinneret/Spinneret/WebView.cpp:
        (WebKit::WebView::createWebView):

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

WebKitTools/ChangeLog
WebKitTools/Spinneret/Spinneret/Spinneret.cpp
WebKitTools/Spinneret/Spinneret/WebFrame.cpp
WebKitTools/Spinneret/Spinneret/WebView.cpp

index 3412f48e7a40349088e6b145bdec26a766906f1a..890fe418e43f6f7dabac1d513383754d2a69244d 100644 (file)
@@ -1,3 +1,18 @@
+2006-03-08  Eric Seidel  <eseidel@apple.com>
+
+        Reviewed by mjs.
+
+        Focus URL bar on Spinneret launch, remove border from WebView.
+        Stop WebFrame from deleting the job (prevent crash).
+
+        * Spinneret/Spinneret/Spinneret.cpp:
+        (_tWinMain):
+        * Spinneret/Spinneret/WebFrame.cpp:
+        (WebKit::WebFrame::receivedAllData):
+        (WebKit::WebFrame::paint):
+        * Spinneret/Spinneret/WebView.cpp:
+        (WebKit::WebView::createWebView):
+
 2006-03-09  Alexey Proskuryakov  <ap@nypop.com>
 
         Reviewed by Darin.
index 0f5f1db3f88e729ad5c4877b1e816d1febcb145e..0d622d0b56467bae49abd5508b8c571a9d15bd96 100755 (executable)
@@ -87,7 +87,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
         return FALSE;
 
     hURLBarWnd = CreateWindow(L"EDIT", 0,
-                        WS_CHILD | WS_VISIBLE  | ES_LEFT | ES_AUTOVSCROLL, 
+                        WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT | ES_AUTOVSCROLL, 
                         0, 0, 0, 0,
                         hMainWnd,
                         0,
@@ -95,6 +95,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
 
     DefEditProc = GetWindowLong(hURLBarWnd, GWL_WNDPROC);
     SetWindowLong(hURLBarWnd, GWL_WNDPROC,(long)MyEditProc);
+    SetFocus(hURLBarWnd);
 
     gWebView = WebView::createWebView(hInstance, hMainWnd);
     resizeSubViews();
index f568066be828eb7b675a94de7d2cfccb08ac44ce..fe9a3aa3c7117354c2275ea241ccb6e5eeaaff94 100755 (executable)
@@ -117,7 +117,6 @@ void WebFrame::receivedData(WebCore::TransferJob*, const char* data, int length)
 void WebFrame::receivedAllData(WebCore::TransferJob* job, WebCore::PlatformData)
 {
     d->frame->end();
-    delete job;
 }
 
 void WebFrame::paint()
@@ -125,7 +124,7 @@ void WebFrame::paint()
     d->frameView->layout();
 
     PAINTSTRUCT ps;
-    HDC hdc = BeginPaint(d->webView->windowHandle(), &ps);   
+    HDC hdc = BeginPaint(d->webView->windowHandle(), &ps);
     cairo_surface_t* finalSurface = cairo_win32_surface_create(hdc);
     cairo_surface_t* surface = cairo_surface_create_similar(finalSurface,
                                                             CAIRO_CONTENT_COLOR_ALPHA,
index 68ad9fa50884baf5db6a4a100b3128cbc37c9d07..39711cf3b2ea1560b29d46057e0f947aaee2bfd9 100755 (executable)
@@ -82,17 +82,20 @@ static ATOM registerWebViewWithInstance(HINSTANCE hInstance)
 // FIXME: This should eventually just use the DLL instance, I think.
 WebView* WebView::createWebView(HINSTANCE hInstance, HWND parent)
 {
-   registerWebViewWithInstance(hInstance);
+    // Save away our instace handle for WebCore to use.
+    Widget::instanceHandle = hInstance;
 
-   HWND hWnd = CreateWindow(kWebViewWindowClassName, 0, WS_CHILD | WS_BORDER,
+    registerWebViewWithInstance(hInstance);
+
+    HWND hWnd = CreateWindow(kWebViewWindowClassName, 0, WS_CHILD,
        CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, parent, 0, hInstance, 0);
-   
-   if (!hWnd)
-      return 0;
 
-   WebView* newWebView = new WebView(hWnd);
-   SetWindowLongPtr(hWnd, 0, (LONG)newWebView);
-   return newWebView;
+    if (!hWnd)
+        return 0;
+
+    WebView* newWebView = new WebView(hWnd);
+    SetWindowLongPtr(hWnd, 0, (LONG)newWebView);
+    return newWebView;
 }
 
 WebView::WebView(HWND hWnd)