diff options
| author | Steve Block <steveblock@google.com> | 2009-12-17 09:55:06 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2009-12-17 09:55:06 -0800 |
| commit | b880d713c04257ca40abfef97c300afdead423b8 (patch) | |
| tree | 6982576c228bcd1a7efe98afed544d840751094c /WebCore/inspector/front-end/BreakpointsSidebarPane.js | |
| parent | e2e7a5c57b53f01e63a0245b4420d54b454cb373 (diff) | |
| parent | 643ca7872b450ea4efacab6188849e5aac2ba161 (diff) | |
| download | external_webkit-b880d713c04257ca40abfef97c300afdead423b8.zip external_webkit-b880d713c04257ca40abfef97c300afdead423b8.tar.gz external_webkit-b880d713c04257ca40abfef97c300afdead423b8.tar.bz2 | |
am 643ca787: Merge webkit.org at r51976 : Initial merge by git.
Merge commit '643ca7872b450ea4efacab6188849e5aac2ba161' into eclair-mr2-plus-aosp
* commit '643ca7872b450ea4efacab6188849e5aac2ba161':
Merge webkit.org at r51976 : Initial merge by git.
Diffstat (limited to 'WebCore/inspector/front-end/BreakpointsSidebarPane.js')
| -rw-r--r-- | WebCore/inspector/front-end/BreakpointsSidebarPane.js | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/WebCore/inspector/front-end/BreakpointsSidebarPane.js b/WebCore/inspector/front-end/BreakpointsSidebarPane.js index e6edece..9d4fe55 100644 --- a/WebCore/inspector/front-end/BreakpointsSidebarPane.js +++ b/WebCore/inspector/front-end/BreakpointsSidebarPane.js @@ -58,21 +58,24 @@ WebInspector.BreakpointsSidebarPane.prototype = { this.bodyElement.appendChild(this.listElement); } - if (!InspectorController.debuggerEnabled() || !breakpoint.sourceID) + if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID) return; if (breakpoint.enabled) - InspectorController.addBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.condition); + InspectorBackend.addBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.condition); }, _appendBreakpointElement: function(breakpoint) { - function checkboxClicked() + function checkboxClicked(event) { breakpoint.enabled = !breakpoint.enabled; + + // without this, we'd switch to the source of the clicked breakpoint + event.stopPropagation(); } - function labelClicked() + function breakpointClicked() { var script = WebInspector.panels.scripts.scriptOrResourceForID(breakpoint.sourceID); if (script) @@ -82,6 +85,7 @@ WebInspector.BreakpointsSidebarPane.prototype = { var breakpointElement = document.createElement("li"); breakpoint._breakpointListElement = breakpointElement; breakpointElement._breakpointObject = breakpoint; + breakpointElement.addEventListener("click", breakpointClicked, false); var checkboxElement = document.createElement("input"); checkboxElement.className = "checkbox-elem"; @@ -90,9 +94,7 @@ WebInspector.BreakpointsSidebarPane.prototype = { checkboxElement.addEventListener("click", checkboxClicked, false); breakpointElement.appendChild(checkboxElement); - var labelElement = document.createElement("a"); - labelElement.textContent = breakpoint.label; - labelElement.addEventListener("click", labelClicked, false); + var labelElement = document.createTextNode(breakpoint.label); breakpointElement.appendChild(labelElement); var sourceTextElement = document.createElement("div"); @@ -133,10 +135,10 @@ WebInspector.BreakpointsSidebarPane.prototype = { this.bodyElement.appendChild(this.emptyElement); } - if (!InspectorController.debuggerEnabled() || !breakpoint.sourceID) + if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID) return; - InspectorController.removeBreakpoint(breakpoint.sourceID, breakpoint.line); + InspectorBackend.removeBreakpoint(breakpoint.sourceID, breakpoint.line); }, _breakpointEnableChanged: function(event) @@ -146,13 +148,13 @@ WebInspector.BreakpointsSidebarPane.prototype = { var checkbox = breakpoint._breakpointListElement.firstChild; checkbox.checked = breakpoint.enabled; - if (!InspectorController.debuggerEnabled() || !breakpoint.sourceID) + if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID) return; if (breakpoint.enabled) - InspectorController.addBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.condition); + InspectorBackend.addBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.condition); else - InspectorController.removeBreakpoint(breakpoint.sourceID, breakpoint.line); + InspectorBackend.removeBreakpoint(breakpoint.sourceID, breakpoint.line); }, _breakpointTextChanged: function(event) |
