2006-11-04 David Smith <catfish.man@gmail.com>
authorbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Nov 2006 06:16:36 +0000 (06:16 +0000)
committerbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Nov 2006 06:16:36 +0000 (06:16 +0000)
        Reviewed by Tim H.

Fixes: http://bugs.webkit.org/show_bug.cgi?id=11521
        Bug 11521: [Drosera] Breakpoint editor UI behaves incorrectly when multiple editors are open

        * Drosera/debugger.js: Use .// instead of // so that it doesn't root the search at the document.

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

WebKitTools/ChangeLog
WebKitTools/Drosera/debugger.js

index 2bf408513fa70bbdeb776760891f90d3c23270c0..da6bc7f28aa79ad14955d0daa78eec7e2a48a9cd 100644 (file)
@@ -1,3 +1,12 @@
+2006-11-04  David Smith  <catfish.man@gmail.com>
+
+        Reviewed by Tim H.
+
+        Fixes: http://bugs.webkit.org/show_bug.cgi?id=11521
+        Bug 11521: [Drosera] Breakpoint editor UI behaves incorrectly when multiple editors are open
+
+        * Drosera/debugger.js: Use .// instead of // so that it doesn't root the search at the document.
+
 2006-11-04  David Smith  <catfish.man@gmail.com>
 
         Reviewed by Tim H.
index fc20bd75d0a252d75e23fd6d2bf94854f4bfe38d..a4020b0e9c9476c6bb8cab25c5df3330b478a5c5 100644 (file)
@@ -429,12 +429,12 @@ function toggleBreakpointEditorOnLine(lineNum)
             bp.editor = editor;
             file.breakpoints[lineNum] = bp;
 
-            editor.query('//input[@class="enable"]').checked = bp.enabled;
+            editor.query('.//input[@class="enable"]').checked = bp.enabled;
 
-            editor.query('//select[@class="editorDropdown"]').selectedIndex = bp.type;
+            editor.query('.//select[@class="editorDropdown"]').selectedIndex = bp.type;
             updateBreakpointTypeOnLine(lineNum);
 
-            editor.query('//span[@class="hitCounter"]').innerText = bp.hitcount;
+            editor.query('.//span[@class="hitCounter"]').innerText = bp.hitcount;
                 
             setConditionFieldText(bp);
         } else {
@@ -449,8 +449,8 @@ function updateBreakpointTypeOnLine(line)
 {
     var breakpoint = files[currentFile].breakpoints[line];
     var editor = breakpoint.editor;
-    var label = editor.query('//label[@class="conditionLabel"]');
-    var dropdown = editor.query('//select[@class="editorDropdown"]');
+    var label = editor.query('.//label[@class="conditionLabel"]');
+    var dropdown = editor.query('.//select[@class="editorDropdown"]');
     breakpoint.type = dropdown.selectedIndex;
     switch(breakpoint.type) {
         case 0:
@@ -464,7 +464,7 @@ function updateBreakpointTypeOnLine(line)
 
 function setConditionFieldText(breakpoint)
 {
-    var conditionField = breakpoint.editor.query('//div[@class="condition"]');
+    var conditionField = breakpoint.editor.query('.//div[@class="condition"]');
     
     var functionBody = breakpoint.value;
     if (!functionBody || functionBody == "break")
@@ -491,8 +491,8 @@ function saveBreakpointOnLine(lineNum)
     var breakpoint = file.breakpoints[lineNum];
     row = file.element.firstChild.childNodes.item(lineNum - 1);
     var editor = breakpoint.editor;
-    var body = editor.query('//div[@class="condition"]').innerText;
-    var actionIndex = editor.query('//select[@class="editorDropdown"]').selectedIndex;
+    var body = editor.query('.//div[@class="condition"]').innerText;
+    var actionIndex = editor.query('.//select[@class="editorDropdown"]').selectedIndex;
     if (body.length == 0)
         breakpoint.value = "break";
     else if (body.indexOf("return") != -1)
@@ -515,7 +515,7 @@ function toggleBreakpointOnLine(lineNum)
     breakpoint.enabled = !breakpoint.enabled;
     var editor = breakpoint.editor;
     if (editor) {
-        editor.query('//input[@class="enable"]').checked = breakpoint.enabled;
+        editor.query('.//input[@class="enable"]').checked = breakpoint.enabled;
         setConditionFieldText(editor, lineNum);
     }
 }
@@ -1290,7 +1290,7 @@ function willExecuteStatement(sourceId, line, fromLeavingFrame)
         var editor = breakpoint.editor;
         var counter = null;
         if (editor)
-            counter = breakpoint.editor.query('//span[@class="hitCounter"]');
+            counter = breakpoint.editor.query('.//span[@class="hitCounter"]');
         if (counter)
             counter.innerText = breakpoint.hitcount;
     }