summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/front-end/SourceFrame.js
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
committerFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
commit5f1ab04193ad0130ca8204aadaceae083aca9881 (patch)
tree5a92cd389e2cfe7fb67197ce14b38469462379f8 /WebCore/inspector/front-end/SourceFrame.js
parent194315e5a908cc8ed67d597010544803eef1ac59 (diff)
downloadexternal_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.zip
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.gz
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.bz2
Get WebKit r44544.
Diffstat (limited to 'WebCore/inspector/front-end/SourceFrame.js')
-rw-r--r--WebCore/inspector/front-end/SourceFrame.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js
index 26c0626..18d9073 100644
--- a/WebCore/inspector/front-end/SourceFrame.js
+++ b/WebCore/inspector/front-end/SourceFrame.js
@@ -110,6 +110,11 @@ WebInspector.SourceFrame.prototype = {
revealLine: function(lineNumber)
{
+ if (!this._isContentLoaded()) {
+ this._lineNumberToReveal = lineNumber;
+ return;
+ }
+
var row = this.sourceRow(lineNumber);
if (row)
row.scrollIntoViewIfNeeded(true);
@@ -172,6 +177,11 @@ WebInspector.SourceFrame.prototype = {
highlightLine: function(lineNumber)
{
+ if (!this._isContentLoaded()) {
+ this._lineNumberToHighlight = lineNumber;
+ return;
+ }
+
var sourceRow = this.sourceRow(lineNumber);
if (!sourceRow)
return;
@@ -233,9 +243,28 @@ WebInspector.SourceFrame.prototype = {
this._addExistingMessagesToSource();
this._addExistingBreakpointsToSource();
this._updateExecutionLine();
+ if (this._executionLine)
+ this.revealLine(this._executionLine);
if (this.autoSizesToFitContentHeight)
this.sizeToFitContentHeight();
+
+ if (this._lineNumberToReveal) {
+ this.revealLine(this._lineNumberToReveal);
+ delete this._lineNumberToReveal;
+ }
+
+ if (this._lineNumberToHighlight) {
+ this.highlightLine(this._lineNumberToHighlight);
+ delete this._lineNumberToHighlight;
+ }
+
+ this.dispatchEventToListeners("content loaded");
+ },
+
+ _isContentLoaded: function() {
+ var doc = this.element.contentDocument;
+ return doc && doc.getElementsByTagName("table")[0];
},
_windowResized: function(event)