Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (200358 => 200359)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-05-03 02:52:19 UTC (rev 200358)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-05-03 02:58:42 UTC (rev 200359)
@@ -1,3 +1,18 @@
+2016-05-02 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r200337.
+ https://bugs.webkit.org/show_bug.cgi?id=157294
+
+ Console hangs when evaluating expresisons (Requested by
+ JoePeck on #webkit).
+
+ Reverted changeset:
+
+ "Web Inspector: Adding a new console message shouldn't modify
+ DOM when the console log is hidden"
+ https://bugs.webkit.org/show_bug.cgi?id=155629
+ http://trac.webkit.org/changeset/200337
+
2016-05-02 Joseph Pecoraro <[email protected]>
Web Inspector: Unexpected "Script Element #" resources in Debugger Sidebar
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js (200358 => 200359)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js 2016-05-03 02:52:19 UTC (rev 200358)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js 2016-05-03 02:58:42 UTC (rev 200359)
@@ -60,9 +60,6 @@
this._promptFindNextKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "G", this._handleFindNextShortcut.bind(this), this._prompt.element);
this._promptFindPreviousKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Shift, "G", this._handleFindPreviousShortcut.bind(this), this._prompt.element);
- this._pendingMessages = [];
- this._scheduledRenderIdentifier = 0;
-
this.startNewSession();
}
@@ -255,7 +252,7 @@
_appendConsoleMessageView(messageView, repeatCountWasInterrupted)
{
- this._pendingMessages.push(messageView);
+ var wasScrolledToBottom = this.isScrolledToBottom();
this._cleared = false;
this._repeatCountWasInterrupted = repeatCountWasInterrupted || false;
@@ -266,45 +263,6 @@
if (messageView.message && messageView.message.source !== WebInspector.ConsoleMessage.MessageSource.JS)
this._lastCommitted = "";
- if (WebInspector.consoleContentView.visible)
- this.renderPendingMessagesSoon();
- }
-
- renderPendingMessages()
- {
- if (this._scheduledRenderIdentifier) {
- cancelAnimationFrame(this._scheduledRenderIdentifier);
- this._scheduledRenderIdentifier = 0;
- }
-
- if (this._pendingMessages.length === 0)
- return;
-
- let lastMessageView = this._pendingMessages.lastValue;
- let isCommandView = lastMessageView instanceof WebInspector.ConsoleCommandView;
- let shouldScrollToBottom = isCommandView || lastMessageView.message.type === WebInspector.ConsoleMessage.MessageType.Result || this.isScrolledToBottom();
-
- for (let messageView of this._pendingMessages) {
- messageView.render();
- this._didRenderConsoleMessageView(messageView);
- }
-
- this._pendingMessages = [];
-
- if (shouldScrollToBottom)
- this.scrollToBottom();
- }
-
- renderPendingMessagesSoon()
- {
- if (this._scheduledRenderIdentifier)
- return;
-
- this._scheduledRenderIdentifier = requestAnimationFrame(() => this.renderPendingMessages());
- }
-
- _didRenderConsoleMessageView(messageView)
- {
var type = messageView instanceof WebInspector.ConsoleCommandView ? null : messageView.message.type;
if (type === WebInspector.ConsoleMessage.MessageType.EndGroup) {
var parentGroup = this._currentConsoleGroup.parentGroup;
@@ -320,6 +278,9 @@
this._currentConsoleGroup.addMessageView(messageView);
}
+ if (type === WebInspector.ConsoleMessage.MessageType.Result || wasScrolledToBottom)
+ this.scrollToBottom();
+
if (this.delegate && typeof this.delegate.didAppendConsoleMessageView === "function")
this.delegate.didAppendConsoleMessageView(messageView);
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js (200358 => 200359)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js 2016-05-03 02:52:19 UTC (rev 200358)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js 2016-05-03 02:58:42 UTC (rev 200359)
@@ -34,19 +34,13 @@
super();
this._commandText = commandText;
- this._className = className || "";
- }
- // Public
-
- render()
- {
this._element = document.createElement("div");
this._element.classList.add("console-user-command");
this._element.setAttribute("data-labelprefix", WebInspector.UIString("Input: "));
- if (this._className)
- this._element.classList.add(this._className);
+ if (className)
+ this._element.classList.add(className);
this._formattedCommandElement = this._element.appendChild(document.createElement("span"));
this._formattedCommandElement.classList.add("console-message-text");
@@ -56,6 +50,8 @@
this._element.__commandView = this;
}
+ // Public
+
get element()
{
return this._element;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js (200358 => 200359)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js 2016-05-03 02:52:19 UTC (rev 200358)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js 2016-05-03 02:58:42 UTC (rev 200359)
@@ -37,18 +37,9 @@
console.assert(message instanceof WebInspector.ConsoleMessage);
this._message = message;
+
this._expandable = false;
- this._repeatCount = message._repeatCount || 0;
- // These are the parameters unused by the messages's optional format string.
- // Any extra parameters will be displayed as children of this message.
- this._extraParameters = message.parameters;
- }
-
- // Public
-
- render()
- {
this._element = document.createElement("div");
this._element.classList.add("console-message");
@@ -85,6 +76,10 @@
break;
}
+ // These are the parameters unused by the messages's optional format string.
+ // Any extra parameters will be displayed as children of this message.
+ this._extraParameters = this._message.parameters;
+
// FIXME: The location link should include stack trace information.
this._appendLocationLink();
@@ -97,9 +92,11 @@
this._appendExtraParameters();
this._appendStackTrace();
- this._renderRepeatCount();
+ this.repeatCount = this._message.repeatCount;
}
+ // Public
+
get element()
{
return this._element;
@@ -124,14 +121,6 @@
this._repeatCount = count;
- if (this._element)
- this._renderRepeatCount();
- }
-
- _renderRepeatCount()
- {
- let count = this._repeatCount;
-
if (count <= 1) {
if (this._repeatCountElement) {
this._repeatCountElement.remove();
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js (200358 => 200359)
--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js 2016-05-03 02:52:19 UTC (rev 200358)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js 2016-05-03 02:58:42 UTC (rev 200359)
@@ -122,11 +122,6 @@
return this.messagesElement.classList.contains(WebInspector.LogContentView.SearchInProgressStyleClassName);
}
- shown()
- {
- this._logViewController.renderPendingMessages();
- }
-
didAppendConsoleMessageView(messageView)
{
console.assert(messageView instanceof WebInspector.ConsoleMessageView || messageView instanceof WebInspector.ConsoleCommandView);
@@ -160,14 +155,6 @@
// We want to remove focusable children after those pending dispatches too.
InspectorBackend.runAfterPendingDispatches(this._clearFocusableChildren.bind(this));
- if (type && type !== WebInspector.ConsoleMessage.MessageType.EndGroup) {
- console.assert(messageView.message instanceof WebInspector.ConsoleMessage);
- this._markScopeBarItemUnread(messageView.message.level);
-
- console.assert(messageView.element instanceof Element);
- this._filterMessageElements([messageView.element]);
- }
-
// We only auto show the console if the message is a non-synthetic result.
// This is when the user evaluated something directly in the prompt.
if (type !== WebInspector.ConsoleMessage.MessageType.Result || messageView.message.synthetic)
@@ -175,6 +162,8 @@
if (!WebInspector.isShowingConsoleTab())
WebInspector.showSplitConsole();
+
+ this._logViewController.scrollToBottom();
}
get supportsSearch()
@@ -320,7 +309,7 @@
return messageLevel;
}
- _markScopeBarItemUnread(level)
+ _pulseScopeBarItemBorder(level)
{
var messageLevel = this._scopeFromMessageLevel(level);
@@ -338,13 +327,17 @@
if (this._startedProvisionalLoad)
this._provisionalMessages.push(event.data.message);
- this._logViewController.appendConsoleMessage(event.data.message);
+ this._lastMessageView = this._logViewController.appendConsoleMessage(event.data.message);
+ if (this._lastMessageView.message.type !== WebInspector.ConsoleMessage.MessageType.EndGroup) {
+ this._pulseScopeBarItemBorder(this._lastMessageView.message.level);
+ this._filterMessageElements([this._lastMessageView.element]);
+ }
}
_previousMessageRepeatCountUpdated(event)
{
if (this._logViewController.updatePreviousMessageRepeatCount(event.data.count) && this._lastMessageView)
- this._markScopeBarItemUnread(this._lastMessageView.message.level);
+ this._pulseScopeBarItemBorder(this._lastMessageView.message.level);
}
_handleContextMenuEvent(event)