RESOLVED FIXED Bug 41620
Web Inspector: preserve scroll positions in source frame when switching between panes.
https://bugs.webkit.org/show_bug.cgi?id=41620
Summary Web Inspector: preserve scroll positions in source frame when switching betwe...
Pavel Feldman
Reported 2010-07-05 09:41:45 PDT
Patch to follow.
Attachments
[PATCH] Proposed fix. (2.89 KB, patch)
2010-07-05 09:46 PDT, Pavel Feldman
no flags
Pavel Feldman
Comment 1 2010-07-05 09:46:09 PDT
Created attachment 60549 [details] [PATCH] Proposed fix.
Joseph Pecoraro
Comment 2 2010-07-05 10:38:32 PDT
Comment on attachment 60549 [details] [PATCH] Proposed fix. > +++ b/WebCore/inspector/front-end/SourceFrame.js > + 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 { You could have prevented a duplicate check by doing an if (this._textViewer) block like you already do in the else. > this._hidePopup(); > - if (this._textViewer) > + if (this._textViewer) { > + this._scrollTop = this._textViewer.element.scrollTop; > + this._scrollLeft = this._textViewer.element.scrollLeft; > this._textViewer.freeCachedElements(); > + } There is a call to this._createViewerIfNeeded above this if/else. I think that would have created a viewer in this case so that this check wouldn't be necessary, but I think its good to be safe. Thanks!
WebKit Commit Bot
Comment 3 2010-07-05 11:04:41 PDT
Comment on attachment 60549 [details] [PATCH] Proposed fix. Clearing flags on attachment: 60549 Committed r62496: <http://trac.webkit.org/changeset/62496>
WebKit Commit Bot
Comment 4 2010-07-05 11:04:46 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.