[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
yurys at chromium.org
yurys at chromium.org
Wed Dec 22 18:43:33 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e360c2fb378b51be83a8ada731738fd34c640423
Author: yurys at chromium.org <yurys at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 16 16:56:53 2010 +0000
2010-12-16 Yury Semikhatsky <yurys at chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: Console always scroll to the bottom on new events
https://bugs.webkit.org/show_bug.cgi?id=51189
When new messages are added to the console it will auto scroll
only if it was already scrolled down to the last record.
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._scheduleScrollIntoView.scrollIntoView):
(WebInspector.ConsoleView.prototype._scheduleScrollIntoView):
(WebInspector.ConsoleView.prototype._isScrolledToLastMessage):
(WebInspector.ConsoleView.prototype.addMessage):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index da514ce..55983a3 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-12-16 Yury Semikhatsky <yurys at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Console always scroll to the bottom on new events
+ https://bugs.webkit.org/show_bug.cgi?id=51189
+
+ When new messages are added to the console it will auto scroll
+ only if it was already scrolled down to the last record.
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype._scheduleScrollIntoView.scrollIntoView):
+ (WebInspector.ConsoleView.prototype._scheduleScrollIntoView):
+ (WebInspector.ConsoleView.prototype._isScrolledToLastMessage):
+ (WebInspector.ConsoleView.prototype.addMessage):
+
2010-12-16 Pavel Podivilov <podivilov at chromium.org>
Reviewed by Yury Semikhatsky.
diff --git a/WebCore/inspector/front-end/ConsoleView.js b/WebCore/inspector/front-end/ConsoleView.js
index a582bfb..9e737bc 100644
--- a/WebCore/inspector/front-end/ConsoleView.js
+++ b/WebCore/inspector/front-end/ConsoleView.js
@@ -206,7 +206,7 @@ WebInspector.ConsoleView.prototype = {
function scrollIntoView()
{
- this.promptElement.scrollIntoView(false);
+ this.promptElement.scrollIntoView(true);
delete this._scrollIntoViewTimer;
}
this._scrollIntoViewTimer = setTimeout(scrollIntoView.bind(this), 20);
@@ -214,6 +214,8 @@ WebInspector.ConsoleView.prototype = {
addMessage: function(msg)
{
+ var shouldScrollToLastMessage = this.messagesElement.isScrolledToBottom();
+
if (msg instanceof WebInspector.ConsoleMessage && !(msg instanceof WebInspector.ConsoleCommandResult)) {
this._incrementErrorWarningCount(msg);
WebInspector.resourceManager.addConsoleMessage(msg);
@@ -241,7 +243,8 @@ WebInspector.ConsoleView.prototype = {
this.currentGroup.addMessage(msg);
}
- this._scheduleScrollIntoView();
+ if (shouldScrollToLastMessage)
+ this._scheduleScrollIntoView();
},
updateMessageRepeatCount: function(count)
diff --git a/WebCore/inspector/front-end/DataGrid.js b/WebCore/inspector/front-end/DataGrid.js
index 52995d4..5831d1e 100644
--- a/WebCore/inspector/front-end/DataGrid.js
+++ b/WebCore/inspector/front-end/DataGrid.js
@@ -495,7 +495,7 @@ WebInspector.DataGrid.prototype = {
isScrolledToLastRow: function()
{
- return this._scrollContainer.scrollTop === this._scrollContainer.scrollHeight - this._scrollContainer.offsetHeight;
+ return this._scrollContainer.isScrolledToBottom();
},
scrollToLastRow: function()
diff --git a/WebCore/inspector/front-end/utilities.js b/WebCore/inspector/front-end/utilities.js
index f978c6f..688e080 100644
--- a/WebCore/inspector/front-end/utilities.js
+++ b/WebCore/inspector/front-end/utilities.js
@@ -216,6 +216,11 @@ Element.prototype.pruneEmptyTextNodes = function()
}
}
+Element.prototype.isScrolledToBottom = function()
+{
+ return this.scrollTop === this.scrollHeight - this.offsetHeight;
+}
+
Node.prototype.enclosingNodeOrSelfWithNodeNameInArray = function(nameArray)
{
for (var node = this; node && node !== this.ownerDocument; node = node.parentNode)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list