Commit 0ff00400 authored by eric@webkit.org's avatar eric@webkit.org

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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 66611a0d
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.
......
......@@ -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)) {
......@@ -256,7 +269,7 @@ WebInspector.ConsoleView.prototype = {
this.currentGroup.addMessage(msg);
}
this.promptElement.scrollIntoView(false);
this._scheduleScrollIntoView();
},
updateMessageRepeatCount: function(count)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment