Changeset 74193 in webkit
- Timestamp:
- Dec 16, 2010 8:56:53 AM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r74191 r74193 1 2010-12-16 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: Console always scroll to the bottom on new events 6 https://bugs.webkit.org/show_bug.cgi?id=51189 7 8 When new messages are added to the console it will auto scroll 9 only if it was already scrolled down to the last record. 10 11 * inspector/front-end/ConsoleView.js: 12 (WebInspector.ConsoleView.prototype._scheduleScrollIntoView.scrollIntoView): 13 (WebInspector.ConsoleView.prototype._scheduleScrollIntoView): 14 (WebInspector.ConsoleView.prototype._isScrolledToLastMessage): 15 (WebInspector.ConsoleView.prototype.addMessage): 16 1 17 2010-12-16 Pavel Podivilov <podivilov@chromium.org> 2 18 -
trunk/WebCore/inspector/front-end/ConsoleView.js
r74153 r74193 207 207 function scrollIntoView() 208 208 { 209 this.promptElement.scrollIntoView( false);209 this.promptElement.scrollIntoView(true); 210 210 delete this._scrollIntoViewTimer; 211 211 } … … 215 215 addMessage: function(msg) 216 216 { 217 var shouldScrollToLastMessage = this.messagesElement.isScrolledToBottom(); 218 217 219 if (msg instanceof WebInspector.ConsoleMessage && !(msg instanceof WebInspector.ConsoleCommandResult)) { 218 220 this._incrementErrorWarningCount(msg); … … 242 244 } 243 245 244 this._scheduleScrollIntoView(); 246 if (shouldScrollToLastMessage) 247 this._scheduleScrollIntoView(); 245 248 }, 246 249 -
trunk/WebCore/inspector/front-end/DataGrid.js
r73913 r74193 496 496 isScrolledToLastRow: function() 497 497 { 498 return this._scrollContainer. scrollTop === this._scrollContainer.scrollHeight - this._scrollContainer.offsetHeight;498 return this._scrollContainer.isScrolledToBottom(); 499 499 }, 500 500 -
trunk/WebCore/inspector/front-end/utilities.js
r72737 r74193 215 215 sibling = nextSibling; 216 216 } 217 } 218 219 Element.prototype.isScrolledToBottom = function() 220 { 221 return this.scrollTop === this.scrollHeight - this.offsetHeight; 217 222 } 218 223
Note: See TracChangeset
for help on using the changeset viewer.