Reviewed by Tim H.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Oct 2006 16:29:44 +0000 (16:29 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Oct 2006 16:29:44 +0000 (16:29 +0000)
        Add Xcode 3 style inline breakpoint editor. Credit to xenon for the CSS wizardry to get the appearance working properly.

        * Drosera/Drosera.xcodeproj/project.pbxproj:
        * Drosera/Images/breakpointeditor.png: Added.
        * Drosera/breakpointEditor.css: Removed.
        * Drosera/breakpointEditor.html: Removed.
        * Drosera/breakpointEditor.js: Removed.
        * Drosera/debugger.js:
        * Drosera/viewer.css:

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

WebKitTools/ChangeLog
WebKitTools/Drosera/Drosera.xcodeproj/project.pbxproj
WebKitTools/Drosera/Images/breakpointeditor.png [new file with mode: 0644]
WebKitTools/Drosera/breakpointEditor.css [deleted file]
WebKitTools/Drosera/breakpointEditor.html [deleted file]
WebKitTools/Drosera/breakpointEditor.js [deleted file]
WebKitTools/Drosera/debugger.js
WebKitTools/Drosera/viewer.css

index fa63e32d5a96d68ff173fa439b794da5b1d91582..14c4f4460068853b24d947efc69dde14121f456b 100644 (file)
@@ -1,3 +1,17 @@
+2006-10-18  David Smith  <catfish.man@gmail.com>
+
+        Reviewed by Tim H.
+
+        Add Xcode 3 style inline breakpoint editor. Credit to xenon for the CSS wizardry to get the appearance working properly.
+
+        * Drosera/Drosera.xcodeproj/project.pbxproj:
+        * Drosera/Images/breakpointeditor.png: Added.
+        * Drosera/breakpointEditor.css: Removed.
+        * Drosera/breakpointEditor.html: Removed.
+        * Drosera/breakpointEditor.js: Removed.
+        * Drosera/debugger.js:
+        * Drosera/viewer.css:
+
 2006-10-18  David Harrison  <harrison@apple.com>
 
         Reviewed by Tim H.
index e7791fb7de63f366feccab8d850866699e1dbbfc..2d100e3bebf483122fda5ecd8391ededa4242b06 100644 (file)
@@ -58,9 +58,7 @@
                1CD8D56C0A49043E00E5677B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
                1CD8D5A60A49102900E5677B /* Drosera.app in Resources */ = {isa = PBXBuildFile; fileRef = 8D15AC370486D014006FF6A4 /* Drosera.app */; };
                5D2C827F0A816BA700C193FD /* Drosera.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1C3487970A81208400101C5C /* Drosera.icns */; };
