Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
2010-02-25 Alexander Pavlov <apavlov@chromium.org>
        Reviewed by Pavel Feldman.

        Javascript console should not attempt to scroll to end of console if console is not visible

        https://bugs.webkit.org/show_bug.cgi?id=22992

        * inspector/front-end/ConsoleView.js:
        (WebInspector.ConsoleView.prototype._scheduleScrollIntoView.scrollIntoView):
        (WebInspector.ConsoleView.prototype._scheduleScrollIntoView):
        (WebInspector.ConsoleView.prototype.addMessage):

Canonical link: https://commits.webkit.org/46556@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@55255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Feb 25, 2010
1 parent cdcc388 commit b9a44ab
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
13 changes: 13 additions & 0 deletions WebCore/ChangeLog
@@ -1,3 +1,16 @@
2010-02-25 Alexander Pavlov <apavlov@chromium.org>

Reviewed by Pavel Feldman.

Javascript console should not attempt to scroll to end of console if console is not visible

https://bugs.webkit.org/show_bug.cgi?id=22992

* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._scheduleScrollIntoView.scrollIntoView):
(WebInspector.ConsoleView.prototype._scheduleScrollIntoView):
(WebInspector.ConsoleView.prototype.addMessage):

2010-02-25 Alexey Proskuryakov <ap@apple.com>

Qt and Gtk build fixes.
Expand Down
15 changes: 14 additions & 1 deletion WebCore/inspector/front-end/ConsoleView.js
Expand Up @@ -215,6 +215,19 @@ WebInspector.ConsoleView.prototype = {
this.toggleConsoleButton.title = WebInspector.UIString("Show console.");
},

_scheduleScrollIntoView: function()
{
if (this._scrollIntoViewTimer)
return;

function scrollIntoView()
{
this.promptElement.scrollIntoView(false);
delete this._scrollIntoViewTimer;
}
this._scrollIntoViewTimer = setTimeout(scrollIntoView.bind(this), 20);
},

addMessage: function(msg)
{
if (msg instanceof WebInspector.ConsoleMessage && !(msg instanceof WebInspector.ConsoleCommandResult)) {
Expand Down Expand Up @@ -256,7 +269,7 @@ WebInspector.ConsoleView.prototype = {
this.currentGroup.addMessage(msg);
}

this.promptElement.scrollIntoView(false);
this._scheduleScrollIntoView();
},

updateMessageRepeatCount: function(count)
Expand Down

0 comments on commit b9a44ab

Please sign in to comment.