summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/front-end/SourceFrame.js
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/inspector/front-end/SourceFrame.js')
-rw-r--r--WebCore/inspector/front-end/SourceFrame.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/WebCore/inspector/front-end/SourceFrame.js b/WebCore/inspector/front-end/SourceFrame.js
index f221086..73c3e2a 100644
--- a/WebCore/inspector/front-end/SourceFrame.js
+++ b/WebCore/inspector/front-end/SourceFrame.js
@@ -56,10 +56,18 @@ WebInspector.SourceFrame.prototype = {
this._visible = visible;
this._createViewerIfNeeded();
- if (!visible) {
+ if (visible) {
+ if (this._textViewer && this._scrollTop)
+ this._textViewer.element.scrollTop = this._scrollTop;
+ if (this._textViewer && this._scrollLeft)
+ this._textViewer.element.scrollLeft = this._scrollLeft;
+ } else {
this._hidePopup();
- if (this._textViewer)
+ if (this._textViewer) {
+ this._scrollTop = this._textViewer.element.scrollTop;
+ this._scrollLeft = this._textViewer.element.scrollLeft;
this._textViewer.freeCachedElements();
+ }
}
},