-               63A9E23F0AD4869300C079EE /* breakpointEditor.css in Resources */ = {isa = PBXBuildFile; fileRef = 63A9E23C0AD4869300C079EE /* breakpointEditor.css */; };
-               63A9E2400AD4869400C079EE /* breakpointEditor.html in Resources */ = {isa = PBXBuildFile; fileRef = 63A9E23D0AD4869300C079EE /* breakpointEditor.html */; };
-               63A9E2410AD4869400C079EE /* breakpointEditor.js in Resources */ = {isa = PBXBuildFile; fileRef = 63A9E23E0AD4869300C079EE /* breakpointEditor.js */; };
+               63D54BD70AE600560064C440 /* breakpointeditor.png in Resources */ = {isa = PBXBuildFile; fileRef = 63D54BD60AE600560064C440 /* breakpointeditor.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 = (); }; };
                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; };
-               63A9E23C0AD4869300C079EE /* breakpointEditor.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = breakpointEditor.css; sourceTree = "<group>"; };
-               63A9E23D0AD4869300C079EE /* breakpointEditor.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = breakpointEditor.html; sourceTree = "<group>"; };
-               63A9E23E0AD4869300C079EE /* breakpointEditor.js */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.javascript; path = breakpointEditor.js; sourceTree = "<group>"; };
+               63D54BD60AE600560064C440 /* breakpointeditor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = breakpointeditor.png; sourceTree = "<group>"; };
                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 */
                1CC058B70A44A210006FE533 /* Images */ = {
                        isa = PBXGroup;
                        children = (
+                               63D54BD60AE600560064C440 /* breakpointeditor.png */,
                                15CE854F0ADBEA610078A734 /* fileIcon.jpg */,
                                15CE85500ADBEA610078A734 /* siteCollapsed.tif */,
                                15CE85510ADBEA610078A734 /* siteExpanded.tif */,
                                1C6F861F0A599F65004FCD89 /* console.js */,
                                1C6F84540A58EE06004FCD89 /* console.html */,
                                1C6F84530A58EE06004FCD89 /* console.css */,
-                               63A9E23C0AD4869300C079EE /* breakpointEditor.css */,
-                               63A9E23D0AD4869300C079EE /* breakpointEditor.html */,
-                               63A9E23E0AD4869300C079EE /* breakpointEditor.js */,
                        );
                        name = Classes;
                        sourceTree = "<group>";
                                1C6F84560A58EE06004FCD89 /* console.html in Resources */,
                                1C6F86730A59A18B004FCD89 /* console.js in Resources */,
                                1C3487980A81208400101C5C /* Drosera.icns in Resources */,
-                               63A9E23F0AD4869300C079EE /* breakpointEditor.css in Resources */,
-                               63A9E2400AD4869400C079EE /* breakpointEditor.html in Resources */,
-                               63A9E2410AD4869400C079EE /* breakpointEditor.js in Resources */,
                                15CE85540ADBEA620078A734 /* fileIcon.jpg in Resources */,
                                15CE85550ADBEA620078A734 /* siteCollapsed.tif in Resources */,
                                15CE85560ADBEA620078A734 /* siteExpanded.tif in Resources */,
                                15CE85570ADBEA620078A734 /* siteIcon.tif in Resources */,
                                15CE85580ADBEA620078A734 /* SourceArrowOpen.png in Resources */,
+                               63D54BD70AE600560064C440 /* breakpointeditor.png in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/WebKitTools/Drosera/Images/breakpointeditor.png b/WebKitTools/Drosera/Images/breakpointeditor.png
new file mode 100644 (file)
index 0000000..8bb992b
Binary files /dev/null and b/WebKitTools/Drosera/Images/breakpointeditor.png differ
diff --git a/WebKitTools/Drosera/breakpointEditor.css b/WebKitTools/Drosera/breakpointEditor.css
deleted file mode 100644 (file)
index e4e0d79..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
- * Copyright (C) 2006 David Smith (catfish.man@gmail.com)
- *
- * 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 { margin: 0; padding: 5px; overflow: hidden; }
-
-#main {
-    position: absolute;
-    top: 0;
-    bottom: 0;
-    left: 0;
-    right: 0;
-}
-
-#save {
-    position: absolute;
-    bottom: 5px;
-    right: 5px;
-}
-
-#input {
-    position: absolute;
-    top: 20px;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    -webkit-user-modify: read-write;
-    -webkit-nbsp-mode: space;
-    -webkit-line-break: after-white-space;
-    word-wrap: break-word;
-    outline: none;
-    font-family: monospace;
-    font-size: 11px;
-    line-height: 14px;
-    padding: 8px;
-}
diff --git a/WebKitTools/Drosera/breakpointEditor.html b/WebKitTools/Drosera/breakpointEditor.html
deleted file mode 100644 (file)
index 40d01ec..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--
-Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
-Copyright (C) 2006 David Smith (catfish.man@gmail.com)
-
-
-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>Breakpoint Editor</title>
-    <script type="text/javascript" src="breakpointEditor.js"></script> 
-    <style type="text/css">
-        @import "breakpointEditor.css";
-    </style>
-</head>
-<body onload="loaded()" onunload="saveBreakpoint()">
-<div id="input"></div>
-</body>
-</html>
diff --git a/WebKitTools/Drosera/breakpointEditor.js b/WebKitTools/Drosera/breakpointEditor.js
deleted file mode 100644 (file)
index 051e936..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
- * Copyright (C) 2006 David Smith (catfish.man@gmail.com)
- *
- * 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 mainWindow = window.opener;
-var inputElement = null;
-var lineNumber = 0;
-var file = 0;
-
-function loaded()
-{
-    file = mainWindow.currentFile;
-    lineNumber = mainWindow.files[file].breakpointEditorWindows.indexOf(window);
-    
-    document.getElementsByTagName("title")[0].textContents = "Edit Breakpoint on Line " + lineNumber;
-    
-    var functionBody = mainWindow.files[file].breakpoints[lineNumber];
-    if(functionBody == "break")
-        functionBody = "return 1;";
-    else {
-        var startIndex = functionBody.indexOf("{") + 1;
-        var endIndex = functionBody.lastIndexOf("}");
-        functionBody = functionBody.substring(startIndex, endIndex);
-    }
-        
-    inputElement = document.getElementById("input");
-    inputElement.innerText = functionBody;
-    inputElement.focus();
-}
-
-function saveBreakpoint()
-{
-    mainWindow.finishEditingBreakpoint(lineNumber, file, "__drosera_breakpoint_conditional_func = function() { " + inputElement.innerText + " }; __drosera_breakpoint_conditional_func();");
-}
\ No newline at end of file
index a14bdddc8dbd729b2ba7c6f5b95f8ee251cde3b9..53391e07b16027892c4c0e3fc106eb710c7e711d 100644 (file)
@@ -48,6 +48,7 @@ var pauseOnNextStatement = false;
 var pausedWhileLeavingFrame = false;
 var consoleWindow = null;
 var enabledBreakpoint = "break";
+var breakpointEditorHTML = '<div class="top">Edit Breakpoint:<label><input type="checkbox" onclick="window.parent.toggleBreakpointForEditor(this.parentNode.parentNode.parentNode)"></input>Enable</label><button class="save" onclick="window.parent.saveBreakpointForEditor(this.parentNode.parentNode)">Save</button></div><div class="bottom"><label for="editorCondition">Condition:</label><div class="condition"></div></div>'
 
 ScriptCallFrame = function (functionName, index, row)
 {
@@ -322,7 +323,7 @@ function stepOut()
 }
 
 Element.prototype.removeStyleClass = function(className) {
-    if(this.hasStyleClass(className))
+    if (this.hasStyleClass(className))
         this.className = this.className.replace(className, "");
 }
 
@@ -333,20 +334,17 @@ Element.prototype.addStyleClass = function(className) {
 
 Element.prototype.hasStyleClass = function(className) {
     return this.className.indexOf(className) != -1;
-};
+}
 
-function addBreakPoint(event)
+function breakpointAction(event)
 {
     var row = event.target.parentNode;
     var file = files[currentFile];
     var lineNum = parseInt(event.target.title);
     
-    if (row.hasStyleClass("breakpoint")) {
-        if(event.altKey && file.breakpoints[lineNum] != null)
-            showBreakpointEditor(file, lineNum);
-        else
-            toggleBreakpoint(row, file, lineNum);    
-    } else
+    if (row.hasStyleClass("breakpoint"))
+        toggleBreakpoint(row, file, lineNum);    
+    else
         createBreakpoint(row, file, lineNum);
 }
 
@@ -358,16 +356,67 @@ function createBreakpoint(row, file, lineNum)
     file.disabledBreakpoints[lineNum] = null;
 }
 
-function showBreakpointEditor(file, lineNum)
+function toggleBreakpointEditor(event)
 {
-    var editors = file.breakpointEditorWindows;
+    var row = event.target.parentNode;
+    var file = files[currentFile];
+    var lineNum = parseInt(event.target.title);
+    if (row.hasStyleClass("breakpoint")) {
+        var editor = file.breakpointEditors[lineNum];
+        if (!editor) {
+            var sourcesDocument = document.getElementById("sources").contentDocument;
+            editor = sourcesDocument.createElement("div");
+            editor.className = "editor";
+            editor.id = lineNum;
+            editor.innerHTML = breakpointEditorHTML;
+
+            // set the enabled checkbox to the correct state
+            editor.getElementsByTagName("input")[0].checked = !row.hasStyleClass("disabled");
+            
+            // set the condition field to reflect the breakpoint
+            setConditionFieldText(editor, lineNum);
+            
+            row.childNodes[1].appendChild(editor);
+            file.breakpointEditors[lineNum] = editor; 
+        } else {
+            row.childNodes[1].removeChild(editor);
+            file.breakpointEditors[lineNum] = null;
+        }
+    }
+}
 
-    if (editors[lineNum] == null)
-        editors[lineNum] = window.open("breakpointEditor.html", ("Edit Breakpoint On Line " + lineNum), "top=200, left=200, width=400, height=200, toolbar=no, resizable=yes");
-    else
-        editors[lineNum].focus();
-        
-    event.preventDefault();
+function setConditionFieldText(editor, lineNum)
+{
+    var conditionField = editor.childNodes[1].childNodes[1];
+    var functionBody = files[currentFile].breakpoints[lineNum];
+    if (!functionBody)
+        functionBody = "return -1;";
+    else if (functionBody == "break")
+        functionBody = "return 1;";
+    else {
+        var startIndex = functionBody.indexOf("{") + 1;
+        var endIndex = functionBody.lastIndexOf("}");
+        functionBody = functionBody.substring(startIndex, endIndex);
+    }
+    conditionField.innerText = functionBody;
+}
+
+function toggleBreakpointForEditor(editor)
+{
+    var file = files[currentFile];
+    var lineNum = parseInt(editor.id);
+    row = file.element.firstChild.childNodes.item(lineNum - 1);
+    toggleBreakpoint(row, file, lineNum);
+}
+
+function saveBreakpointForEditor(editor)
+{
+    var file = files[currentFile];
+    var lineNum = parseInt(editor.id);
+    row = file.element.firstChild.childNodes.item(lineNum - 1);
+    file.breakpoints[lineNum] = "__drosera_breakpoint_conditional_func = function() { " + editor.childNodes[1].childNodes[1].innerText + " }; __drosera_breakpoint_conditional_func();";
+    row.childNodes[1].removeChild(editor);
+    file.breakpointEditors[lineNum] = null;
 }
 
 function toggleBreakpoint(row, file, lineNum)
@@ -380,12 +429,11 @@ function toggleBreakpoint(row, file, lineNum)
     var temp = file.breakpoints[lineNum];
     file.breakpoints[lineNum] = file.disabledBreakpoints[lineNum];
     file.disabledBreakpoints[lineNum] = temp;
-}
-
-function finishEditingBreakpoint(line, file, newFunction)
-{
-    files[file].breakpoints[line] = newFunction;
-    files[file].breakpointEditorWindows[line] = null;
+    var editor = file.breakpointEditors[lineNum];
+    if (editor) {
+        editor.childNodes[0].childNodes[1].childNodes[0].checked = !row.hasStyleClass("disabled");
+        setConditionFieldText(editor, lineNum);
+    }
 }
 
 function moveBreakPoint(event)
@@ -423,16 +471,24 @@ function breakpointDrag(event)
             draggingBreakpoint.isDisabled = node.hasStyleClass("disabled");
             node.removeStyleClass("breakpoint");
             node.removeStyleClass("disabled");
-            draggingBreakpoint.started = true;
             
             var lineNum = parseInt(draggingBreakpoint.title);
+            var file = files[currentFile];
             
-            if(draggingBreakpoint.isDisabled)
+            var editor = file.breakpointEditors[lineNum];
+            if (editor) {
+                node.childNodes[1].removeChild(editor);
+                file.breakpointEditors[lineNum] = null;
+            }
+            
+            draggingBreakpoint.started = true;
+                        
+            if (draggingBreakpoint.isDisabled)
                 draggingBreakpoint.breakFunction = files[currentFile].disabledBreakpoints[lineNum];
             else
                 draggingBreakpoint.breakFunction = files[currentFile].breakpoints[lineNum];
-            files[currentFile].breakpoints[lineNum] = null;
-            files[currentFile].disabledBreakpoints[lineNum] = null;
+            file.breakpoints[lineNum] = null;
+            file.disabledBreakpoints[lineNum] = null;
 
             var dragImage = sourcesDocument.createElement("img");
             if (draggingBreakpoint.isDisabled)
@@ -497,7 +553,7 @@ function breakpointDragEnd(event)
     if (!tr)
         return;
         
-    if(draggingBreakpoint.isDisabled) {
+    if (draggingBreakpoint.isDisabled) {
         tr.addStyleClass("disabled");
         file.disabledBreakpoints[row] = draggingBreakpoint.breakFunction;
         file.breakpoints[row] = null;
@@ -647,7 +703,7 @@ function syntaxHighlight(code)
             result += "</span>";
             echoChar(c);
             continue;
-        } else if(isLetter(c) && (i == 0 || !isLetter(cPrev))) {
+        } 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++) {
@@ -775,7 +831,8 @@ function loadFile(fileIndex, manageNavLists)
             var td = sourcesDocument.createElement("td");
             td.className = "gutter";
             td.title = (i + 1);
-            td.addEventListener("click", addBreakPoint, true);
+            td.addEventListener("click", breakpointAction, true);
+            td.addEventListener("dblclick", toggleBreakpointEditor, true);
             td.addEventListener("mousedown", moveBreakPoint, true);
             tr.appendChild(td);
 
@@ -933,8 +990,8 @@ function fileClicked(fileId, shouldLoadFile)
 {
     if (shouldLoadFile === undefined) shouldLoadFile = true;
     
-    document.getElementById(currentFile).className  = "passive";
-    document.getElementById(fileId).className       = "active";
+    document.getElementById(currentFile).className = "passive";
+    document.getElementById(fileId).className = "active";
     if (shouldLoadFile) 
         loadFile(fileId, false);
 }
@@ -968,7 +1025,7 @@ function didParseScript(source, fileSource, url, sourceId, baseLineNumber)
         file.scripts = new Array();
         file.breakpoints = new Array();
         file.disabledBreakpoints = new Array();
-        file.breakpointEditorWindows = new Array();
+        file.breakpointEditors = new Array();
         file.source = (fileSource.length ? fileSource : source);
         file.url = (url.length ? url : null);
         file.loaded = false;
index 7e863b74565ebec3bda8bf124ba3133c74ab71d1..29202ae77b5ab3e29c6289da005979253db90245 100644 (file)
@@ -40,7 +40,7 @@ table { border-spacing: 0; padding: 0; margin: 0; width: 100%; }
 
 td.gutter:after { content: attr(title); -webkit-user-select: none; }
 
-.breakpoint td.gutter, .current td.gutter { padding-right: 1px; vertical-align: middle; }
+.breakpoint td.gutter, .current td.gutter { padding-right: 1px; vertical-align: top; }
 .breakpoint td.gutter:after { content: url(breakPoint.tif); -webkit-user-select: none; vertical-align: middle; }
 .breakpoint.disabled td.gutter:after { content: url(breakPointDisabled.tif); }
 
@@ -57,3 +57,71 @@ td.gutter:after { content: attr(title); -webkit-user-select: none; }
     -webkit-user-select: none;
     cursor: default;
 }
+
+.editor {
+    top: -2px;
+    left: -2px;
+    margin-bottom: -2px;
+    position: relative;
+    min-width: 350px;
+    max-width: 500px;
+    border-width: 20px 12px 11px 36px;
+    border-color: transparent;
+    border-style: solid;
+    -webkit-border-image: url(breakpointeditor.png) 20 12 11 36;
+    font-size: 11px;
+    font-family: 'Lucida Grande', sans-serif;
+}
+
+.editor .top {
+    position: absolute;
+    height: 20px;
+    -webkit-border-top-right-radius: 6px;
+    background-color: rgb(0, 134, 226);
+    border-bottom: 2px solid rgb(0, 110, 208);
+    top: -4px;
+    right: -5px;
+    left: -5px;
+    padding-left: 5px;
+    padding-right: 5px;
+}
+
+.editor .bottom {
+    position: relative;
+    padding: 5px 0;
+    top: 20px;
+}
+
+.editor div.condition {
+    position: relative;
+    background-color: white;
+    -webkit-user-modify: read-write-plaintext-only;
+    -webkit-nbsp-mode: space;
+    -webkit-line-break: after-white-space;
+    word-wrap: break-word;
+    outline: none;
+    font-family: monospace;
+    font-size: 10px;
+    line-height: 10px;
+    padding: 3px;
+    border: 1px solid darkgray;
+    top: -15px;
+    left: 60px;
+    margin-right: 60px;
+}
+
+.editor button.save {
+    margin-right: 1px;
+    padding: 1px;
+    padding-right: 5px;
+    padding-left: 5px;
+    float: right;
+    font-size: 10px;
+    background-color: rgb(34, 128, 186);
+    height: 18px;
+    border: 1px solid rgb(20, 114, 172);
+}
+
+.editor button.save:active {
+    background-color: rgb(14, 98, 166);
+}