Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Unified Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js

Issue 2538673002: DevTools: [Console] migrate all of the smallIcons in consoleView.css (Closed)
Patch Set: rebaseline test Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
index 9373f9e5154eeecfb305afadfd35a98dd4253021..6f0d6aa9836a3ef806e4333544ba3b655ea86b3f 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
@@ -103,6 +103,8 @@ Console.ConsoleView = class extends UI.VBox {
this._currentGroup = this._topGroup;
this._promptElement = this._messagesElement.createChild('div', 'source-code');
+ var promptIcon = UI.Icon.create('smallicon-text-prompt', 'console-prompt-icon');
+ this._promptElement.appendChild(promptIcon);
this._promptElement.id = 'console-prompt';
this._promptElement.addEventListener('input', this._promptInput.bind(this), false);
@@ -1205,6 +1207,9 @@ Console.ConsoleCommand = class extends Console.ConsoleViewMessage {
contentElement() {
if (!this._contentElement) {
this._contentElement = createElementWithClass('div', 'console-user-command');
+ var icon = UI.Icon.create('smallicon-user-command', 'command-result-icon');
+ this._contentElement.appendChild(icon);
+
this._contentElement.message = this;
this._formattedCommand = createElementWithClass('span', 'source-code');
@@ -1253,6 +1258,10 @@ Console.ConsoleCommandResult = class extends Console.ConsoleViewMessage {
contentElement() {
var element = super.contentElement();
element.classList.add('console-user-command-result');
+ if (this.consoleMessage().level === SDK.ConsoleMessage.MessageLevel.Log) {
+ var icon = UI.Icon.create('smallicon-command-result', 'command-result-icon');
+ element.insertBefore(icon, element.firstChild);
+ }
this.updateTimestamp(false);
return element;
}

Powered by Google App Engine
This is Rietveld 408576698