diff options
| author | Steve Block <steveblock@google.com> | 2010-02-02 14:57:50 +0000 |
|---|---|---|
| committer | Steve Block <steveblock@google.com> | 2010-02-04 15:06:55 +0000 |
| commit | d0825bca7fe65beaee391d30da42e937db621564 (patch) | |
| tree | 7461c49eb5844ffd1f35d1ba2c8b7584c1620823 /WebCore/inspector/front-end/ScriptView.js | |
| parent | 3db770bd97c5a59b6c7574ca80a39e5a51c1defd (diff) | |
| download | external_webkit-d0825bca7fe65beaee391d30da42e937db621564.zip external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.gz external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.bz2 | |
Merge webkit.org at r54127 : Initial merge by git
Change-Id: Ib661abb595522f50ea406f72d3a0ce17f7193c82
Diffstat (limited to 'WebCore/inspector/front-end/ScriptView.js')
| -rw-r--r-- | WebCore/inspector/front-end/ScriptView.js | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/WebCore/inspector/front-end/ScriptView.js b/WebCore/inspector/front-end/ScriptView.js index 38157ac..cf7f1b1 100644 --- a/WebCore/inspector/front-end/ScriptView.js +++ b/WebCore/inspector/front-end/ScriptView.js @@ -33,10 +33,7 @@ WebInspector.ScriptView = function(script) this._frameNeedsSetup = true; this._sourceFrameSetup = false; - - this.sourceFrame = new WebInspector.SourceFrame(null, this._addBreakpoint.bind(this)); - - this.element.appendChild(this.sourceFrame.element); + this.sourceFrame = new WebInspector.SourceFrame(this.element, this._addBreakpoint.bind(this)); } WebInspector.ScriptView.prototype = { @@ -44,12 +41,8 @@ WebInspector.ScriptView.prototype = { { WebInspector.View.prototype.show.call(this, parentElement); this.setupSourceFrameIfNeeded(); - }, - - hide: function() - { - WebInspector.View.prototype.hide.call(this); - this._currentSearchResultIndex = -1; + this.sourceFrame.visible = true; + this.resize(); }, setupSourceFrameIfNeeded: function() @@ -59,13 +52,9 @@ WebInspector.ScriptView.prototype = { this.attach(); - if (!InspectorFrontendHost.addSourceToFrame("text/javascript", this.script.source, this.sourceFrame.element)) - return; - + this.sourceFrame.setContent("text/javascript", this.script.source); + this._sourceFrameSetup = true; delete this._frameNeedsSetup; - - this.sourceFrame.addEventListener("syntax highlighting complete", this._syntaxHighlightingComplete, this); - this.sourceFrame.syntaxHighlightJavascript(); }, attach: function() @@ -83,6 +72,7 @@ WebInspector.ScriptView.prototype = { // The follow methods are pulled from SourceView, since they are // generic and work with ScriptView just fine. + hide: WebInspector.SourceView.prototype.hide, revealLine: WebInspector.SourceView.prototype.revealLine, highlightLine: WebInspector.SourceView.prototype.highlightLine, addMessage: WebInspector.SourceView.prototype.addMessage, @@ -97,7 +87,7 @@ WebInspector.ScriptView.prototype = { showingLastSearchResult: WebInspector.SourceView.prototype.showingLastSearchResult, _jumpToSearchResult: WebInspector.SourceView.prototype._jumpToSearchResult, _sourceFrameSetupFinished: WebInspector.SourceView.prototype._sourceFrameSetupFinished, - _syntaxHighlightingComplete: WebInspector.SourceView.prototype._syntaxHighlightingComplete + resize: WebInspector.SourceView.prototype.resize } WebInspector.ScriptView.prototype.__proto__ = WebInspector.View.prototype; |
