diff options
| author | Steve Block <steveblock@google.com> | 2010-02-15 12:23:52 +0000 |
|---|---|---|
| committer | Steve Block <steveblock@google.com> | 2010-02-16 11:48:32 +0000 |
| commit | 8a0914b749bbe7da7768e07a7db5c6d4bb09472b (patch) | |
| tree | 73f9065f370435d6fde32ae129d458a8c77c8dff /WebCore/inspector/front-end/SourceView.js | |
| parent | bf14be70295513b8076f3fa47a268a7e42b2c478 (diff) | |
| download | external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.zip external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.gz external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.bz2 | |
Merge webkit.org at r54731 : Initial merge by git
Change-Id: Ia79977b6cf3b0b00c06ef39419989b28e57e4f4a
Diffstat (limited to 'WebCore/inspector/front-end/SourceView.js')
| -rw-r--r-- | WebCore/inspector/front-end/SourceView.js | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/WebCore/inspector/front-end/SourceView.js b/WebCore/inspector/front-end/SourceView.js index 7fc8499..b401c12 100644 --- a/WebCore/inspector/front-end/SourceView.js +++ b/WebCore/inspector/front-end/SourceView.js @@ -32,7 +32,7 @@ WebInspector.SourceView = function(resource) this.element.addStyleClass("source"); - this.sourceFrame = new WebInspector.SourceFrame(this.contentElement, this._addBreakpoint.bind(this)); + this.sourceFrame = new WebInspector.SourceFrame(this.contentElement, this._addBreakpoint.bind(this), this._removeBreakpoint.bind(this)); resource.addEventListener("finished", this._resourceLoadingFinished, this); this._frameNeedsSetup = true; } @@ -58,16 +58,6 @@ WebInspector.SourceView.prototype = { this.sourceFrame.resize(); }, - detach: function() - { - WebInspector.ResourceView.prototype.detach.call(this); - - // FIXME: We need to mark the frame for setup on detach because the frame DOM is cleared - // when it is removed from the document. Is this a bug? - this._frameNeedsSetup = true; - this._sourceFrameSetup = false; - }, - setupSourceFrameIfNeeded: function() { if (!this._frameNeedsSetup) @@ -118,6 +108,12 @@ WebInspector.SourceView.prototype = { } }, + _removeBreakpoint: function(breakpoint) + { + if (WebInspector.panels.scripts) + WebInspector.panels.scripts.removeBreakpoint(breakpoint); + }, + // The rest of the methods in this prototype need to be generic enough to work with a ScriptView. // The ScriptView prototype pulls these methods into it's prototype to avoid duplicate code. @@ -125,7 +121,7 @@ WebInspector.SourceView.prototype = { { this._currentSearchResultIndex = -1; this._searchResults = []; - this.sourceFrame.clearSelection(); + this.sourceFrame.clearMarkedRange(); delete this._delayedFindSearchMatches; }, @@ -225,7 +221,7 @@ WebInspector.SourceView.prototype = { if (!foundRange) return; - this.sourceFrame.setSelection(foundRange); + this.sourceFrame.markAndRevealRange(foundRange); }, _sourceFrameSetupFinished: function() |
