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

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

Issue 2272193002: [DevTools] Extract small-bubble component. (Closed)
Patch Set: Created 4 years, 4 months 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/ConsoleViewMessage.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
index 88394e264d6298cd10b887e4860b92ad36993763..68fb24cbe1c6b2e8f8f597c8958cbbe543b55c00 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
@@ -888,7 +888,6 @@ WebInspector.ConsoleViewMessage.prototype = {
if (show && !this.timestampElement) {
this.timestampElement = createElementWithClass("span", "console-timestamp");
this.timestampElement.textContent = (new Date(this._message.timestamp)).toConsoleTime() + " ";
- var afterRepeatCountChild = this._repeatCountElement && this._repeatCountElement.nextSibling;
this._formattedMessage.insertBefore(this.timestampElement, this._formattedMessage.firstChild);
return;
}
@@ -1042,9 +1041,20 @@ WebInspector.ConsoleViewMessage.prototype = {
return;
if (!this._repeatCountElement) {
- this._repeatCountElement = createElement("span");
- this._repeatCountElement.className = "bubble-repeat-count";
-
+ this._repeatCountElement = createElementWithClass("label", "console-message-repeat-count", "dt-small-bubble");
+ switch (this._message.level) {
+ case WebInspector.ConsoleMessage.MessageLevel.Warning:
+ this._repeatCountElement.type = "warning";
+ break;
+ case WebInspector.ConsoleMessage.MessageLevel.Error:
+ this._repeatCountElement.type = "error";
+ break;
+ case WebInspector.ConsoleMessage.MessageLevel.Debug:
+ this._repeatCountElement.type = "debug";
+ break;
+ default:
+ this._repeatCountElement.type = "info";
+ }
this._element.insertBefore(this._repeatCountElement, this._element.firstChild);
this._element.classList.add("repeated-message");
}
« no previous file with comments | « third_party/WebKit/Source/devtools/devtools.gypi ('k') | third_party/WebKit/Source/devtools/front_end/console/consoleView.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698