- Revision
- 186634
- Author
- drou...@apple.com
- Date
- 2015-07-09 14:54:11 -0700 (Thu, 09 Jul 2015)
Log Message
Web Inspector: Special Logs to Console that do not have an _expression_ should be styled differently, looks like code
https://bugs.webkit.org/show_bug.cgi?id=143840
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/_javascript_LogViewController.js:
(WebInspector.WebInspector._javascript_LogViewController.appendImmediateExecutionWithResult):
Now applies a class to special logs initiated by the user (log element, log object, etc).
* UserInterface/Views/ConsoleCommandView.js:
(WebInspector.ConsoleCommandView): Added className parameter.
* UserInterface/Views/ConsoleMessageView.css:
(.console-user-command.selected-element-log):
(.console-user-command.special-user-log > .console-message-text):
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu):
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._logSymbolProperty):
(WebInspector.ObjectTreeBaseTreeElement.prototype._logValue):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (186633 => 186634)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-07-09 21:03:46 UTC (rev 186633)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-07-09 21:54:11 UTC (rev 186634)
@@ -1,5 +1,29 @@
2015-07-09 Devin Rousso <drou...@apple.com>
+ Web Inspector: Special Logs to Console that do not have an _expression_ should be styled differently, looks like code
+ https://bugs.webkit.org/show_bug.cgi?id=143840
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Controllers/_javascript_LogViewController.js:
+ (WebInspector.WebInspector._javascript_LogViewController.appendImmediateExecutionWithResult):
+ Now applies a class to special logs initiated by the user (log element, log object, etc).
+ * UserInterface/Views/ConsoleCommandView.js:
+ (WebInspector.ConsoleCommandView): Added className parameter.
+ * UserInterface/Views/ConsoleMessageView.css:
+ (.console-user-command.selected-element-log):
+ (.console-user-command.special-user-log > .console-message-text):
+ * UserInterface/Views/DOMTreeOutline.js:
+ (WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
+ (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
+ * UserInterface/Views/ObjectPreviewView.js:
+ (WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
+ * UserInterface/Views/ObjectTreeBaseTreeElement.js:
+ (WebInspector.ObjectTreeBaseTreeElement.prototype._logSymbolProperty):
+ (WebInspector.ObjectTreeBaseTreeElement.prototype._logValue):
+
+2015-07-09 Devin Rousso <drou...@apple.com>
+
Web Inspector: Checkbox disappears when unchecking CSS background style
https://bugs.webkit.org/show_bug.cgi?id=146776
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js (186633 => 186634)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js 2015-07-09 21:03:46 UTC (rev 186633)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js 2015-07-09 21:54:11 UTC (rev 186634)
@@ -119,11 +119,11 @@
consoleSession.element.scrollIntoView();
}
- appendImmediateExecutionWithResult(text, result)
+ appendImmediateExecutionWithResult(text, result, addSpecialUserLogClass)
{
console.assert(result instanceof WebInspector.RemoteObject);
- var commandMessageView = new WebInspector.ConsoleCommandView(text);
+ var commandMessageView = new WebInspector.ConsoleCommandView(text, addSpecialUserLogClass ? "special-user-log" : null);
this._appendConsoleMessageView(commandMessageView, true);
function saveResultCallback(savedResultIndex)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js (186633 => 186634)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js 2015-07-09 21:03:46 UTC (rev 186633)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleCommandView.js 2015-07-09 21:54:11 UTC (rev 186634)
@@ -29,7 +29,7 @@
WebInspector.ConsoleCommandView = class ConsoleCommandView extends WebInspector.Object
{
- constructor(commandText)
+ constructor(commandText, className)
{
super();
@@ -39,6 +39,9 @@
this._element.classList.add("console-user-command");
this._element.setAttribute("data-labelprefix", WebInspector.UIString("Input: "));
+ if (className)
+ this._element.classList.add(className);
+
this._formattedCommandElement = this._element.appendChild(document.createElement("span"));
this._formattedCommandElement.classList.add("console-message-text");
this._formattedCommandElement.textContent = this._commandText;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css (186633 => 186634)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css 2015-07-09 21:03:46 UTC (rev 186633)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css 2015-07-09 21:54:11 UTC (rev 186634)
@@ -29,6 +29,16 @@
min-height: 21px;
}
+.console-user-command.special-user-log > .console-message-text {
+ padding: 1px 6px;
+ border-radius: 3px;
+ border: 1px solid transparent;
+ background-color: rgb(34, 131, 246);
+ color: white;
+ font-size: 10px;
+ -webkit-user-select: none;
+}
+
.console-message .repeat-count {
display: inline-block;
float: left;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js (186633 => 186634)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js 2015-07-09 21:03:46 UTC (rev 186633)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js 2015-07-09 21:54:11 UTC (rev 186634)
@@ -512,7 +512,7 @@
if (!remoteObject)
return;
var text = WebInspector.UIString("Selected Element");
- WebInspector.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject);
+ WebInspector.consoleLogViewController.appendImmediateExecutionWithResult(text, remoteObject, true);
});
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js (186633 => 186634)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js 2015-07-09 21:03:46 UTC (rev 186633)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js 2015-07-09 21:54:11 UTC (rev 186634)
@@ -263,7 +263,7 @@
if (!isImpossible)
WebInspector.quickConsole.prompt.pushHistoryItem(text);
- WebInspector.consoleLogViewController.appendImmediateExecutionWithResult(text, this._remoteObject);
+ WebInspector.consoleLogViewController.appendImmediateExecutionWithResult(text, this._remoteObject, isImpossible);
}.bind(this));
contextMenu.show();
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js (186633 => 186634)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js 2015-07-09 21:03:46 UTC (rev 186633)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js 2015-07-09 21:54:11 UTC (rev 186634)
@@ -161,7 +161,7 @@
return;
var text = WebInspector.UIString("Selected Symbol");
- WebInspector.consoleLogViewController.appendImmediateExecutionWithResult(text, symbol);
+ WebInspector.consoleLogViewController.appendImmediateExecutionWithResult(text, symbol, true);
}
_logValue(value)
@@ -177,7 +177,7 @@
if (!isImpossible)
WebInspector.quickConsole.prompt.pushHistoryItem(text);
- WebInspector.consoleLogViewController.appendImmediateExecutionWithResult(text, resolvedValue);
+ WebInspector.consoleLogViewController.appendImmediateExecutionWithResult(text, resolvedValue, isImpossible);
}
_contextMenuHandler(event)