Changeset 55255 in webkit


Ignore:
Timestamp:
Feb 25, 2010 2:14:51 PM (14 years ago)
Author:
eric@webkit.org
Message:

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):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r55253 r55255  
     12010-02-25  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Javascript console should not attempt to scroll to end of console if console is not visible
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=22992
     8
     9        * inspector/front-end/ConsoleView.js:
     10        (WebInspector.ConsoleView.prototype._scheduleScrollIntoView.scrollIntoView):
     11        (WebInspector.ConsoleView.prototype._scheduleScrollIntoView):
     12        (WebInspector.ConsoleView.prototype.addMessage):
     13
    1142010-02-25  Alexey Proskuryakov  <ap@apple.com>
    215
  • trunk/WebCore/inspector/front-end/ConsoleView.js

    r53809 r55255  
    216216    },
    217217
     218    _scheduleScrollIntoView: function()
     219    {
     220        if (this._scrollIntoViewTimer)
     221            return;
     222
     223        function scrollIntoView()
     224        {
     225            this.promptElement.scrollIntoView(false);
     226            delete this._scrollIntoViewTimer;
     227        }
     228        this._scrollIntoViewTimer = setTimeout(scrollIntoView.bind(this), 20);
     229    },
     230
    218231    addMessage: function(msg)
    219232    {
     
    257270        }
    258271
    259         this.promptElement.scrollIntoView(false);
     272        this._scheduleScrollIntoView();
    260273    },
    261274
Note: See TracChangeset for help on using the changeset viewer.