2006-03-01 Eric Seidel <eseidel@apple.com>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Mar 2006 02:43:15 +0000 (02:43 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Mar 2006 02:43:15 +0000 (02:43 +0000)
        Reviewed by hyatt.

        Add a stub win32 application to test WebCore drawing on windows.

        * Spinneret: Added.
        * Spinneret/Spinneret: Added.
        * Spinneret/Spinneret.sln: Added.
        * Spinneret/Spinneret/Resource.h: Added.
        * Spinneret/Spinneret/Spinneret.cpp: Added.
        (_tWinMain):
        (MyRegisterClass):
        (InitInstance):
        (WndProc):
        (About):
        * Spinneret/Spinneret/Spinneret.h: Added.
        * Spinneret/Spinneret/Spinneret.ico: Added.
        * Spinneret/Spinneret/Spinneret.rc: Added.
        * Spinneret/Spinneret/Spinneret.vcproj: Added.
        * Spinneret/Spinneret/WebView.cpp: Added.
        (WebKit::WebView::WebViewPrivate::WebViewPrivate):
        (WebKit::WebView::WebViewPrivate::~WebViewPrivate):
        (WebKit::registerWebViewWithInstance):
        (WebKit::WebView::createWebView):
        (WebKit::WebView::WebView):
        (WebKit::WebView::~WebView):
        (WebKit::WebView::drawRect):
        (WebKit::WebView::windowHandle):
        (WebKit::WndProc):
        * Spinneret/Spinneret/WebView.h: Added.
        * Spinneret/Spinneret/small.ico: Added.
        * Spinneret/Spinneret/stdafx.cpp: Added.
        * Spinneret/Spinneret/stdafx.h: Added.

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

13 files changed:
WebKitTools/ChangeLog
WebKitTools/Spinneret/Spinneret.sln [new file with mode: 0755]
WebKitTools/Spinneret/Spinneret/Resource.h [new file with mode: 0755]
WebKitTools/Spinneret/Spinneret/Spinneret.cpp [new file with mode: 0755]
WebKitTools/Spinneret/Spinneret/Spinneret.h [new file with mode: 0755]
WebKitTools/Spinneret/Spinneret/Spinneret.ico [new file with mode: 0755]
WebKitTools/Spinneret/Spinneret/Spinneret.rc [new file with mode: 0755]
WebKitTools/Spinneret/Spinneret/Spinneret.vcproj [new file with mode: 0755]
WebKitTools/Spinneret/Spinneret/WebView.cpp [new file with mode: 0755]
WebKitTools/Spinneret/Spinneret/WebView.h [new file with mode: 0755]
WebKitTools/Spinneret/Spinneret/small.ico [new file with mode: 0755]
WebKitTools/Spinneret/Spinneret/stdafx.cpp [new file with mode: 0755]
WebKitTools/Spinneret/Spinneret/stdafx.h [new file with mode: 0755]

index 8c81243f839364dae9a14fbce21a62170f7f43dd..b7adc3823cd05e9d1f0604ebcc878a5f7533c1a1 100644 (file)
@@ -1,3 +1,38 @@
+2006-03-01  Eric Seidel  <eseidel@apple.com>
+
+        Reviewed by hyatt.
+
+        Add a stub win32 application to test WebCore drawing on windows.
+
+        * Spinneret: Added.
+        * Spinneret/Spinneret: Added.
+        * Spinneret/Spinneret.sln: Added.
+        * Spinneret/Spinneret/Resource.h: Added.
+        * Spinneret/Spinneret/Spinneret.cpp: Added.
+        (_tWinMain):
+        (MyRegisterClass):
+        (InitInstance):
+        (WndProc):
+        (About):
+        * Spinneret/Spinneret/Spinneret.h: Added.
+        * Spinneret/Spinneret/Spinneret.ico: Added.
+        * Spinneret/Spinneret/Spinneret.rc: Added.
+        * Spinneret/Spinneret/Spinneret.vcproj: Added.
+        * Spinneret/Spinneret/WebView.cpp: Added.
+        (WebKit::WebView::WebViewPrivate::WebViewPrivate):
+        (WebKit::WebView::WebViewPrivate::~WebViewPrivate):
+        (WebKit::registerWebViewWithInstance):
+        (WebKit::WebView::createWebView):
+        (WebKit::WebView::WebView):
+        (WebKit::WebView::~WebView):
+        (WebKit::WebView::drawRect):
+        (WebKit::WebView::windowHandle):
+        (WebKit::WndProc):
+        * Spinneret/Spinneret/WebView.h: Added.
+        * Spinneret/Spinneret/small.ico: Added.
+        * Spinneret/Spinneret/stdafx.cpp: Added.
+        * Spinneret/Spinneret/stdafx.h: Added.
+
 2006-02-28  Eric Seidel  <eseidel@apple.com>
 
         Reviewed by mjs.
diff --git a/WebKitTools/Spinneret/Spinneret.sln b/WebKitTools/Spinneret/Spinneret.sln
new file mode 100755 (executable)
index 0000000..583e917
--- /dev/null
@@ -0,0 +1,20 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 9.00\r
+# Visual Studio 2005\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Spinneret", "Spinneret\Spinneret.vcproj", "{114FCA11-216B-4C8C-957E-30A75AE80443}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Win32 = Debug|Win32\r
+               Release|Win32 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.Build.0 = Debug|Win32\r
+               {114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.ActiveCfg = Release|Win32\r
+               {114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.Build.0 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/WebKitTools/Spinneret/Spinneret/Resource.h b/WebKitTools/Spinneret/Spinneret/Resource.h
new file mode 100755 (executable)
index 0000000..0c87edd
--- /dev/null
@@ -0,0 +1,31 @@
+//{{NO_DEPENDENCIES}}\r
+// Microsoft Visual C++ generated include file.\r
+// Used by Spinneret.rc\r
+//\r
+\r
+#define IDS_APP_TITLE            103\r
+\r
+#define IDR_MAINFRAME            128\r
+#define IDD_SPINNERET_DIALOG    102\r
+#define IDD_ABOUTBOX            103\r
+#define IDM_ABOUT                104\r
+#define IDM_EXIT                105\r
+#define IDI_SPINNERET            107\r
+#define IDI_SMALL                108\r
+#define IDC_SPINNERET            109\r
+#define IDC_MYICON                2\r
+#ifndef IDC_STATIC\r
+#define IDC_STATIC                -1\r
+#endif\r
+// Next default values for new objects\r
+// \r
+#ifdef APSTUDIO_INVOKED\r
+#ifndef APSTUDIO_READONLY_SYMBOLS\r
+\r
+#define _APS_NO_MFC                    130\r
+#define _APS_NEXT_RESOURCE_VALUE    129\r
+#define _APS_NEXT_COMMAND_VALUE        32771\r
+#define _APS_NEXT_CONTROL_VALUE        1000\r
+#define _APS_NEXT_SYMED_VALUE        110\r
+#endif\r
+#endif\r
diff --git a/WebKitTools/Spinneret/Spinneret/Spinneret.cpp b/WebKitTools/Spinneret/Spinneret/Spinneret.cpp
new file mode 100755 (executable)
index 0000000..a90045c
--- /dev/null
@@ -0,0 +1,229 @@
+/*\r
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY\r
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+ */\r
+\r
+#include "stdafx.h"\r
+#include "Spinneret.h"\r
+#include "WebView.h"\r
+\r
+#define MAX_LOADSTRING 100\r
+\r
+using namespace WebKit;\r
+\r
+// Global Variables:\r
+HINSTANCE hInst;                                // current instance\r
+HWND hMainWnd;\r
+WebView* gWebView = 0;\r
+TCHAR szTitle[MAX_LOADSTRING];                    // The title bar text\r
+TCHAR szWindowClass[MAX_LOADSTRING];            // the main window class name\r
+\r
+// Forward declarations of functions included in this code module:\r
+ATOM                MyRegisterClass(HINSTANCE hInstance);\r
+BOOL                InitInstance(HINSTANCE, int);\r
+LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);\r
+INT_PTR CALLBACK    About(HWND, UINT, WPARAM, LPARAM);\r
+\r
+int APIENTRY _tWinMain(HINSTANCE hInstance,\r
+                     HINSTANCE hPrevInstance,\r
+                     LPTSTR    lpCmdLine,\r
+                     int       nCmdShow)\r
+{\r
+    UNREFERENCED_PARAMETER(hPrevInstance);\r
+    UNREFERENCED_PARAMETER(lpCmdLine);\r
+\r
+     // TODO: Place code here.\r
+    MSG msg;\r
+    HACCEL hAccelTable;\r
+\r
+    // Initialize global strings\r
+    LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);\r
+    LoadString(hInstance, IDC_SPINNERET, szWindowClass, MAX_LOADSTRING);\r
+    MyRegisterClass(hInstance);\r
+\r
+    // Perform application initialization:\r
+    if (!InitInstance (hInstance, nCmdShow))\r
+        return FALSE;\r
+\r
+    gWebView = WebView::createWebView(hInstance, hMainWnd);\r
+    ShowWindow(gWebView->windowHandle(), nCmdShow);\r
+    UpdateWindow(gWebView->windowHandle());    \r
+\r
+    hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_SPINNERET));\r
+\r
+    // Main message loop:\r
+    while (GetMessage(&msg, NULL, 0, 0))\r
+    {\r
+        if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))\r
+        {\r
+            TranslateMessage(&msg);\r
+            DispatchMessage(&msg);\r
+        }\r
+    }\r
+\r
+    return (int) msg.wParam;\r
+}\r
+\r
+\r
+\r
+//\r
+//  FUNCTION: MyRegisterClass()\r
+//\r
+//  PURPOSE: Registers the window class.\r
+//\r
+//  COMMENTS:\r
+//\r
+//    This function and its usage are only necessary if you want this code\r
+//    to be compatible with Win32 systems prior to the 'RegisterClassEx'\r
+//    function that was added to Windows 95. It is important to call this function\r
+//    so that the application will get 'well formed' small icons associated\r
+//    with it.\r
+//\r
+ATOM MyRegisterClass(HINSTANCE hInstance)\r
+{\r
+    WNDCLASSEX wcex;\r
+\r
+    wcex.cbSize = sizeof(WNDCLASSEX);\r
+\r
+    wcex.style            = CS_HREDRAW | CS_VREDRAW;\r
+    wcex.lpfnWndProc    = WndProc;\r
+    wcex.cbClsExtra        = 0;\r
+    wcex.cbWndExtra        = 0;\r
+    wcex.hInstance        = hInstance;\r
+    wcex.hIcon            = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SPINNERET));\r
+    wcex.hCursor        = LoadCursor(NULL, IDC_ARROW);\r
+    wcex.hbrBackground    = (HBRUSH)(COLOR_WINDOW+1);\r
+    wcex.lpszMenuName    = MAKEINTRESOURCE(IDC_SPINNERET);\r
+    wcex.lpszClassName    = szWindowClass;\r
+    wcex.hIconSm        = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));\r
+\r
+    return RegisterClassEx(&wcex);\r
+}\r
+\r
+//\r
+//   FUNCTION: InitInstance(HINSTANCE, int)\r
+//\r
+//   PURPOSE: Saves instance handle and creates main window\r
+//\r
+//   COMMENTS:\r
+//\r
+//        In this function, we save the instance handle in a global variable and\r
+//        create and display the main program window.\r
+//\r
+BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)\r
+{\r
+   hInst = hInstance; // Store instance handle in our global variable\r
+\r
+   hMainWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,\r
+      CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);\r
+\r
+   if (!hMainWnd)\r
+      return FALSE;\r
+\r
+   ShowWindow(hMainWnd, nCmdShow);\r
+   UpdateWindow(hMainWnd);\r
+\r
+   return TRUE;\r
+}\r
+\r
+//\r
+//  FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM)\r
+//\r
+//  PURPOSE:  Processes messages for the main window.\r
+//\r
+//  WM_COMMAND    - process the application menu\r
+//  WM_PAINT    - Paint the main window\r
+//  WM_DESTROY    - post a quit message and return\r
+//\r
+//\r
+LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)\r
+{\r
+    int wmId, wmEvent;\r
+    PAINTSTRUCT ps;\r
+    HDC hdc;\r
+\r
+    switch (message)\r
+    {\r
+    case WM_COMMAND:\r
+        wmId    = LOWORD(wParam);\r
+        wmEvent = HIWORD(wParam);\r
+        // Parse the menu selections:\r
+        switch (wmId)\r
+        {\r
+        case IDM_ABOUT:\r
+            DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);\r
+            break;\r
+        case IDM_EXIT:\r
+            DestroyWindow(hWnd);\r
+            break;\r
+        default:\r
+            return DefWindowProc(hWnd, message, wParam, lParam);\r
+        }\r
+        break;\r
+    case WM_PAINT:\r
+        hdc = BeginPaint(hWnd, &ps);\r
+        // TODO: Add any drawing code here...\r
+        EndPaint(hWnd, &ps);\r
+        break;\r
+    case WM_DESTROY:\r
+        PostQuitMessage(0);\r
+        break;\r
+    case WM_SIZE:\r
+        if (!gWebView)\r
+            break;\r
+        // Get the dimensions of the main window's client \r
+        // area, and enumerate the child windows. Pass the \r
+        // dimensions to the child windows during enumeration. \r
+\r
+        RECT rcClient;\r
+        GetClientRect(hWnd, &rcClient); \r
+        MoveWindow(gWebView->windowHandle(), \r
+                   0, 0, rcClient.right, rcClient.bottom, \r
+                   TRUE);\r
+        ShowWindow(gWebView->windowHandle(), SW_SHOW); \r
+        break; \r
+    default:\r
+        return DefWindowProc(hWnd, message, wParam, lParam);\r
+    }\r
+    return 0;\r
+}\r
+\r
+// Message handler for about box.\r
+INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)\r
+{\r
+    UNREFERENCED_PARAMETER(lParam);\r
+    switch (message)\r
+    {\r
+    case WM_INITDIALOG:\r
+        return (INT_PTR)TRUE;\r
+\r
+    case WM_COMMAND:\r
+        if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)\r
+        {\r
+            EndDialog(hDlg, LOWORD(wParam));\r
+            return (INT_PTR)TRUE;\r
+        }\r
+        break;\r
+    }\r
+    return (INT_PTR)FALSE;\r
+}\r
diff --git a/WebKitTools/Spinneret/Spinneret/Spinneret.h b/WebKitTools/Spinneret/Spinneret/Spinneret.h
new file mode 100755 (executable)
index 0000000..37b8603
--- /dev/null
@@ -0,0 +1,28 @@
+/*\r
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY\r
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+ */\r
+\r
+#pragma once\r
+\r
+#include "resource.h"\r
diff --git a/WebKitTools/Spinneret/Spinneret/Spinneret.ico b/WebKitTools/Spinneret/Spinneret/Spinneret.ico
new file mode 100755 (executable)
index 0000000..d551aa3
Binary files /dev/null and b/WebKitTools/Spinneret/Spinneret/Spinneret.ico differ
diff --git a/WebKitTools/Spinneret/Spinneret/Spinneret.rc b/WebKitTools/Spinneret/Spinneret/Spinneret.rc
new file mode 100755 (executable)
index 0000000..faa8cc3
--- /dev/null
@@ -0,0 +1,127 @@
+//Microsoft Visual C++ generated resource script.\r
+//\r
+#include "resource.h"\r
+\r
+#define APSTUDIO_READONLY_SYMBOLS\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Generated from the TEXTINCLUDE 2 resource.\r
+//\r
+#define APSTUDIO_HIDDEN_SYMBOLS\r
+#include "windows.h"\r
+#undef APSTUDIO_HIDDEN_SYMBOLS\r
+/////////////////////////////////////////////////////////////////////////////\r
+#undef APSTUDIO_READONLY_SYMBOLS\r
+\r
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r
+LANGUAGE 9, 1\r
+#pragma code_page(1252)\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Icon\r
+//\r
+\r
+// Icon with lowest ID value placed first to ensure application icon\r
+// remains consistent on all systems.\r
+\r
+IDI_SPINNERET       ICON         "Spinneret.ico"\r
+IDI_SMALL               ICON         "small.ico"\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Menu\r
+//\r
+\r
+IDC_SPINNERET MENU \r
+BEGIN\r
+    POPUP "&File"\r
+    BEGIN\r
+        MENUITEM "E&xit",                IDM_EXIT\r
+    END\r
+    POPUP "&Help"\r
+    BEGIN\r
+        MENUITEM "&About ...",           IDM_ABOUT\r
+    END\r
+END\r
+\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Accelerator\r
+//\r
+\r
+IDC_SPINNERET ACCELERATORS\r
+BEGIN\r
+    "?",            IDM_ABOUT,              ASCII,  ALT\r
+    "/",            IDM_ABOUT,              ASCII,  ALT\r
+END\r
+\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Dialog\r
+//\r
+\r
+IDD_ABOUTBOX DIALOG   22, 17, 230, 75\r
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU\r
+CAPTION "About"\r
+FONT 8, "System"\r
+BEGIN\r
+    ICON            IDI_SPINNERET,IDC_MYICON,14,9,16,16\r
+    LTEXT           "Spinneret Version 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX\r
+    LTEXT           "Copyright (C) 2006",IDC_STATIC,49,20,119,8\r
+    DEFPUSHBUTTON   "OK",IDOK,195,6,30,11,WS_GROUP\r
+END\r
+\r
+\r
+#ifdef APSTUDIO_INVOKED\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// TEXTINCLUDE\r
+//\r
+1 TEXTINCLUDE  \r
+BEGIN\r
+    "resource.h\0"\r
+END\r
+\r
+2 TEXTINCLUDE  \r
+BEGIN\r
+    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"\r
+    "#include ""windows.h""\r\n"\r
+    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"\r
+    "\0"\r
+END\r
+\r
+3 TEXTINCLUDE  \r
+BEGIN\r
+    "\r\n"\r
+    "\0"\r
+END\r
+\r
+#endif    // APSTUDIO_INVOKED\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// String Table\r
+//\r
+\r
+STRINGTABLE  \r
+BEGIN\r
+   IDC_SPINNERET   "SPINNERET"\r
+   IDS_APP_TITLE       "Spinneret"\r
+END\r
+\r
+#endif\r
+/////////////////////////////////////////////////////////////////////////////\r
+\r
+\r
+\r
+#ifndef APSTUDIO_INVOKED\r
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// Generated from the TEXTINCLUDE 3 resource.\r
+//\r
+\r
+/////////////////////////////////////////////////////////////////////////////\r
+#endif    // not APSTUDIO_INVOKED\r
diff --git a/WebKitTools/Spinneret/Spinneret/Spinneret.vcproj b/WebKitTools/Spinneret/Spinneret/Spinneret.vcproj
new file mode 100755 (executable)
index 0000000..86edb5e
--- /dev/null
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="Spinneret"\r
+       ProjectGUID="{114FCA11-216B-4C8C-957E-30A75AE80443}"\r
+       RootNamespace="Spinneret"\r
+       Keyword="Win32Proj"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="$(WebKitOutputDir)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(WebKitOutputDir)\DumpRenderTree.intermediate\$(ConfigurationName)\DumpRenderTree.intermediate"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\WebCore&quot;;&quot;$(SolutionDir)\..\..\WebCore\loader&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\dom&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\ecma&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\html&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml&quot;;&quot;$(SolutionDir)\..\..\WebCore\css&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\misc&quot;;&quot;$(SolutionDir)\..\..\WebCore\platform&quot;;&quot;$(SolutionDir)\..\..\WebCore\bridge\win&quot;;&quot;$(SolutionDir)\..\..\WebCore\page&quot;;&quot;$(SolutionDir)\..\..\WebCore\bridge&quot;;&quot;$(SolutionDir)\..\..\WebCore\platform\win&quot;;&quot;$(SolutionDir)\..\..\WebCore\rendering&quot;;&quot;$(SolutionDir)\..\..\WebCore\editing&quot;;&quot;$(SolutionDir)\..\..\WebCore\dom&quot;;&quot;$(SolutionDir)\..\..\WebCore\xml&quot;;&quot;$(SolutionDir)\..\..\WebCore\kwq&quot;;&quot;$(SolutionDir)\..\..\iconv&quot;;&quot;$(SolutionDir)\..\..\libxml2&quot;;&quot;$(SolutionDir)\..\..\icu\include&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\os-win32&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\kxmlcore&quot;;&quot;$(SolutionDir)\..\..\WebCore\ForwardingHeaders&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="2"\r
+                               WarningLevel="1"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="&quot;$(WebKitOutputDir)\WebCore.intermediate\$(ConfigurationName)\WebCore.intermediate\WebCore.lib&quot;&#x0D;&#x0A;&quot;$(WebKitOutputDir)\JavaScriptCore.intermediate\$(ConfigurationName)\JavaScriptCore.intermediate\JavaScriptCore.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\iconv\lib\iconv.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\libxml\lib\libxml2.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\libxslt\lib\libxslt.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\icu\lib\icuuc.lib&quot;"\r
+                               LinkIncremental="2"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="$(WebKitOutputDir)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(WebKitOutputDir)\DumpRenderTree.intermediate\$(ConfigurationName)\DumpRenderTree.intermediate"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\WebCore&quot;;&quot;$(SolutionDir)\..\..\WebCore\loader&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\dom&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\ecma&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\html&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml&quot;;&quot;$(SolutionDir)\..\..\WebCore\css&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\misc&quot;;&quot;$(SolutionDir)\..\..\WebCore\platform&quot;;&quot;$(SolutionDir)\..\..\WebCore\bridge\win&quot;;&quot;$(SolutionDir)\..\..\WebCore\page&quot;;&quot;$(SolutionDir)\..\..\WebCore\bridge&quot;;&quot;$(SolutionDir)\..\..\WebCore\platform\win&quot;;&quot;$(SolutionDir)\..\..\WebCore\rendering&quot;;&quot;$(SolutionDir)\..\..\WebCore\editing&quot;;&quot;$(SolutionDir)\..\..\WebCore\dom&quot;;&quot;$(SolutionDir)\..\..\WebCore\xml&quot;;&quot;$(SolutionDir)\..\..\WebCore\kwq&quot;;&quot;$(SolutionDir)\..\..\iconv&quot;;&quot;$(SolutionDir)\..\..\libxml2&quot;;&quot;$(SolutionDir)\..\..\icu\include&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\os-win32&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\kxmlcore&quot;;&quot;$(SolutionDir)\..\..\WebCore\ForwardingHeaders&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"\r
+                               RuntimeLibrary="2"\r
+                               UsePrecompiledHeader="2"\r
+                               WarningLevel="1"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="&quot;$(WebKitOutputDir)\WebCore.intermediate\$(ConfigurationName)\WebCore.intermediate\WebCore.lib&quot;&#x0D;&#x0A;&quot;$(WebKitOutputDir)\JavaScriptCore.intermediate\$(ConfigurationName)\JavaScriptCore.intermediate\JavaScriptCore.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\iconv\lib\iconv.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\libxml\lib\libxml2.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\libxslt\lib\libxslt.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\icu\lib\icuuc.lib&quot;"\r
+                               LinkIncremental="1"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\Spinneret.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\stdafx.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               UsePrecompiledHeader="1"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               UsePrecompiledHeader="1"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\WebView.cpp"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\Resource.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\Spinneret.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\stdafx.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\WebView.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\small.ico"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\Spinneret.ico"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\Spinneret.rc"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/WebKitTools/Spinneret/Spinneret/WebView.cpp b/WebKitTools/Spinneret/Spinneret/WebView.cpp
new file mode 100755 (executable)
index 0000000..168d6bd
--- /dev/null
@@ -0,0 +1,175 @@
+/*\r
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY\r
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+ */\r
+\r
+#include "stdafx.h"\r
+#include "config.h"\r
+\r
+#include "WebView.h"\r
+#include "Resource.h"\r
+\r
+#include "FrameWin.h"\r
+#include "FrameView.h"\r
+#include "Page.h"\r
+#include "render_frames.h"\r
+#include "GraphicsContext.h"\r
+\r
+\r
+using namespace WebCore;\r
+\r
+namespace WebKit {\r
+\r
+// FIXME: we need to hang a pointer off the HWND\r
+WebView* gSharedWebViewHack = 0;\r
+\r
+class WebView::WebViewPrivate {\r
+public:\r
+    WebViewPrivate() {}\r
+    ~WebViewPrivate()\r
+    {\r
+        delete frame;\r
+    }\r
+\r
+    FrameWin* frame;\r
+    HWND windowHandle;\r
+};\r
+\r
+const LPCWSTR kWebViewWindowClassName = L"WebViewWindowClass";\r
+\r
+LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);\r
+\r
+static ATOM registerWebViewWithInstance(HINSTANCE hInstance)\r
+{\r
+    static bool haveRegisteredWindowClass = false;\r
+    if (haveRegisteredWindowClass)\r
+        return true;\r
+\r
+    WNDCLASSEX wcex;\r
+\r
+    wcex.cbSize = sizeof(WNDCLASSEX);\r
+\r
+    wcex.style            = CS_HREDRAW | CS_VREDRAW; // CS_DBLCLKS?\r
+    wcex.lpfnWndProc    = WndProc;\r
+    wcex.cbClsExtra        = 0;\r
+    wcex.cbWndExtra        = 0;\r
+    wcex.hInstance        = hInstance;\r
+    wcex.hIcon            = 0;\r
+    wcex.hCursor        = LoadCursor(0, IDC_ARROW);\r
+    wcex.hbrBackground    = (HBRUSH)(COLOR_WINDOW+1);\r
+    wcex.lpszMenuName    = 0;\r
+    wcex.lpszClassName    = kWebViewWindowClassName;\r
+    wcex.hIconSm        = 0;\r
+\r
+    return RegisterClassEx(&wcex);\r
+}\r
+\r
+// FIXME: This should eventually just use the DLL instance, I think.\r
+WebView* WebView::createWebView(HINSTANCE hInstance, HWND parent)\r
+{\r
+   registerWebViewWithInstance(hInstance);\r
+\r
+   HWND hWnd = CreateWindow(kWebViewWindowClassName, 0, WS_CHILD | WS_BORDER,\r
+       CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, parent, 0, hInstance, 0);\r
+   \r
+   if (!hWnd)\r
+      return 0;\r
+\r
+   gSharedWebViewHack = new WebView(hWnd);\r
+   return gSharedWebViewHack;\r
+}\r
+\r
+WebView::WebView(HWND hWnd)\r
+{\r
+    d = new WebViewPrivate();\r
+    d->windowHandle = hWnd;\r
+\r
+    Page *page = new Page();\r
+    d->frame = new FrameWin(page, 0);\r
+    FrameView *frameView = new FrameView(d->frame);\r
+    d->frame->setView(frameView);\r
+}\r
+\r
+WebView::~WebView()\r
+{\r
+    \r
+}\r
+\r
+void WebView::drawRect(const RECT& dirtyRect)\r
+{\r
+    GraphicsContext context;\r
+    d->frame->paint(&context, dirtyRect);\r
+}\r
+\r
+HWND WebView::windowHandle()\r
+{\r
+    return d->windowHandle;\r
+}\r
+\r
+//\r
+//  FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM)\r
+//\r
+//  PURPOSE:  Processes messages for the main window.\r
+//\r
+//  WM_COMMAND    - process the application menu\r
+//  WM_PAINT    - Paint the main window\r
+//  WM_DESTROY    - post a quit message and return\r
+//\r
+LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)\r
+{\r
+    int wmId, wmEvent;\r
+    HDC hdc;\r
+\r
+    switch (message)\r
+    {\r
+    case WM_COMMAND:\r
+        wmId    = LOWORD(wParam);\r
+        wmEvent = HIWORD(wParam);\r
+        // Parse the menu selections:\r
+        switch (wmId)\r
+        {\r
+        case IDM_EXIT:\r
+            DestroyWindow(hWnd);\r
+            break;\r
+        default:\r
+            return DefWindowProc(hWnd, message, wParam, lParam);\r
+        }\r
+        break;\r
+    case WM_PAINT:\r
+        PAINTSTRUCT ps;\r
+        hdc = BeginPaint(hWnd, &ps);\r
+        // TODO: Add any drawing code here...\r
+        gSharedWebViewHack->drawRect(ps.rcPaint);\r
+        EndPaint(hWnd, &ps);\r
+        break;\r
+    case WM_DESTROY:\r
+        // Do nothing?\r
+        break;\r
+    default:\r
+        return DefWindowProc(hWnd, message, wParam, lParam);\r
+    }\r
+    return 0;\r
+}\r
+\r
+\r
+};\r
diff --git a/WebKitTools/Spinneret/Spinneret/WebView.h b/WebKitTools/Spinneret/Spinneret/WebView.h
new file mode 100755 (executable)
index 0000000..b867f26
--- /dev/null
@@ -0,0 +1,48 @@
+/*\r
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY\r
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+ */\r
+\r
+#ifndef WebView_H\r
+#define WebView_H\r
+\r
+namespace WebKit {\r
+    \r
+    class WebView {\r
+    public:\r
+        static WebView* createWebView(HINSTANCE, HWND parent = 0);\r
+\r
+        ~WebView();\r
+\r
+        void drawRect(const RECT&);\r
+\r
+        HWND windowHandle();\r
+    private:\r
+        WebView(HWND);\r
+        \r
+        class WebViewPrivate;\r
+        WebViewPrivate *d;\r
+    };\r
+}\r
+\r
+#endif\r
diff --git a/WebKitTools/Spinneret/Spinneret/small.ico b/WebKitTools/Spinneret/Spinneret/small.ico
new file mode 100755 (executable)
index 0000000..d551aa3
Binary files /dev/null and b/WebKitTools/Spinneret/Spinneret/small.ico differ
diff --git a/WebKitTools/Spinneret/Spinneret/stdafx.cpp b/WebKitTools/Spinneret/Spinneret/stdafx.cpp
new file mode 100755 (executable)
index 0000000..f38a7b4
--- /dev/null
@@ -0,0 +1,33 @@
+/*\r
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY\r
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+ */\r
+\r
+// stdafx.cpp : source file that includes just the standard includes\r
+// Spinneret.pch will be the pre-compiled header\r
+// stdafx.obj will contain the pre-compiled type information\r
+\r
+#include "stdafx.h"\r
+\r
+// TODO: reference any additional headers you need in STDAFX.H\r
+// and not in this file\r
diff --git a/WebKitTools/Spinneret/Spinneret/stdafx.h b/WebKitTools/Spinneret/Spinneret/stdafx.h
new file mode 100755 (executable)
index 0000000..41487ab
--- /dev/null
@@ -0,0 +1,62 @@
+/*\r
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY\r
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR\r
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+ */\r
+\r
+// stdafx.h : include file for standard system include files,\r
+// or project specific include files that are used frequently, but\r
+// are changed infrequently\r
+//\r
+\r
+#pragma once\r
+\r
+// Modify the following defines if you have to target a platform prior to the ones specified below.\r
+// Refer to MSDN for the latest info on corresponding values for different platforms.\r
+#ifndef WINVER                // Allow use of features specific to Windows XP or later.\r
+#define WINVER 0x0501        // Change this to the appropriate value to target other versions of Windows.\r
+#endif\r
+\r
+#ifndef _WIN32_WINNT        // Allow use of features specific to Windows XP or later.                   \r
+#define _WIN32_WINNT 0x0501    // Change this to the appropriate value to target other versions of Windows.\r
+#endif                        \r
+\r
+#ifndef _WIN32_WINDOWS        // Allow use of features specific to Windows 98 or later.\r
+#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.\r
+#endif\r
+\r
+#ifndef _WIN32_IE            // Allow use of features specific to IE 6.0 or later.\r
+#define _WIN32_IE 0x0600    // Change this to the appropriate value to target other versions of IE.\r
+#endif\r
+\r
+#define WIN32_LEAN_AND_MEAN        // Exclude rarely-used stuff from Windows headers\r
+// Windows Header Files:\r
+#include <windows.h>\r
+\r
+// C RunTime Header Files\r
+#include <stdlib.h>\r
+#include <malloc.h>\r
+#include <memory.h>\r
+#include <tchar.h>\r
+\r
+\r
+// TODO: reference additional headers your program requires here\r