Reviewed by Darin.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2006 19:12:19 +0000 (19:12 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2006 19:12:19 +0000 (19:12 +0000)
        Adds a JavaScript debugger, called Drosera. Named after
        a genus of bug eating plants.

        * Drosera/DebuggerApplication.h: Added.
        * Drosera/DebuggerApplication.m: Added.
        (-[DebuggerApplication applicationDidFinishLaunching:]):
        (-[DebuggerApplication serverLoaded:]):
        (-[DebuggerApplication serverUnloaded:]):
        (-[DebuggerApplication awakeFromNib]):
        (-[DebuggerApplication showAttachPanel:]):
        (-[DebuggerApplication attach:]):
        (-[DebuggerApplication numberOfRowsInTableView:]):
        (-[DebuggerApplication tableView:objectValueForTableColumn:row:]):
        (-[DebuggerApplication tableView:willDisplayCell:forTableColumn:row:]):
        (-[DebuggerApplication tableViewSelectionDidChange:]):
        * Drosera/DebuggerDocument.h: Added.
        * Drosera/DebuggerDocument.m: Added.
        (+[WebScriptCallFrame isSelectorExcludedFromWebScript:]):
        (+[WebScriptCallFrame isKeyExcludedFromWebScript:]):
        (+[DebuggerDocument isSelectorExcludedFromWebScript:]):
        (+[DebuggerDocument isKeyExcludedFromWebScript:]):
        (-[DebuggerDocument initWithServerName:]):
        (-[DebuggerDocument windowWillClose:]):
        (-[DebuggerDocument dealloc]):
        (-[DebuggerDocument isPaused]):
        (-[DebuggerDocument pause]):
        (-[DebuggerDocument resume]):
        (-[DebuggerDocument step]):
        (-[DebuggerDocument windowNibName]):
        (-[DebuggerDocument windowDidLoad]):
        (-[DebuggerDocument switchToServerNamed:]):
        (-[DebuggerDocument applicationTerminating:]):
        (-[DebuggerDocument serverConnectionDidDie:]):
        (-[DebuggerDocument webView:windowScriptObjectAvailable:]):
        (-[DebuggerDocument webView:didFinishLoadForFrame:]):
        (-[DebuggerDocument webView:didParseSource:fromURL:sourceId:forWebFrame:]):
        (-[DebuggerDocument webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
        (-[DebuggerDocument webView:willExecuteStatement:sourceId:line:forWebFrame:]):
        (-[DebuggerDocument webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
        * Drosera/Drosera.pch: Added.
        * Drosera/Drosera.xcodeproj/project.pbxproj: Added.
        * Drosera/English.lproj/Debugger.nib/classes.nib: Added.
        * Drosera/English.lproj/Debugger.nib/info.nib: Added.
        * Drosera/English.lproj/Debugger.nib/keyedobjects.nib: Added.
        * Drosera/English.lproj/MainMenu.nib/classes.nib: Added.
        * Drosera/English.lproj/MainMenu.nib/info.nib: Added.
        * Drosera/English.lproj/MainMenu.nib/keyedobjects.nib: Added.
        * Drosera/Images/breakPoint.tif: Added.
        * Drosera/Images/breakPointDisabled.tif: Added.
        * Drosera/Images/continue.tif: Added.
        * Drosera/Images/finishFunction.tif: Added.
        * Drosera/Images/glossyFooterFill.tif: Added.
        * Drosera/Images/glossyHeader.png: Added.
        * Drosera/Images/gradientBackground.png: Added.
        * Drosera/Images/gutter.png: Added.
        * Drosera/Images/navLeftDisabled.png: Added.
        * Drosera/Images/navLeftNormal.png: Added.
        * Drosera/Images/navLeftPressed.png: Added.
        * Drosera/Images/navRightDisabled.png: Added.
        * Drosera/Images/navRightNormal.png: Added.
        * Drosera/Images/navRightPressed.png: Added.
        * Drosera/Images/pause.tif: Added.
        * Drosera/Images/popUpArrows.png: Added.
        * Drosera/Images/programCounter.tif: Added.
        * Drosera/Images/programCounterBreakPoint.tif: Added.
        * Drosera/Images/programCounterBreakPointDisabled.tif: Added.
        * Drosera/Images/run.tif: Added.
        * Drosera/Images/splitterBar.tif: Added.
        * Drosera/Images/splitterDimple.tif: Added.
        * Drosera/Images/step.tif: Added.
        * Drosera/Images/stepOver.tif: Added.
        * Drosera/Images/stop.tif: Added.
        * Drosera/Images/toolbarBackground.png: Added.
        * Drosera/Info.plist: Added.
        * Drosera/debugger.css: Added.
        * Drosera/debugger.html: Added.
        * Drosera/debugger.js: Added.
        * Drosera/main.m: Added.
        (main):
        * Drosera/viewer.css: Added.
        * Drosera/viewer.html: Added.

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

46 files changed:
WebKitTools/ChangeLog
WebKitTools/Drosera/DebuggerApplication.h [new file with mode: 0644]
WebKitTools/Drosera/DebuggerApplication.m [new file with mode: 0644]
WebKitTools/Drosera/DebuggerDocument.h [new file with mode: 0644]
WebKitTools/Drosera/DebuggerDocument.m [new file with mode: 0644]
WebKitTools/Drosera/Drosera.pch [new file with mode: 0644]
WebKitTools/Drosera/Drosera.xcodeproj/project.pbxproj [new file with mode: 0644]
WebKitTools/Drosera/English.lproj/Debugger.nib/classes.nib [new file with mode: 0644]
WebKitTools/Drosera/English.lproj/Debugger.nib/info.nib [new file with mode: 0644]
WebKitTools/Drosera/English.lproj/Debugger.nib/keyedobjects.nib [new file with mode: 0644]
WebKitTools/Drosera/English.lproj/MainMenu.nib/classes.nib [new file with mode: 0644]
WebKitTools/Drosera/English.lproj/MainMenu.nib/info.nib [new file with mode: 0644]
WebKitTools/Drosera/English.lproj/MainMenu.nib/keyedobjects.nib [new file with mode: 0644]
WebKitTools/Drosera/Images/breakPoint.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/breakPointDisabled.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/continue.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/finishFunction.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/glossyFooterFill.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/glossyHeader.png [new file with mode: 0644]
WebKitTools/Drosera/Images/gradientBackground.png [new file with mode: 0644]
WebKitTools/Drosera/Images/gutter.png [new file with mode: 0644]
WebKitTools/Drosera/Images/navLeftDisabled.png [new file with mode: 0644]
WebKitTools/Drosera/Images/navLeftNormal.png [new file with mode: 0644]
WebKitTools/Drosera/Images/navLeftPressed.png [new file with mode: 0644]
WebKitTools/Drosera/Images/navRightDisabled.png [new file with mode: 0644]
WebKitTools/Drosera/Images/navRightNormal.png [new file with mode: 0644]
WebKitTools/Drosera/Images/navRightPressed.png [new file with mode: 0644]
WebKitTools/Drosera/Images/pause.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/popUpArrows.png [new file with mode: 0644]
WebKitTools/Drosera/Images/programCounter.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/programCounterBreakPoint.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/programCounterBreakPointDisabled.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/run.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/splitterBar.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/splitterDimple.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/step.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/stepOver.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/stop.tif [new file with mode: 0644]
WebKitTools/Drosera/Images/toolbarBackground.png [new file with mode: 0644]
WebKitTools/Drosera/Info.plist [new file with mode: 0644]
WebKitTools/Drosera/debugger.css [new file with mode: 0644]
WebKitTools/Drosera/debugger.html [new file with mode: 0644]
WebKitTools/Drosera/debugger.js [new file with mode: 0644]
WebKitTools/Drosera/main.m [new file with mode: 0644]
WebKitTools/Drosera/viewer.css [new file with mode: 0644]
WebKitTools/Drosera/viewer.html [new file with mode: 0644]

index e29839921d24bc12538388ac9549d17f0c6cb79e..0176eddceadb8cfcba1bca55b6d8c7f81b9b7958 100644 (file)
@@ -1,3 +1,89 @@
+2006-06-20  Timothy Hatcher  <timothy@apple.com>
+
+        Reviewed by Darin.
+        
+        Adds a JavaScript debugger, called Drosera. Named after
+        a genus of bug eating plants.
+
+        * Drosera/DebuggerApplication.h: Added.
+        * Drosera/DebuggerApplication.m: Added.
+        (-[DebuggerApplication applicationDidFinishLaunching:]):
+        (-[DebuggerApplication serverLoaded:]):
+        (-[DebuggerApplication serverUnloaded:]):
+        (-[DebuggerApplication awakeFromNib]):
+        (-[DebuggerApplication showAttachPanel:]):
+        (-[DebuggerApplication attach:]):
+        (-[DebuggerApplication numberOfRowsInTableView:]):
+        (-[DebuggerApplication tableView:objectValueForTableColumn:row:]):
+        (-[DebuggerApplication tableView:willDisplayCell:forTableColumn:row:]):
+        (-[DebuggerApplication tableViewSelectionDidChange:]):
+        * Drosera/DebuggerDocument.h: Added.
+        * Drosera/DebuggerDocument.m: Added.
+        (+[WebScriptCallFrame isSelectorExcludedFromWebScript:]):
+        (+[WebScriptCallFrame isKeyExcludedFromWebScript:]):
+        (+[DebuggerDocument isSelectorExcludedFromWebScript:]):
+        (+[DebuggerDocument isKeyExcludedFromWebScript:]):
+        (-[DebuggerDocument initWithServerName:]):
+        (-[DebuggerDocument windowWillClose:]):
+        (-[DebuggerDocument dealloc]):
+        (-[DebuggerDocument isPaused]):
+        (-[DebuggerDocument pause]):
+        (-[DebuggerDocument resume]):
+        (-[DebuggerDocument step]):
+        (-[DebuggerDocument windowNibName]):
+        (-[DebuggerDocument windowDidLoad]):
+        (-[DebuggerDocument switchToServerNamed:]):
+        (-[DebuggerDocument applicationTerminating:]):
+        (-[DebuggerDocument serverConnectionDidDie:]):
+        (-[DebuggerDocument webView:windowScriptObjectAvailable:]):
+        (-[DebuggerDocument webView:didFinishLoadForFrame:]):
+        (-[DebuggerDocument webView:didParseSource:fromURL:sourceId:forWebFrame:]):
+        (-[DebuggerDocument webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
+        (-[DebuggerDocument webView:willExecuteStatement:sourceId:line:forWebFrame:]):
+        (-[DebuggerDocument webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
+        * Drosera/Drosera.pch: Added.
+        * Drosera/Drosera.xcodeproj/project.pbxproj: Added.
+        * Drosera/English.lproj/Debugger.nib/classes.nib: Added.
+        * Drosera/English.lproj/Debugger.nib/info.nib: Added.
+        * Drosera/English.lproj/Debugger.nib/keyedobjects.nib: Added.
+        * Drosera/English.lproj/MainMenu.nib/classes.nib: Added.
+        * Drosera/English.lproj/MainMenu.nib/info.nib: Added.
+        * Drosera/English.lproj/MainMenu.nib/keyedobjects.nib: Added.
+        * Drosera/Images/breakPoint.tif: Added.
+        * Drosera/Images/breakPointDisabled.tif: Added.
+        * Drosera/Images/continue.tif: Added.
+        * Drosera/Images/finishFunction.tif: Added.
+        * Drosera/Images/glossyFooterFill.tif: Added.
+        * Drosera/Images/glossyHeader.png: Added.
+        * Drosera/Images/gradientBackground.png: Added.
+        * Drosera/Images/gutter.png: Added.
+        * Drosera/Images/navLeftDisabled.png: Added.
+        * Drosera/Images/navLeftNormal.png: Added.
+        * Drosera/Images/navLeftPressed.png: Added.
+        * Drosera/Images/navRightDisabled.png: Added.
+        * Drosera/Images/navRightNormal.png: Added.
+        * Drosera/Images/navRightPressed.png: Added.
+        * Drosera/Images/pause.tif: Added.
+        * Drosera/Images/popUpArrows.png: Added.
+        * Drosera/Images/programCounter.tif: Added.
+        * Drosera/Images/programCounterBreakPoint.tif: Added.
+        * Drosera/Images/programCounterBreakPointDisabled.tif: Added.
+        * Drosera/Images/run.tif: Added.
+        * Drosera/Images/splitterBar.tif: Added.
+        * Drosera/Images/splitterDimple.tif: Added.
+        * Drosera/Images/step.tif: Added.
+        * Drosera/Images/stepOver.tif: Added.
+        * Drosera/Images/stop.tif: Added.
+        * Drosera/Images/toolbarBackground.png: Added.
+        * Drosera/Info.plist: Added.
+        * Drosera/debugger.css: Added.
+        * Drosera/debugger.html: Added.
+        * Drosera/debugger.js: Added.
+        * Drosera/main.m: Added.
+        (main):
+        * Drosera/viewer.css: Added.
+        * Drosera/viewer.html: Added.
+
 2006-06-18  David Kilzer  <ddkilzer@kilzer.net>
 
         Reviewed by darin.
diff --git a/WebKitTools/Drosera/DebuggerApplication.h b/WebKitTools/Drosera/DebuggerApplication.h
new file mode 100644 (file)
index 0000000..42e3904
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+@interface DebuggerApplication : NSObject {
+    NSMutableDictionary *knownServerNames;
+    IBOutlet NSPanel *attachWindow;
+    IBOutlet NSTableView *attachTable;
+    IBOutlet NSButton *attachButton;
+}
+- (IBAction)showAttachPanel:(id)sender;
+- (IBAction)attach:(id)sender;
+@end
diff --git a/WebKitTools/Drosera/DebuggerApplication.m b/WebKitTools/Drosera/DebuggerApplication.m
new file mode 100644 (file)
index 0000000..8b436e0
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DebuggerApplication.h"
+#import "DebuggerDocument.h"
+#import <WebKit/WebCoreStatistics.h>
+
+@implementation DebuggerApplication
+- (void)applicationDidFinishLaunching:(NSNotification *)notification
+{
+    [WebCoreStatistics setShouldPrintExceptions:YES];
+
+    knownServerNames = [[NSMutableDictionary alloc] init];
+
+    [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(serverLoaded:) name:WebScriptDebugServerDidLoadNotification object:nil];
+    [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(serverLoaded:) name:WebScriptDebugServerQueryReplyNotification object:nil];
+    [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(serverUnloaded:) name:WebScriptDebugServerWillUnloadNotification object:nil];
+    [[NSDistributedNotificationCenter defaultCenter] postNotificationName:WebScriptDebugServerQueryNotification object:nil];
+}
+
+- (void)serverLoaded:(NSNotification *)notification
+{
+    int processId = [[[notification userInfo] objectForKey:WebScriptDebugServerProcessIdentifierKey] intValue];
+    if (processId == [[NSProcessInfo processInfo] processIdentifier])
+        return;
+
+    NSMutableDictionary *info = [[notification userInfo] mutableCopy];
+    if (!info)
+        return;
+    [knownServerNames setObject:info forKey:[notification object]];
+    [info release];
+
+    [attachTable reloadData];
+}
+
+- (void)serverUnloaded:(NSNotification *)notification
+{
+    [knownServerNames removeObjectForKey:[notification object]];
+    [attachTable reloadData];
+}
+
+- (void)awakeFromNib
+{
+    NSTableColumn *column = [attachTable tableColumnWithIdentifier:@"name"];
+    NSBrowserCell *cell = [[NSBrowserCell alloc] init];
+    [cell setLeaf:YES];
+    [column setDataCell:cell];
+    [cell release];
+}
+
+- (IBAction)showAttachPanel:(id)sender
+{
+    if (![attachWindow isVisible])
+        [attachWindow center];
+    [attachTable reloadData];
+    [attachWindow makeKeyAndOrderFront:sender];
+}
+
+- (IBAction)attach:(id)sender
+{
+    if ([[attachTable selectedRowIndexes] count] != 1)
+        return;
+
+    [attachWindow orderOut:sender];
+
+    unsigned int row = [[attachTable selectedRowIndexes] firstIndex];
+    NSString *key = [[knownServerNames allKeys] objectAtIndex:row];
+
+    // DebuggerDocument will release on close
+    DebuggerDocument *document = [[DebuggerDocument alloc] initWithServerName:key];
+    [document showWindow:sender];
+}
+
+- (int) numberOfRowsInTableView:(NSTableView *)tableView
+{
+    return [knownServerNames count];
+}
+
+- (id) tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
+{
+    return @"";
+}
+
+- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(int)row
+{
+    NSString *key = [[knownServerNames allKeys] objectAtIndex:row];
+    NSMutableDictionary *info = [knownServerNames objectForKey:key];
+    NSString *processName = [info objectForKey:WebScriptDebugServerProcessNameKey];
+    NSImage *icon = [info objectForKey:@"icon"];
+
+    if (!icon) {
+        NSString *path = [[NSWorkspace sharedWorkspace] fullPathForApplication:processName];
+        if (path) icon = [[NSWorkspace sharedWorkspace] iconForFile:path];
+        if (!icon) icon = [[NSWorkspace sharedWorkspace] iconForFileType:@"app"];
+        if (icon) [info setObject:icon forKey:@"icon"];
+        [icon setScalesWhenResized:YES];
+        [icon setSize:NSMakeSize(32, 32)];
+    }
+
+    [cell setImage:icon];
+    [cell setTitle:processName];
+}
+
+- (void)tableViewSelectionDidChange:(NSNotification *)notification
+{
+    [attachButton setEnabled:([[attachTable selectedRowIndexes] count])];
+}
+@end
diff --git a/WebKitTools/Drosera/DebuggerDocument.h b/WebKitTools/Drosera/DebuggerDocument.h
new file mode 100644 (file)
index 0000000..72ded62
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+@interface DebuggerDocument : NSWindowController <WebScriptDebugListener>
+{
+    IBOutlet WebView *webView;
+    id<WebScriptDebugServer> server;
+    NSString *currentServerName;
+    BOOL webViewLoaded;
+    BOOL paused;
+}
+- (id)initWithServerName:(NSString *)serverName;
+- (void)switchToServerNamed:(NSString *)name;
+@end
diff --git a/WebKitTools/Drosera/DebuggerDocument.m b/WebKitTools/Drosera/DebuggerDocument.m
new file mode 100644 (file)
index 0000000..fac97a7
--- /dev/null
@@ -0,0 +1,223 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "DebuggerDocument.h"
+
+@implementation WebScriptCallFrame (WebScriptCallFrameScripting)
++ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
+{
+    return NO;
+}
+
++ (BOOL)isKeyExcludedFromWebScript:(const char *)name
+{
+    return NO;
+}
+@end
+
+@implementation DebuggerDocument
++ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
+{
+    return NO;
+}
+
++ (BOOL)isKeyExcludedFromWebScript:(const char *)name
+{
+    return NO;
+}
+
+- (id)initWithServerName:(NSString *)serverName
+{
+    if ((self = [super init]))
+        [self switchToServerNamed:serverName];
+    return self;
+}
+
+- (void)windowWillClose:(NSNotification *)notification
+{
+    [[webView windowScriptObject] removeWebScriptKey:@"DebuggerDocument"];
+
+    [[NSNotificationCenter defaultCenter] removeObserver:self name:NSApplicationWillTerminateNotification object:nil];
+    [[NSDistributedNotificationCenter defaultCenter] removeObserver:self name:WebScriptDebugServerQueryReplyNotification object:nil];
+    [[NSDistributedNotificationCenter defaultCenter] removeObserver:self name:WebScriptDebugServerWillUnloadNotification object:nil];
+
+    [self switchToServerNamed:nil];
+
+    [self autorelease]; // DebuggerApplication expects us to release on close
+}
+
+- (void)dealloc
+{
+    [server release];
+    [currentServerName release];
+    [super dealloc];
+}
+
+- (BOOL)isPaused
+{
+    return paused;
+}
+
+- (void)pause
+{
+    paused = YES;
+    if ([[(NSDistantObject *)server connectionForProxy] isValid])
+        [server pause];
+}
+
+- (void)resume
+{
+    paused = NO;
+    if ([[(NSDistantObject *)server connectionForProxy] isValid])
+        [server resume];
+}
+
+- (void)step
+{
+    if ([[(NSDistantObject *)server connectionForProxy] isValid])
+        [server step];
+}
+
+- (NSString *)windowNibName
+{
+    return @"Debugger";
+}
+
+- (void)windowDidLoad
+{
+    [super windowDidLoad];
+
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationTerminating:) name:NSApplicationWillTerminateNotification object:nil];
+
+    NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"debugger" ofType:@"html" inDirectory:nil];
+    [[webView mainFrame] loadRequest:[[[NSURLRequest alloc] initWithURL:[NSURL fileURLWithPath:path]] autorelease]];
+}
+
+- (void)switchToServerNamed:(NSString *)name
+{
+    if (server) {
+        [[NSNotificationCenter defaultCenter] removeObserver:self name:NSConnectionDidDieNotification object:[(NSDistantObject *)server connectionForProxy]];
+        if ([[(NSDistantObject *)server connectionForProxy] isValid]) {
+            [self resume];
+            [server removeListener:self];
+        }
+    }
+
+    id old = server;
+    server = ([name length] ? [[NSConnection rootProxyForConnectionWithRegisteredName:name host:nil] retain] : nil);
+    [old release];
+
+    old = currentServerName;
+    currentServerName = [name copy];
+    [old release];
+
+    if (server) {
+        @try {
+            [(NSDistantObject *)server setProtocolForProxy:@protocol(WebScriptDebugServer)];
+            [server addListener:self];
+        } @catch (NSException *exception) {
+            [currentServerName release];
+            currentServerName = nil;
+            [server release];
+            server = nil;
+        }
+
+        if (server)
+            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(serverConnectionDidDie:) name:NSConnectionDidDieNotification object:[(NSDistantObject *)server connectionForProxy]];  
+    }
+}
+
+- (void)applicationTerminating:(NSNotification *)notifiction
+{
+    if (server && [[(NSDistantObject *)server connectionForProxy] isValid]) {
+        if ([[(NSDistantObject *)server connectionForProxy] isValid])
+            [server removeListener:self];
+        // call the runloop for a while to make sure our removeListener: is sent to the server
+        [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.25]];
+    }
+}
+
+- (void)serverConnectionDidDie:(NSNotification *)notifiction
+{
+    [self switchToServerNamed:nil];
+}
+
+- (void)webView:(WebView *)sender windowScriptObjectAvailable:(WebScriptObject *)windowScriptObject
+{
+    // note: this is the Debuggers's own WebView, not the one being debugged
+    [[sender windowScriptObject] setValue:self forKey:@"DebuggerDocument"];
+}
+
+- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
+{
+    // note: this is the Debuggers's own WebView, not the one being debugged
+    webViewLoaded = YES;
+}
+
+- (void)webView:(WebView *)view didParseSource:(NSString *)source fromURL:(NSString *)url sourceId:(int)sid forWebFrame:(WebFrame *)webFrame
+{
+    if (!webViewLoaded)
+        return;
+
+    NSString *sourceCopy = [source copy];
+    NSString *urlCopy = [url copy];
+
+    NSArray *args = [NSArray arrayWithObjects:sourceCopy, (urlCopy ? urlCopy : @""), [NSNumber numberWithInt:sid], nil];
+    [[webView windowScriptObject] callWebScriptMethod:@"didParseScript" withArguments:args];
+
+    [sourceCopy release];
+    [urlCopy release];
+}
+
+- (void)webView:(WebView *)view didEnterCallFrame:(WebScriptCallFrame *)frame sourceId:(int)sid line:(int)lineno forWebFrame:(WebFrame *)webFrame
+{
+    if (!webViewLoaded)
+        return;
+
+    NSArray *args = [NSArray arrayWithObjects:[NSNumber numberWithInt:sid], [NSNumber numberWithInt:lineno], nil];
+    [[webView windowScriptObject] callWebScriptMethod:@"didEnterCallFrame" withArguments:args];
+}
+
+- (void)webView:(WebView *)view willExecuteStatement:(WebScriptCallFrame *)frame sourceId:(int)sid line:(int)lineno forWebFrame:(WebFrame *)webFrame
+{
+    if (!webViewLoaded)
+        return;
+
+    NSArray *args = [NSArray arrayWithObjects:[NSNumber numberWithInt:sid], [NSNumber numberWithInt:lineno], nil];
+    [[webView windowScriptObject] callWebScriptMethod:@"willExecuteStatement" withArguments:args];
+}
+
+- (void)webView:(WebView *)view willLeaveCallFrame:(WebScriptCallFrame *)frame sourceId:(int)sid line:(int)lineno forWebFrame:(WebFrame *)webFrame
+{
+    if (!webViewLoaded)
+        return;
+
+    NSArray *args = [NSArray arrayWithObjects:[NSNumber numberWithInt:sid], [NSNumber numberWithInt:lineno], nil];
+    [[webView windowScriptObject] callWebScriptMethod:@"willLeaveCallFrame" withArguments:args];
+}
+@end
diff --git a/WebKitTools/Drosera/Drosera.pch b/WebKitTools/Drosera/Drosera.pch
new file mode 100644 (file)
index 0000000..24b5fb2
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef __OBJC__
+
+#import <Cocoa/Cocoa.h>
+#import <WebKit/WebKit.h>
+#import <WebKit/WebScriptDebugDelegate.h>
+#import <WebKit/WebScriptDebugServer.h>
+
+#endif
diff --git a/WebKitTools/Drosera/Drosera.xcodeproj/project.pbxproj b/WebKitTools/Drosera/Drosera.xcodeproj/project.pbxproj
new file mode 100644 (file)
index 0000000..ea987a9
--- /dev/null
@@ -0,0 +1,416 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 42;
+       objects = {
+
+/* Begin PBXBuildFile section */
+               1C27ABC60A413B720016ECF4 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C27ABC50A413B720016ECF4 /* WebKit.framework */; };
+               1C27AC200A413D2D0016ECF4 /* debugger.html in Resources */ = {isa = PBXBuildFile; fileRef = 1C27AC1F0A413D2D0016ECF4 /* debugger.html */; };
+               1C27B1260A421D870016ECF4 /* debugger.js in Resources */ = {isa = PBXBuildFile; fileRef = 1C27AC230A413D660016ECF4 /* debugger.js */; };
+               1C4FF7440A44F52C0000D05D /* debugger.css in Resources */ = {isa = PBXBuildFile; fileRef = 1C4FF7430A44F5260000D05D /* debugger.css */; };
+               1C4FF7540A44F6320000D05D /* gutter.png in Resources */ = {isa = PBXBuildFile; fileRef = 1C4FF7530A44F6320000D05D /* gutter.png */; };
+               1C4FF9210A45F3520000D05D /* glossyHeader.png in Resources */ = {isa = PBXBuildFile; fileRef = 1C4FF91F0A45F3520000D05D /* glossyHeader.png */; };
+               1C4FF94E0A45F5060000D05D /* popUpArrows.png in Resources */ = {isa = PBXBuildFile; fileRef = 1C4FF94D0A45F5060000D05D /* popUpArrows.png */; };
+               1C4FFE5E0A466F5D0000D05D /* programCounterBreakPoint.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1C4FFE5C0A466F5D0000D05D /* programCounterBreakPoint.tif */; };
+               1C4FFE5F0A466F5D0000D05D /* programCounterBreakPointDisabled.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1C4FFE5D0A466F5D0000D05D /* programCounterBreakPointDisabled.tif */; };
+               1C74F0350A47BF8300FEC632 /* viewer.html in Resources */ = {isa = PBXBuildFile; fileRef = 1C74F0340A47BF8300FEC632 /* viewer.html */; };
+               1C74F04B0A47BFE800FEC632 /* viewer.css in Resources */ = {isa = PBXBuildFile; fileRef = 1C74F03A0A47BFD600FEC632 /* viewer.css */; };
+               1C74F1850A47DEE600FEC632 /* DebuggerApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C74F1840A47DEE600FEC632 /* DebuggerApplication.m */; };
+               1CC058EE0A44A210006FE533 /* breakPoint.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058B80A44A210006FE533 /* breakPoint.tif */; };
+               1CC058EF0A44A210006FE533 /* breakPointDisabled.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058B90A44A210006FE533 /* breakPointDisabled.tif */; };
+               1CC059020A44A210006FE533 /* glossyFooterFill.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058CC0A44A210006FE533 /* glossyFooterFill.tif */; };
+               1CC0590E0A44A210006FE533 /* navLeftDisabled.png in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058D80A44A210006FE533 /* navLeftDisabled.png */; };
+               1CC0590F0A44A210006FE533 /* navLeftNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058D90A44A210006FE533 /* navLeftNormal.png */; };
+               1CC059100A44A210006FE533 /* navLeftPressed.png in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058DA0A44A210006FE533 /* navLeftPressed.png */; };
+               1CC059110A44A210006FE533 /* navRightDisabled.png in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058DB0A44A210006FE533 /* navRightDisabled.png */; };
+               1CC059120A44A210006FE533 /* navRightNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058DC0A44A210006FE533 /* navRightNormal.png */; };
+               1CC059130A44A210006FE533 /* navRightPressed.png in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058DD0A44A210006FE533 /* navRightPressed.png */; };
+               1CC059160A44A210006FE533 /* programCounter.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058E00A44A210006FE533 /* programCounter.tif */; };
+               1CC059170A44A210006FE533 /* splitterBar.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058E10A44A210006FE533 /* splitterBar.tif */; };
+               1CC059180A44A210006FE533 /* splitterDimple.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058E20A44A210006FE533 /* splitterDimple.tif */; };
+               1CC0591A0A44A210006FE533 /* continue.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058E40A44A210006FE533 /* continue.tif */; };
+               1CC0591C0A44A210006FE533 /* finishFunction.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058E60A44A210006FE533 /* finishFunction.tif */; };
+               1CC0591D0A44A210006FE533 /* pause.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058E70A44A210006FE533 /* pause.tif */; };
+               1CC0591E0A44A210006FE533 /* run.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058E80A44A210006FE533 /* run.tif */; };
+               1CC0591F0A44A210006FE533 /* step.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058E90A44A210006FE533 /* step.tif */; };
+               1CC059200A44A210006FE533 /* stepOver.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058EA0A44A210006FE533 /* stepOver.tif */; };
+               1CC059210A44A210006FE533 /* stop.tif in Resources */ = {isa = PBXBuildFile; fileRef = 1CC058EB0A44A210006FE533 /* stop.tif */; };
+               1CC059700A44A485006FE533 /* toolbarBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 1CC0596F0A44A485006FE533 /* toolbarBackground.png */; };
+               8D15AC2D0486D014006FF6A4 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */; };
+               8D15AC2E0486D014006FF6A4 /* Debugger.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B4FDCFA73011CA2CEA /* Debugger.nib */; };
+               8D15AC310486D014006FF6A4 /* DebuggerDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4ACFDCFA73011CA2CEA /* DebuggerDocument.m */; settings = {ATTRIBUTES = (); }; };
+               8D15AC320486D014006FF6A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
+               8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+               1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+               13E42FBA07B3F13500E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+               1C27ABC50A413B720016ECF4 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
+               1C27AC1F0A413D2D0016ECF4 /* debugger.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = debugger.html; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               1C27AC230A413D660016ECF4 /* debugger.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = debugger.js; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               1C4FF7430A44F5260000D05D /* debugger.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = debugger.css; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               1C4FF7530A44F6320000D05D /* gutter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gutter.png; sourceTree = "<group>"; };
+               1C4FF91F0A45F3520000D05D /* glossyHeader.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = glossyHeader.png; sourceTree = "<group>"; };
+               1C4FF94D0A45F5060000D05D /* popUpArrows.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = popUpArrows.png; sourceTree = "<group>"; };
+               1C4FFE5C0A466F5D0000D05D /* programCounterBreakPoint.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = programCounterBreakPoint.tif; sourceTree = "<group>"; };
+               1C4FFE5D0A466F5D0000D05D /* programCounterBreakPointDisabled.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = programCounterBreakPointDisabled.tif; sourceTree = "<group>"; };
+               1C74F0340A47BF8300FEC632 /* viewer.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = viewer.html; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               1C74F03A0A47BFD600FEC632 /* viewer.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = viewer.css; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               1C74F1830A47DEE600FEC632 /* DebuggerApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebuggerApplication.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               1C74F1840A47DEE600FEC632 /* DebuggerApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DebuggerApplication.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               1CC058B80A44A210006FE533 /* breakPoint.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = breakPoint.tif; sourceTree = "<group>"; };
+               1CC058B90A44A210006FE533 /* breakPointDisabled.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = breakPointDisabled.tif; sourceTree = "<group>"; };
+               1CC058CC0A44A210006FE533 /* glossyFooterFill.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = glossyFooterFill.tif; sourceTree = "<group>"; };
+               1CC058D80A44A210006FE533 /* navLeftDisabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = navLeftDisabled.png; sourceTree = "<group>"; };
+               1CC058D90A44A210006FE533 /* navLeftNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = navLeftNormal.png; sourceTree = "<group>"; };
+               1CC058DA0A44A210006FE533 /* navLeftPressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = navLeftPressed.png; sourceTree = "<group>"; };
+               1CC058DB0A44A210006FE533 /* navRightDisabled.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = navRightDisabled.png; sourceTree = "<group>"; };
+               1CC058DC0A44A210006FE533 /* navRightNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = navRightNormal.png; sourceTree = "<group>"; };
+               1CC058DD0A44A210006FE533 /* navRightPressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = navRightPressed.png; sourceTree = "<group>"; };
+               1CC058E00A44A210006FE533 /* programCounter.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = programCounter.tif; sourceTree = "<group>"; };
+               1CC058E10A44A210006FE533 /* splitterBar.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = splitterBar.tif; sourceTree = "<group>"; };
+               1CC058E20A44A210006FE533 /* splitterDimple.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = splitterDimple.tif; sourceTree = "<group>"; };
+               1CC058E40A44A210006FE533 /* continue.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = continue.tif; sourceTree = "<group>"; };
+               1CC058E60A44A210006FE533 /* finishFunction.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = finishFunction.tif; sourceTree = "<group>"; };
+               1CC058E70A44A210006FE533 /* pause.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = pause.tif; sourceTree = "<group>"; };
+               1CC058E80A44A210006FE533 /* run.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = run.tif; sourceTree = "<group>"; };
+               1CC058E90A44A210006FE533 /* step.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = step.tif; sourceTree = "<group>"; };
+               1CC058EA0A44A210006FE533 /* stepOver.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = stepOver.tif; sourceTree = "<group>"; };
+               1CC058EB0A44A210006FE533 /* stop.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = stop.tif; sourceTree = "<group>"; };
+               1CC0596F0A44A485006FE533 /* toolbarBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = toolbarBackground.png; sourceTree = "<group>"; };
+               2A37F4ACFDCFA73011CA2CEA /* DebuggerDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DebuggerDocument.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               2A37F4AEFDCFA73011CA2CEA /* DebuggerDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebuggerDocument.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               2A37F4B0FDCFA73011CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               2A37F4B5FDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/Debugger.nib; sourceTree = "<group>"; };
+               2A37F4B7FDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
+               2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+               2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+               32DBCF750370BD2300C91783 /* Drosera.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Drosera.pch; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
+               8D15AC370486D014006FF6A4 /* Drosera.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Drosera.app; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+               8D15AC330486D014006FF6A4 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */,
+                               1C27ABC60A413B720016ECF4 /* WebKit.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+               1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */,
+                               1C27ABC50A413B720016ECF4 /* WebKit.framework */,
+                       );
+                       name = "Linked Frameworks";
+                       sourceTree = "<group>";
+               };
+               1058C7A8FEA54F5311CA2CBB /* Other Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */,
+                               13E42FBA07B3F13500E4EEF1 /* CoreData.framework */,
+                               2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */,
+                       );
+                       name = "Other Frameworks";
+                       sourceTree = "<group>";
+               };
+               19C28FB0FE9D524F11CA2CBB /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               8D15AC370486D014006FF6A4 /* Drosera.app */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+               1CC058B70A44A210006FE533 /* Images */ = {
+                       isa = PBXGroup;
+                       children = (
+                               1C4FF7530A44F6320000D05D /* gutter.png */,
+                               1C4FF91F0A45F3520000D05D /* glossyHeader.png */,
+                               1C4FF94D0A45F5060000D05D /* popUpArrows.png */,
+                               1CC058B80A44A210006FE533 /* breakPoint.tif */,
+                               1CC058B90A44A210006FE533 /* breakPointDisabled.tif */,
+                               1CC058E00A44A210006FE533 /* programCounter.tif */,
+                               1C4FFE5C0A466F5D0000D05D /* programCounterBreakPoint.tif */,
+                               1C4FFE5D0A466F5D0000D05D /* programCounterBreakPointDisabled.tif */,
+                               1CC058CC0A44A210006FE533 /* glossyFooterFill.tif */,
+                               1CC058D80A44A210006FE533 /* navLeftDisabled.png */,
+                               1CC058D90A44A210006FE533 /* navLeftNormal.png */,
+                               1CC058DA0A44A210006FE533 /* navLeftPressed.png */,
+                               1CC058DB0A44A210006FE533 /* navRightDisabled.png */,
+                               1CC058DC0A44A210006FE533 /* navRightNormal.png */,
+                               1CC058DD0A44A210006FE533 /* navRightPressed.png */,
+                               1CC058E10A44A210006FE533 /* splitterBar.tif */,
+                               1CC058E20A44A210006FE533 /* splitterDimple.tif */,
+                               1CC058E60A44A210006FE533 /* finishFunction.tif */,
+                               1CC058E40A44A210006FE533 /* continue.tif */,
+                               1CC058E70A44A210006FE533 /* pause.tif */,
+                               1CC058E80A44A210006FE533 /* run.tif */,
+                               1CC058E90A44A210006FE533 /* step.tif */,
+                               1CC058EA0A44A210006FE533 /* stepOver.tif */,
+                               1CC058EB0A44A210006FE533 /* stop.tif */,
+                               1CC0596F0A44A485006FE533 /* toolbarBackground.png */,
+                       );
+                       path = Images;
+                       sourceTree = "<group>";
+               };
+               2A37F4AAFDCFA73011CA2CEA /* SafariBug */ = {
+                       isa = PBXGroup;
+                       children = (
+                               2A37F4ABFDCFA73011CA2CEA /* Classes */,
+                               2A37F4AFFDCFA73011CA2CEA /* Other Sources */,
+                               2A37F4B8FDCFA73011CA2CEA /* Resources */,
+                               2A37F4C3FDCFA73011CA2CEA /* Frameworks */,
+                               19C28FB0FE9D524F11CA2CBB /* Products */,
+                       );
+                       name = SafariBug;
+                       sourceTree = "<group>";
+               };
+               2A37F4ABFDCFA73011CA2CEA /* Classes */ = {
+                       isa = PBXGroup;
+                       children = (
+                               1C74F1840A47DEE600FEC632 /* DebuggerApplication.m */,
+                               1C74F1830A47DEE600FEC632 /* DebuggerApplication.h */,
+                               2A37F4ACFDCFA73011CA2CEA /* DebuggerDocument.m */,
+                               2A37F4AEFDCFA73011CA2CEA /* DebuggerDocument.h */,
+                               1C27AC230A413D660016ECF4 /* debugger.js */,
+                               1C27AC1F0A413D2D0016ECF4 /* debugger.html */,
+                               1C4FF7430A44F5260000D05D /* debugger.css */,
+                               1C74F0340A47BF8300FEC632 /* viewer.html */,
+                               1C74F03A0A47BFD600FEC632 /* viewer.css */,
+                       );
+                       name = Classes;
+                       sourceTree = "<group>";
+                       tabWidth = 8;
+                       usesTabs = 0;
+               };
+               2A37F4AFFDCFA73011CA2CEA /* Other Sources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               32DBCF750370BD2300C91783 /* Drosera.pch */,
+                               2A37F4B0FDCFA73011CA2CEA /* main.m */,
+                       );
+                       name = "Other Sources";
+                       sourceTree = "<group>";
+                       tabWidth = 8;
+                       usesTabs = 0;
+               };
+               2A37F4B8FDCFA73011CA2CEA /* Resources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */,
+                               2A37F4B4FDCFA73011CA2CEA /* Debugger.nib */,
+                               8D15AC360486D014006FF6A4 /* Info.plist */,
+                               1CC058B70A44A210006FE533 /* Images */,
+                       );
+                       name = Resources;
+                       sourceTree = "<group>";
+                       tabWidth = 8;
+                       usesTabs = 0;
+               };
+               2A37F4C3FDCFA73011CA2CEA /* Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */,
+                               1058C7A8FEA54F5311CA2CBB /* Other Frameworks */,
+                       );
+                       name = Frameworks;
+                       sourceTree = "<group>";
+               };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+               8D15AC270486D014006FF6A4 /* Drosera */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = C05733C708A9546B00998B17 /* Build configuration list for PBXNativeTarget "Drosera" */;
+                       buildPhases = (
+                               8D15AC2B0486D014006FF6A4 /* Resources */,
+                               8D15AC300486D014006FF6A4 /* Sources */,
+                               8D15AC330486D014006FF6A4 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = Drosera;
+                       productInstallPath = "$(HOME)/Applications";
+                       productName = SafariBug;
+                       productReference = 8D15AC370486D014006FF6A4 /* Drosera.app */;
+                       productType = "com.apple.product-type.application";
+               };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+               2A37F4A9FDCFA73011CA2CEA /* Project object */ = {
+                       isa = PBXProject;
+                       buildConfigurationList = C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "Drosera" */;
+                       hasScannedForEncodings = 1;
+                       mainGroup = 2A37F4AAFDCFA73011CA2CEA /* SafariBug */;
+                       projectDirPath = "";
+                       targets = (
+                               8D15AC270486D014006FF6A4 /* Drosera */,
+                       );
+               };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+               8D15AC2B0486D014006FF6A4 /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               8D15AC2D0486D014006FF6A4 /* MainMenu.nib in Resources */,
+                               8D15AC2E0486D014006FF6A4 /* Debugger.nib in Resources */,
+                               1C27AC200A413D2D0016ECF4 /* debugger.html in Resources */,
+                               1C27B1260A421D870016ECF4 /* debugger.js in Resources */,
+                               1CC058EE0A44A210006FE533 /* breakPoint.tif in Resources */,
+                               1CC058EF0A44A210006FE533 /* breakPointDisabled.tif in Resources */,
+                               1CC059020A44A210006FE533 /* glossyFooterFill.tif in Resources */,
+                               1CC0590E0A44A210006FE533 /* navLeftDisabled.png in Resources */,
+                               1CC0590F0A44A210006FE533 /* navLeftNormal.png in Resources */,
+                               1CC059100A44A210006FE533 /* navLeftPressed.png in Resources */,
+                               1CC059110A44A210006FE533 /* navRightDisabled.png in Resources */,
+                               1CC059120A44A210006FE533 /* navRightNormal.png in Resources */,
+                               1CC059130A44A210006FE533 /* navRightPressed.png in Resources */,
+                               1CC059160A44A210006FE533 /* programCounter.tif in Resources */,
+                               1CC059170A44A210006FE533 /* splitterBar.tif in Resources */,
+                               1CC059180A44A210006FE533 /* splitterDimple.tif in Resources */,
+                               1CC0591A0A44A210006FE533 /* continue.tif in Resources */,
+                               1CC0591C0A44A210006FE533 /* finishFunction.tif in Resources */,
+                               1CC0591D0A44A210006FE533 /* pause.tif in Resources */,
+                               1CC0591E0A44A210006FE533 /* run.tif in Resources */,
+                               1CC0591F0A44A210006FE533 /* step.tif in Resources */,
+                               1CC059200A44A210006FE533 /* stepOver.tif in Resources */,
+                               1CC059210A44A210006FE533 /* stop.tif in Resources */,
+                               1CC059700A44A485006FE533 /* toolbarBackground.png in Resources */,
+                               1C4FF7440A44F52C0000D05D /* debugger.css in Resources */,
+                               1C4FF7540A44F6320000D05D /* gutter.png in Resources */,
+                               1C4FF9210A45F3520000D05D /* glossyHeader.png in Resources */,
+                               1C4FF94E0A45F5060000D05D /* popUpArrows.png in Resources */,
+                               1C4FFE5E0A466F5D0000D05D /* programCounterBreakPoint.tif in Resources */,
+                               1C4FFE5F0A466F5D0000D05D /* programCounterBreakPointDisabled.tif in Resources */,
+                               1C74F0350A47BF8300FEC632 /* viewer.html in Resources */,
+                               1C74F04B0A47BFE800FEC632 /* viewer.css in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+               8D15AC300486D014006FF6A4 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               8D15AC310486D014006FF6A4 /* DebuggerDocument.m in Sources */,
+                               8D15AC320486D014006FF6A4 /* main.m in Sources */,
+                               1C74F1850A47DEE600FEC632 /* DebuggerApplication.m in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+               2A37F4B4FDCFA73011CA2CEA /* Debugger.nib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               2A37F4B5FDCFA73011CA2CEA /* English */,
+                       );
+                       name = Debugger.nib;
+                       sourceTree = "<group>";
+               };
+               2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               2A37F4B7FDCFA73011CA2CEA /* English */,
+                       );
+                       name = MainMenu.nib;
+                       sourceTree = "<group>";
+               };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+               C05733C808A9546B00998B17 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               COPY_PHASE_STRIP = NO;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               GCC_PREFIX_HEADER = Drosera.pch;
+                               INFOPLIST_FILE = Info.plist;
+                               PRODUCT_NAME = Drosera;
+                               WRAPPER_EXTENSION = app;
+                               ZERO_LINK = NO;
+                       };
+                       name = Debug;
+               };
+               C05733C908A9546B00998B17 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_PREFIX_HEADER = Drosera.pch;
+                               INFOPLIST_FILE = Info.plist;
+                               PRODUCT_NAME = Drosera;
+                               WRAPPER_EXTENSION = app;
+                               ZERO_LINK = NO;
+                       };
+                       name = Release;
+               };
+               C05733CC08A9546B00998B17 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               PREBINDING = NO;
+                       };
+                       name = Debug;
+               };
+               C05733CD08A9546B00998B17 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               PREBINDING = NO;
+                       };
+                       name = Release;
+               };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+               C05733C708A9546B00998B17 /* Build configuration list for PBXNativeTarget "Drosera" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               C05733C808A9546B00998B17 /* Debug */,
+                               C05733C908A9546B00998B17 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "Drosera" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               C05733CC08A9546B00998B17 /* Debug */,
+                               C05733CD08A9546B00998B17 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+/* End XCConfigurationList section */
+       };
+       rootObject = 2A37F4A9FDCFA73011CA2CEA /* Project object */;
+}
diff --git a/WebKitTools/Drosera/English.lproj/Debugger.nib/classes.nib b/WebKitTools/Drosera/English.lproj/Debugger.nib/classes.nib
new file mode 100644 (file)
index 0000000..3e0e4cb
--- /dev/null
@@ -0,0 +1,12 @@
+{
+    IBClasses = (
+        {
+            CLASS = DebuggerDocument; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {server = id; webView = WebView; }; 
+            SUPERCLASS = NSWindowController; 
+        }, 
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/WebKitTools/Drosera/English.lproj/Debugger.nib/info.nib b/WebKitTools/Drosera/English.lproj/Debugger.nib/info.nib
new file mode 100644 (file)
index 0000000..6d07d21
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>751 149 356 240 0 0 1440 878 </string>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>5</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I1119</string>
+</dict>
+</plist>
diff --git a/WebKitTools/Drosera/English.lproj/Debugger.nib/keyedobjects.nib b/WebKitTools/Drosera/English.lproj/Debugger.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..839ad33
Binary files /dev/null and b/WebKitTools/Drosera/English.lproj/Debugger.nib/keyedobjects.nib differ
diff --git a/WebKitTools/Drosera/English.lproj/MainMenu.nib/classes.nib b/WebKitTools/Drosera/English.lproj/MainMenu.nib/classes.nib
new file mode 100644 (file)
index 0000000..d289e3a
--- /dev/null
@@ -0,0 +1,13 @@
+{
+    IBClasses = (
+        {
+            ACTIONS = {attach = id; showAttachPanel = id; }; 
+            CLASS = DebuggerApplication; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {attachButton = NSButton; attachTable = NSTableView; attachWindow = NSPanel; }; 
+            SUPERCLASS = NSObject; 
+        }, 
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
+    ); 
+    IBVersion = 1; 
+}
\ No newline at end of file
diff --git a/WebKitTools/Drosera/English.lproj/MainMenu.nib/info.nib b/WebKitTools/Drosera/English.lproj/MainMenu.nib/info.nib
new file mode 100644 (file)
index 0000000..0e4181e
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IBDocumentLocation</key>
+       <string>107 71 356 240 0 0 1440 878 </string>
+       <key>IBEditorPositions</key>
+       <dict>
+               <key>29</key>
+               <string>159 498 282 44 0 0 1440 878 </string>
+       </dict>
+       <key>IBFramework Version</key>
+       <string>446.1</string>
+       <key>IBOpenObjects</key>
+       <array>
+               <integer>217</integer>
+       </array>
+       <key>IBSystem Version</key>
+       <string>8I1119</string>
+</dict>
+</plist>
diff --git a/WebKitTools/Drosera/English.lproj/MainMenu.nib/keyedobjects.nib b/WebKitTools/Drosera/English.lproj/MainMenu.nib/keyedobjects.nib
new file mode 100644 (file)
index 0000000..bce298e
Binary files /dev/null and b/WebKitTools/Drosera/English.lproj/MainMenu.nib/keyedobjects.nib differ
diff --git a/WebKitTools/Drosera/Images/breakPoint.tif b/WebKitTools/Drosera/Images/breakPoint.tif
new file mode 100644 (file)
index 0000000..95431b4
Binary files /dev/null and b/WebKitTools/Drosera/Images/breakPoint.tif differ
diff --git a/WebKitTools/Drosera/Images/breakPointDisabled.tif b/WebKitTools/Drosera/Images/breakPointDisabled.tif
new file mode 100644 (file)
index 0000000..2000bd2
Binary files /dev/null and b/WebKitTools/Drosera/Images/breakPointDisabled.tif differ
diff --git a/WebKitTools/Drosera/Images/continue.tif b/WebKitTools/Drosera/Images/continue.tif
new file mode 100644 (file)
index 0000000..58b9893
Binary files /dev/null and b/WebKitTools/Drosera/Images/continue.tif differ
diff --git a/WebKitTools/Drosera/Images/finishFunction.tif b/WebKitTools/Drosera/Images/finishFunction.tif
new file mode 100644 (file)
index 0000000..af75e60
Binary files /dev/null and b/WebKitTools/Drosera/Images/finishFunction.tif differ
diff --git a/WebKitTools/Drosera/Images/glossyFooterFill.tif b/WebKitTools/Drosera/Images/glossyFooterFill.tif
new file mode 100644 (file)
index 0000000..d5ea4d4
Binary files /dev/null and b/WebKitTools/Drosera/Images/glossyFooterFill.tif differ
diff --git a/WebKitTools/Drosera/Images/glossyHeader.png b/WebKitTools/Drosera/Images/glossyHeader.png
new file mode 100644 (file)
index 0000000..8c80b6b
Binary files /dev/null and b/WebKitTools/Drosera/Images/glossyHeader.png differ
diff --git a/WebKitTools/Drosera/Images/gradientBackground.png b/WebKitTools/Drosera/Images/gradientBackground.png
new file mode 100644 (file)
index 0000000..c0ce0a5
Binary files /dev/null and b/WebKitTools/Drosera/Images/gradientBackground.png differ
diff --git a/WebKitTools/Drosera/Images/gutter.png b/WebKitTools/Drosera/Images/gutter.png
new file mode 100644 (file)
index 0000000..9b698c1
Binary files /dev/null and b/WebKitTools/Drosera/Images/gutter.png differ
diff --git a/WebKitTools/Drosera/Images/navLeftDisabled.png b/WebKitTools/Drosera/Images/navLeftDisabled.png
new file mode 100644 (file)
index 0000000..edd7c26
Binary files /dev/null and b/WebKitTools/Drosera/Images/navLeftDisabled.png differ
diff --git a/WebKitTools/Drosera/Images/navLeftNormal.png b/WebKitTools/Drosera/Images/navLeftNormal.png
new file mode 100644 (file)
index 0000000..9a14bbf
Binary files /dev/null and b/WebKitTools/Drosera/Images/navLeftNormal.png differ
diff --git a/WebKitTools/Drosera/Images/navLeftPressed.png b/WebKitTools/Drosera/Images/navLeftPressed.png
new file mode 100644 (file)
index 0000000..840a4b4
Binary files /dev/null and b/WebKitTools/Drosera/Images/navLeftPressed.png differ
diff --git a/WebKitTools/Drosera/Images/navRightDisabled.png b/WebKitTools/Drosera/Images/navRightDisabled.png
new file mode 100644 (file)
index 0000000..6057aae
Binary files /dev/null and b/WebKitTools/Drosera/Images/navRightDisabled.png differ
diff --git a/WebKitTools/Drosera/Images/navRightNormal.png b/WebKitTools/Drosera/Images/navRightNormal.png
new file mode 100644 (file)
index 0000000..936cd91
Binary files /dev/null and b/WebKitTools/Drosera/Images/navRightNormal.png differ
diff --git a/WebKitTools/Drosera/Images/navRightPressed.png b/WebKitTools/Drosera/Images/navRightPressed.png
new file mode 100644 (file)
index 0000000..faf78ce
Binary files /dev/null and b/WebKitTools/Drosera/Images/navRightPressed.png differ
diff --git a/WebKitTools/Drosera/Images/pause.tif b/WebKitTools/Drosera/Images/pause.tif
new file mode 100644 (file)
index 0000000..460aeed
Binary files /dev/null and b/WebKitTools/Drosera/Images/pause.tif differ
diff --git a/WebKitTools/Drosera/Images/popUpArrows.png b/WebKitTools/Drosera/Images/popUpArrows.png
new file mode 100644 (file)
index 0000000..f47eaa5
Binary files /dev/null and b/WebKitTools/Drosera/Images/popUpArrows.png differ
diff --git a/WebKitTools/Drosera/Images/programCounter.tif b/WebKitTools/Drosera/Images/programCounter.tif
new file mode 100644 (file)
index 0000000..e65d549
Binary files /dev/null and b/WebKitTools/Drosera/Images/programCounter.tif differ
diff --git a/WebKitTools/Drosera/Images/programCounterBreakPoint.tif b/WebKitTools/Drosera/Images/programCounterBreakPoint.tif
new file mode 100644 (file)
index 0000000..093b639
Binary files /dev/null and b/WebKitTools/Drosera/Images/programCounterBreakPoint.tif differ
diff --git a/WebKitTools/Drosera/Images/programCounterBreakPointDisabled.tif b/WebKitTools/Drosera/Images/programCounterBreakPointDisabled.tif
new file mode 100644 (file)
index 0000000..1c1a699
Binary files /dev/null and b/WebKitTools/Drosera/Images/programCounterBreakPointDisabled.tif differ
diff --git a/WebKitTools/Drosera/Images/run.tif b/WebKitTools/Drosera/Images/run.tif
new file mode 100644 (file)
index 0000000..f9e815f
Binary files /dev/null and b/WebKitTools/Drosera/Images/run.tif differ
diff --git a/WebKitTools/Drosera/Images/splitterBar.tif b/WebKitTools/Drosera/Images/splitterBar.tif
new file mode 100644 (file)
index 0000000..0e7425d
Binary files /dev/null and b/WebKitTools/Drosera/Images/splitterBar.tif differ
diff --git a/WebKitTools/Drosera/Images/splitterDimple.tif b/WebKitTools/Drosera/Images/splitterDimple.tif
new file mode 100644 (file)
index 0000000..d112854
Binary files /dev/null and b/WebKitTools/Drosera/Images/splitterDimple.tif differ
diff --git a/WebKitTools/Drosera/Images/step.tif b/WebKitTools/Drosera/Images/step.tif
new file mode 100644 (file)
index 0000000..457f1cd
Binary files /dev/null and b/WebKitTools/Drosera/Images/step.tif differ
diff --git a/WebKitTools/Drosera/Images/stepOver.tif b/WebKitTools/Drosera/Images/stepOver.tif
new file mode 100644 (file)
index 0000000..6c18c71
Binary files /dev/null and b/WebKitTools/Drosera/Images/stepOver.tif differ
diff --git a/WebKitTools/Drosera/Images/stop.tif b/WebKitTools/Drosera/Images/stop.tif
new file mode 100644 (file)
index 0000000..a65c6df
Binary files /dev/null and b/WebKitTools/Drosera/Images/stop.tif differ
diff --git a/WebKitTools/Drosera/Images/toolbarBackground.png b/WebKitTools/Drosera/Images/toolbarBackground.png
new file mode 100644 (file)
index 0000000..018e001
Binary files /dev/null and b/WebKitTools/Drosera/Images/toolbarBackground.png differ
diff --git a/WebKitTools/Drosera/Info.plist b/WebKitTools/Drosera/Info.plist
new file mode 100644 (file)
index 0000000..05d575c
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleName</key>
+       <string>${PRODUCT_NAME}</string>
+       <key>CFBundleExecutable</key>
+       <string>${EXECUTABLE_NAME}</string>
+       <key>CFBundleIdentifier</key>
+       <string>com.apple.drosera</string>
+       <key>CFBundleVersion</key>
+       <string>1.0</string>
+       <key>CFBundleIconFile</key>
+       <string></string>
+       <key>CFBundlePackageType</key>
+       <string>APPL</string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>NSMainNibFile</key>
+       <string>MainMenu</string>
+       <key>NSPrincipalClass</key>
+       <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/WebKitTools/Drosera/debugger.css b/WebKitTools/Drosera/debugger.css
new file mode 100644 (file)
index 0000000..1b7f859
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+img { padding: 0; margin: 0; }
+body { margin: 0; padding: 0; }
+
+#toolbar { background-image: url(toolbarBackground.png); background-repeat: repeat-x; background-position: bottom; height: 32px; padding: 2px 5px 2px 5px; border-bottom: 1px solid #939393 }
+#toolbar * { vertical-align: middle }
+
+#main { position: absolute; top: 37px; bottom: 0; left: 0; right: 0; }
+#info { position: absolute; top: 0; height: 150px; left: 0; right: 0; }
+#divider { cursor: move; position: absolute; bottom: 0; left: 0; right: 0; background: url(splitterDimple.tif) 50% no-repeat, url(splitterBar.tif) repeat-x; height: 10px }
+#body { position: absolute; top: 150px; left: 0; right: 0; bottom: 0; }
+#sourcesContainer { position: absolute; top: 16px; left: 0; right: 0; bottom: 21px; background-color: white; }
+#sources { width: 100%; height: 100% }
+#header { vertical-align: top; height: 16px; box-sizing: border-box; border-bottom: 1px solid #aaa; background: url(glossyHeader.png) repeat-x; position: absolute; top: 0; left: 0; right: 0; }
+#header > * { vertical-align: top; }
+#footer { height: 21px; box-sizing: border-box; border-top: 1px solid #aaa; background: url(glossyFooterFill.tif) repeat-x; position: absolute; bottom: 0; left: 0; right: 0; }
+
+#files {
+    opacity: 0;
+    position: absolute;
+    top: -2px;
+    left: -3px;
+    right: 0;
+    z-index: 10;
+    margin: 0;
+    padding: 0;
+}
+
+button.popup {
+    background: url(popUpArrows.png) right no-repeat;
+    border: none;
+    height: 15px;
+    font-size: 10px;
+    line-height: 10px;
+    padding: 0 20px 0 5px;
+    margin: 0;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    position: relative;
+    min-width: 100px;
+    max-width: 350px;
+}
+
+#filesPopupButtonContent {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    width: 100%;
+    height: 100%;
+    line-height: 12px;
+    text-align: left;
+}
+
+.placeholder { color: rgba(0, 0, 0, 0.6) }
+
+button.nav {
+    position: relative;
+    width: 32px;
+    height: 15px;
+    border: none;
+    margin: 0;
+    padding: 0;
+    border-left: 1px solid transparent;
+    border-right: 1px solid #aaa;
+}
+
+button.nav.right {
+    background: url(navRightNormal.png) no-repeat;
+}
+
+button.nav.right:disabled, button.nav.right:disabled:active {
+    border-left: 1px solid transparent;
+    background: url(navRightDisabled.png) no-repeat;
+}
+
+button.nav.right:active {
+    border-left: 1px solid rgba(0, 0, 0, 0.3);
+    background: url(navRightPressed.png) no-repeat;
+}
+
+button.nav.left {
+    background: url(navLeftNormal.png) no-repeat;
+}
+
+button.nav.left:disabled, button.nav.left:disabled:active {
+    border-left: 1px solid transparent;
+    background: url(navLeftDisabled.png) no-repeat;
+}
+
+button.nav.left:active {
+    margin-left: 0;
+    border-left: 1px solid rgba(0, 0, 0, 0.3);
+    background: url(navLeftPressed.png) no-repeat;
+}
diff --git a/WebKitTools/Drosera/debugger.html b/WebKitTools/Drosera/debugger.html
new file mode 100644 (file)
index 0000000..aad3c54
--- /dev/null
@@ -0,0 +1,57 @@
+<!--
+Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1.  Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer. 
+2.  Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution. 
+3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+    its contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission. 
+
+THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <title>JavaScript Debugger</title>
+    <script type="text/javascript" src="debugger.js"></script> 
+    <style type="text/css">
+        @import "debugger.css";
+    </style>
+</head>
+<body onload="loaded()">
+<div id="toolbar">
+<img src="pause.tif" onclick="pause()"><img src="continue.tif" onclick="resume()"><img src="step.tif" onclick="step()">
+</div>
+<div id="main">
+<div id="info">
+<div id="console"></div>
+<div id="divider"></div>
+</div>
+<div id="body">
+<div id="header">
+<button id="navFileLeftButton" class="nav left" disabled onclick="navFilePrevious(this)"></button><button id="navFileRightButton" class="nav right" disabled onclick="navFileNext(this)"></button>
+<button class="popup"><select size="1" id="files" onchange="switchFile()"></select><div id="filesPopupButtonContent"><span class="placeholder">no files loaded</span></div></button>
+</div>
+<div id="sourcesContainer"><iframe id="sources" src="viewer.html"></iframe></div>
+<div id="footer"></div>
+</div>
+</div>
+</body>
+</html>
diff --git a/WebKitTools/Drosera/debugger.js b/WebKitTools/Drosera/debugger.js
new file mode 100644 (file)
index 0000000..38af2b9
--- /dev/null
@@ -0,0 +1,455 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+var sourceFiles = new Array();
+var currentSourceId = -1;
+var currentRow = null;
+var previousFiles = new Array();
+var nextFiles = new Array();
+
+function sleep(numberMillis) {
+    var now = new Date();
+    var exitTime = now.getTime() + numberMillis;
+    while (true) {
+        now = new Date();
+        if (now.getTime() > exitTime)
+            return;
+    }
+}
+
+function keyPressed(event) {
+    if (event.charCode == 112) pause();
+    else if (event.charCode == 99) resume();
+    else if (event.charCode == 115) step();
+}
+
+function dividerDragStart(event) {
+    var element = document.getElementById("divider");
+    element.dragging = true;
+    element.dragLastY = event.clientY + window.scrollY;
+    document.addEventListener("mousemove", dividerDrag, true);
+    document.addEventListener("mouseup", dividerDragEnd, true);
+    event.preventDefault();
+}
+
+function dividerDrag(event) {
+    var element = document.getElementById("divider");
+    if (document.getElementById("divider").dragging == true) {
+        var main = document.getElementById("main");
+        var top = document.getElementById("info");
+        var bottom = document.getElementById("body");
+        var y = event.clientY + window.scrollY;
+        var delta = element.dragLastY - y;
+
+        var newHeight = top.clientHeight - delta;
+        if (newHeight < main.clientHeight * 0.25)
+            newHeight = main.clientHeight * 0.25;
+        else if (newHeight > main.clientHeight * 0.75)
+            newHeight = main.clientHeight * 0.75;
+
+        top.style.height = newHeight + "px";
+        bottom.style.top = newHeight + "px";
+
+        element.dragLastY = y;
+        event.preventDefault();
+    }
+}
+
+function dividerDragEnd(event) {
+    var element = document.getElementById("divider");
+    element.dragging = false;
+    document.removeEventListener("mousemove", dividerDrag, true);
+    document.removeEventListener("mouseup", dividerDragEnd, true);
+}
+
+function loaded() {
+    window.addEventListener("keypress", keyPressed, false);
+    document.getElementById("divider").addEventListener("mousedown", dividerDragStart, false);
+}
+
+function isPaused() {
+    return DebuggerDocument.isPaused();
+}
+
+function pause() {
+    DebuggerDocument.pause();
+}
+
+function resume()
+{
+    if (currentRow) {
+        removeStyleClass(currentRow, "current");
+        currentRow = null;
+    }
+
+    DebuggerDocument.resume();
+}
+
+function step()
+{
+    DebuggerDocument.step();
+}
+
+function hasStyleClass(element,className)
+{
+    return ( element.className.indexOf(className) != -1 );
+}
+
+function addStyleClass(element,className)
+{
+    if (!hasStyleClass(element,className))
+        element.className += ( element.className.length ? " " + className : className );
+}
+
+function removeStyleClass(element,className)
+{
+    if (hasStyleClass(element,className))
+        element.className = element.className.replace(className, "");
+}
+
+function addBreakPoint(event)
+{
+    var row = event.target.parentNode;
+    if (hasStyleClass(row, "breakpoint")) {
+        if (hasStyleClass(row, "disabled")) {
+            removeStyleClass(row, "disabled");
+            sourceFiles[currentSourceId].breakpoints[parseInt(event.target.title)] = 1;
+        } else {
+            addStyleClass(row, "disabled");
+            sourceFiles[currentSourceId].breakpoints[parseInt(event.target.title)] = -1;
+        }
+    } else {
+        addStyleClass(row, "breakpoint");
+        removeStyleClass(row, "disabled");
+        sourceFiles[currentSourceId].breakpoints[parseInt(event.target.title)] = 1;
+    }
+}
+
+function totalOffsetTop(element,stop)
+{
+    var currentTop = 0;
+    if (element.offsetParent) {
+        while (element.offsetParent) {
+            currentTop += element.offsetTop
+            element = element.offsetParent;
+            if (element == stop)
+                break;
+        }
+    }
+    return currentTop;
+}
+
+function switchFile()
+{
+    var files = document.getElementById("files");
+    loadSource(files.options[files.selectedIndex].value,true);
+}
+
+function syntaxHighlight(code)
+{
+    var keywords = { 'abstract': 1, 'boolean': 1, 'break': 1, 'byte': 1, 'case': 1, 'catch': 1, 'char': 1, 'class': 1, 'const': 1, 'continue': 1, 'debugger': 1, 'default': 1, 'delete': 1, 'do': 1, 'double': 1, 'else': 1, 'enum': 1, 'export': 1, 'extends': 1, 'false': 1, 'final': 1, 'finally': 1, 'float': 1, 'for': 1, 'function': 1, 'goto': 1, 'if': 1, 'implements': 1, 'import': 1, 'in': 1, 'instanceof': 1, 'int': 1, 'interface': 1, 'long': 1, 'native': 1, 'new': 1, 'null': 1, 'package': 1, 'private': 1, 'protected': 1, 'public': 1, 'return': 1, 'short': 1, 'static': 1, 'super': 1, 'switch': 1, 'synchronized': 1, 'this': 1, 'throw': 1, 'throws': 1, 'transient': 1, 'true': 1, 'try': 1, 'typeof': 1, 'var': 1, 'void': 1, 'volatile': 1, 'while': 1, 'with': 1 };
+
+    function echoChar(c) {
+        if (c == '<')
+            result += '&lt;';
+        else if (c == '>')
+            result += '&gt;';
+        else if (c == '&')
+            result += '&amp;';
+        else if (c == '\t')
+            result += '    ';
+        else
+            result += c;
+    }
+
+    function isDigit(number) {
+        var string = "1234567890";
+        if (string.indexOf(number) != -1)
+            return true;
+        return false;
+    }
+
+    function isHex(hex) {
+        var string = "1234567890abcdefABCDEF";
+        if (string.indexOf(hex) != -1)
+            return true;
+        return false;
+    }
+
+    function isLetter(letter) {
+        var string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+        if (string.indexOf(letter) != -1)
+            return true;
+        return false;
+    }
+
+    var result = "";
+    var cPrev = "";
+    var c = "";
+    var cNext = "";
+    for (var i = 0; i < code.length; i++) {
+        cPrev = c;
+        c = code.charAt(i);
+        cNext = code.charAt(i + 1);
+
+        if (c == "/" && cNext == "*") {
+            result += "<span class=\"comment\">";
+            echoChar(c);
+            echoChar(cNext);
+            for (i += 2; i < code.length; i++) {
+                c = code.charAt(i);
+                if (c == "\n")
+                    result += "</span>";
+                echoChar(c);
+                if (c == "\n")
+                    result += "<span class=\"comment\">";
+                if (cPrev == "*" && c == "/")
+                    break;
+                cPrev = c;
+            }
+            result += "</span>";
+            continue;
+        } else if (c == "/" && cNext == "/") {
+            result += "<span class=\"comment\">";
+            echoChar(c);
+            echoChar(cNext);
+            for (i += 2; i < code.length; i++) {
+                c = code.charAt(i);
+                if (c == "\n")
+                    break;
+                echoChar(c);
+            }
+            result += "</span>";
+            echoChar(c);
+            continue;
+        } else if (c == "\"" || c == "'") {
+            var instringtype = c;
+            var stringstart = i;
+            result += "<span class=\"string\">";
+            echoChar(c);
+            for (i += 1; i < code.length; i++) {
+                c = code.charAt(i);
+                if (stringstart < (i - 1) && cPrev == instringtype && code.charAt(i - 2) != "\\")
+                    break;
+                echoChar(c);
+                cPrev = c;
+            }
+            result += "</span>";
+            echoChar(c);
+            continue;
+        } else if (c == "0" && cNext == "x" && (i == 0 || (!isLetter(cPrev) && !isDigit(cPrev)))) {
+            result += "<span class=\"number\">";
+            echoChar(c);
+            echoChar(cNext);
+            for (i += 2; i < code.length; i++) {
+                c = code.charAt(i);
+                if (!isHex(c))
+                    break;
+                echoChar(c);
+            }
+            result += "</span>";
+            echoChar(c);
+            continue;
+        } else if ((isDigit(c) || ((c == "-" || c == ".") && isDigit(cNext))) && (i == 0 || (!isLetter(cPrev) && !isDigit(cPrev)))) {
+            result += "<span class=\"number\">";
+            echoChar(c);
+            for (i += 1; i < code.length; i++) {
+                c = code.charAt(i);
+                if (!isDigit(c) && c != ".")
+                    break;
+                echoChar(c);
+            }
+            result += "</span>";
+            echoChar(c);
+            continue;
+        } else if(isLetter(c) && (i == 0 || !isLetter(cPrev))) {
+            var keyword = c;
+            var cj = "";
+            for (var j = i + 1; j < i + 12 && j < code.length; j++) {
+                cj = code.charAt(j);
+                if (!isLetter(cj))
+                    break;
+                keyword += cj;
+            }
+
+            if (keywords[keyword]) {
+                result += "<span class=\"keyword\">" + keyword + "</span>";
+                i += keyword.length - 1;
+                continue;
+            }
+        }
+
+        echoChar(c);
+    }
+
+    return result;
+}
+
+function navFilePrevious(element)
+{
+    if (element.disabled)
+        return;
+    var lastSource = previousFiles.pop();
+    if (currentSourceId != -1)
+        nextFiles.unshift(currentSourceId);
+    loadSource(lastSource, false);
+}
+
+function navFileNext(element)
+{
+    if (element.disabled)
+        return;
+    var lastSource = nextFiles.shift();
+    if (currentSourceId != -1)
+        previousFiles.push(currentSourceId);
+    loadSource(lastSource, false);
+}
+
+function loadSource(sourceId,manageNavLists)
+{
+    if (!sourceFiles[sourceId])
+        return;
+
+    if (currentSourceId != -1 && sourceFiles[currentSourceId] && sourceFiles[currentSourceId].element)
+        sourceFiles[currentSourceId].element.style.display = "none";
+
+    if (!sourceFiles[sourceId].loaded) {
+        sourceFiles[sourceId].lines = sourceFiles[sourceId].source.split("\n");
+
+        var sourcesDocument = document.getElementById("sources").contentDocument;
+        var sourcesDiv = sourcesDocument.body;
+        var sourceDiv = sourcesDocument.createElement("div");
+        sourceDiv.id = "source" + sourceId;
+        sourcesDiv.appendChild(sourceDiv);
+        sourceFiles[sourceId].element = sourceDiv;
+
+        var table = sourcesDocument.createElement("table");
+        sourceDiv.appendChild(table);
+
+        var lines = syntaxHighlight(sourceFiles[sourceId].source).split("\n");
+        for( var i = 0; i < lines.length; i++ ) {
+            var tr = sourcesDocument.createElement("tr");
+            var td = sourcesDocument.createElement("td");
+            td.className = "gutter";
+            td.title = (i + 1);
+            td.addEventListener("click", addBreakPoint, true);
+            tr.appendChild(td);
+
+            td = sourcesDocument.createElement("td");
+            td.className = "source";
+            td.innerHTML = lines[i];
+            tr.appendChild(td);
+            table.appendChild(tr);
+        }
+
+        sourceFiles[sourceId].loaded = true;
+    }
+
+    sourceFiles[sourceId].element.style.display = null;
+
+    document.getElementById("filesPopupButtonContent").innerText = sourceFiles[sourceId].url;
+    
+    var files = document.getElementById("files");
+    for (var i = 0; i < files.childNodes.length; i++) {
+        if (files.childNodes[i].value == sourceId) {
+            files.selectedIndex = i;
+            break;
+        }
+    }
+
+    if (manageNavLists) {
+        nextFiles = new Array();
+        if (currentSourceId != -1)
+            previousFiles.push(currentSourceId);
+    }
+
+    document.getElementById("navFileLeftButton").disabled = (previousFiles.length == 0);
+    document.getElementById("navFileRightButton").disabled = (nextFiles.length == 0);
+
+    currentSourceId = sourceId;
+}
+
+function didParseScript(source,url,sourceId)
+{
+    sourceFiles[sourceId] = new Object();
+    sourceFiles[sourceId].source = source;
+    sourceFiles[sourceId].url = url;
+    sourceFiles[sourceId].loaded = false;
+    sourceFiles[sourceId].breakpoints = new Array();
+
+    var files = document.getElementById("files");
+    var option = document.createElement("option");
+    sourceFiles[sourceId].menuOption = option;
+    option.value = sourceId;
+    option.text = url;
+    files.appendChild(option);
+
+    if (currentSourceId == -1)
+        loadSource(sourceId,true);
+    return true;
+}
+
+function willExecuteStatement(sourceId,line)
+{
+    if (line <= 0 || !sourceFiles[sourceId])
+        return;
+
+    if (sourceFiles[sourceId].breakpoints[line] == 1)
+        pause();
+
+    if (isPaused()) {
+        if (currentSourceId != sourceId)
+            loadSource(sourceId,true);
+        if (currentRow)
+            removeStyleClass(currentRow, "current");
+        if (!sourceFiles[sourceId].element)
+            return;
+        if (sourceFiles[sourceId].element.firstChild.childNodes.length < line)
+            return;
+
+        currentRow = sourceFiles[sourceId].element.firstChild.childNodes.item(line - 1);
+        addStyleClass(currentRow, "current");
+
+        var sourcesDiv = document.getElementById("sources");
+        var sourcesDocument = document.getElementById("sources").contentDocument;
+        var parent = sourcesDocument.body;
+        var offset = totalOffsetTop(currentRow, parent);
+        if (offset < (parent.scrollTop + 20) || offset > (parent.scrollTop + sourcesDiv.clientHeight - 20))
+            parent.scrollTop = totalOffsetTop(currentRow, parent) - (sourcesDiv.clientHeight / 2) + 10;
+    }
+}
+
+function didEnterCallFrame(sourceId,line)
+{
+    willExecuteStatement(sourceId,line);
+}
+
+function willLeaveCallFrame(sourceId,line)
+{
+    willExecuteStatement(sourceId,line);
+}
diff --git a/WebKitTools/Drosera/main.m b/WebKitTools/Drosera/main.m
new file mode 100644 (file)
index 0000000..1ccd85d
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+int main(int argc, char *argv[])
+{
+    return NSApplicationMain(argc, (const char **) argv);
+}
diff --git a/WebKitTools/Drosera/viewer.css b/WebKitTools/Drosera/viewer.css
new file mode 100644 (file)
index 0000000..9fea1a8
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+body { background-image: url(gutter.png); background-repeat: repeat-y; margin: 0; padding: 0; }
+img { padding: 0; margin: 0; }
+
+table { border-spacing: 0; padding: 0; margin: 0; }
+.gutter { -webkit-user-select: none; width: 32px; min-width: 32px; max-width: 32px; box-sizing: border-box; font-size: 9px; font-family: Helvetica; color: #888; text-align: right; padding-right: 4px; }
+.source { font-family: Monaco, monospace; white-space: pre; padding-left: 4px; padding-right: 4px; font-size: 11px }
+
+.keyword { color: #8b0053 }
+.string { color: #a00000 }
+.number { color: #2900ff }
+.comment { color: #007215 }
+
+td.gutter:after { content: attr(title) }
+
+.breakpoint td.gutter, .current td.gutter { padding-right: 1px; vertical-align: middle; }
+.breakpoint td.gutter:after { content: url(breakPoint.tif); -webkit-user-select: none; vertical-align: middle; }
+.breakpoint.disabled td.gutter:after { content: url(breakPointDisabled.tif); }
+
+.current td.gutter:after { content: url(programCounter.tif); -webkit-user-select: none; vertical-align: middle; }
+.current.breakpoint td.gutter:after { content: url(programCounterBreakPoint.tif); }
+.current.breakpoint.disabled td.gutter:after { content: url(programCounterBreakPointDisabled.tif); }
+.current td.source { background-color: #abbffe; outline: 1px solid #406ffd; }
diff --git a/WebKitTools/Drosera/viewer.html b/WebKitTools/Drosera/viewer.html
new file mode 100644 (file)
index 0000000..46250d7
--- /dev/null
@@ -0,0 +1,38 @@
+<!--
+Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1.  Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer. 
+2.  Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution. 
+3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+    its contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission. 
+
+THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <style type="text/css">
+        @import "viewer.css";
+    </style>
+</head>
+<body>
+</body>
+</html>