diff options
| author | Leon Clarke <leonclarke@google.com> | 2010-06-03 14:33:32 +0100 |
|---|---|---|
| committer | Leon Clarke <leonclarke@google.com> | 2010-06-08 12:24:51 +0100 |
| commit | 5af96e2c7b73ebc627c6894727826a7576d31758 (patch) | |
| tree | f9d5e6f6175ccd7e3d14de9b290f08937a0d17ba /WebCore/inspector/front-end/SourceView.js | |
| parent | 8cc4fcf4f6adcbc0e0aebfc24fbad9a4cddf2cfb (diff) | |
| download | external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.zip external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.gz external_webkit-5af96e2c7b73ebc627c6894727826a7576d31758.tar.bz2 | |
Merge webkit.org at r60469 : Initial merge by git.
Change-Id: I66a0047aa2af802f66bb0c7f2a8b02247a596234
Diffstat (limited to 'WebCore/inspector/front-end/SourceView.js')
| -rw-r--r-- | WebCore/inspector/front-end/SourceView.js | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/WebCore/inspector/front-end/SourceView.js b/WebCore/inspector/front-end/SourceView.js index 3621187..f01c241 100644 --- a/WebCore/inspector/front-end/SourceView.js +++ b/WebCore/inspector/front-end/SourceView.js @@ -51,6 +51,8 @@ WebInspector.SourceView.prototype = { { WebInspector.ResourceView.prototype.show.call(this, parentElement); this.sourceFrame.visible = true; + if (this.localSourceFrame) + this.localSourceFrame.visible = true; this.resize(); }, @@ -58,6 +60,8 @@ WebInspector.SourceView.prototype = { { WebInspector.View.prototype.hide.call(this); this.sourceFrame.visible = false; + if (this.localSourceFrame) + this.localSourceFrame.visible = false; this._currentSearchResultIndex = -1; }, @@ -65,6 +69,8 @@ WebInspector.SourceView.prototype = { { if (this.sourceFrame) this.sourceFrame.resize(); + if (this.localSourceFrame) + this.localSourceFrame.resize(); }, setupSourceFrameIfNeeded: function() @@ -112,16 +118,12 @@ WebInspector.SourceView.prototype = { _addBreakpoint: function(line) { var sourceID = this._sourceIDForLine(line); - if (WebInspector.panels.scripts) { - var breakpoint = new WebInspector.Breakpoint(this.resource.url, line, sourceID); - WebInspector.panels.scripts.addBreakpoint(breakpoint); - } + WebInspector.breakpointManager.addBreakpoint(sourceID, this.resource.url, line, true, ""); }, _removeBreakpoint: function(breakpoint) { - if (WebInspector.panels.scripts) - WebInspector.panels.scripts.removeBreakpoint(breakpoint); + WebInspector.breakpointManager.removeBreakpoint(breakpoint); }, _editLine: function(line, newContent) @@ -194,6 +196,25 @@ WebInspector.SourceView.prototype = { findSearchMatches.call(this, query, finishedCallback); }, + updateLocalContent: function(content, mimeType) + { + if (!this.localContentElement) { + this.localContentElement = document.createElement("div"); + this.localContentElement.className = "resource-view-content"; + this.tabbedPane.appendTab("local", WebInspector.UIString("Local"), this.localContentElement, this.selectLocalContentTab.bind(this)); + this.localSourceFrame = new WebInspector.SourceFrame(this.localContentElement, this._addBreakpoint.bind(this), this._removeBreakpoint.bind(this)); + } + this.localSourceFrame.setContent(mimeType, content, ""); + }, + + selectLocalContentTab: function() + { + this.tabbedPane.selectTabById("local"); + this.localSourceFrame.visible = true; + if ("resize" in this) + this.resize(); + }, + jumpToFirstSearchResult: function() { if (!this._searchResults || !this._searchResults.length) |
