diff options
author | Steve Block <steveblock@google.com> | 2010-02-05 14:27:46 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-15 10:49:50 +0000 |
commit | 5e2bc6953fe6923165b8a5d7679939693a1d58d6 (patch) | |
tree | 6ccb8c24bc2bf5e8f413e6cfae250b729b426631 /WebCore/inspector/front-end/SourceFrame.js | |
parent | 4a00f4fccc3cb7e9996749a05631f5d7b9de756e (diff) | |
download | external_webkit-5e2bc6953fe6923165b8a5d7679939693a1d58d6.zip external_webkit-5e2bc6953fe6923165b8a5d7679939693a1d58d6.tar.gz external_webkit-5e2bc6953fe6923165b8a5d7679939693a1d58d6.tar.bz2 |
Merge webkit.org at r54340 : Initial merge by git
Change-Id: Ib489d2ff91186ea3652522e1d586e54416a2cf44
Diffstat (limited to 'WebCore/inspector/front-end/SourceFrame.js')
-rw-r--r-- | WebCore/inspector/front-end/SourceFrame.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js index 1e1bd0c..e30dbdb 100644 --- a/WebCore/inspector/front-end/SourceFrame.js +++ b/WebCore/inspector/front-end/SourceFrame.js @@ -123,11 +123,12 @@ WebInspector.SourceFrame.prototype = { this._editor.revalidateDecorationsAndPaint(); }, - setContent: function(mimeType, content) + setContent: function(mimeType, content, url) { this._loaded = true; this._textModel.setText(null, content); this._mimeType = mimeType; + this._url = url; this._createEditorIfNeeded(); }, @@ -137,13 +138,14 @@ WebInspector.SourceFrame.prototype = { return; var editorConstructor = Preferences.useCanvasBasedEditor ? WebInspector.TextEditor : WebInspector.NativeTextViewer; - this._editor = new editorConstructor(this._textModel, WebInspector.platform); + this._editor = new editorConstructor(this._textModel, WebInspector.platform, this._url); this._editor.lineNumberDecorator = new WebInspector.BreakpointLineNumberDecorator(this, this._editor.textModel); this._editor.lineDecorator = new WebInspector.ExecutionLineDecorator(this); this._editor.readOnly = true; this._element = this._editor.element; this._element.addEventListener("keydown", this._keyDown.bind(this), true); this._parentElement.appendChild(this._element); + this._editor.initFontMetrics(); this._editor.mimeType = this._mimeType; |