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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.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/sources/UISourceCodeFrame.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js b/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
index 80565d63fb8b7f53b67a5a87eef9a7d4cad0e89d..2be5323b8308c26e88c10f81d399c22dc662666a 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
@@ -422,6 +422,10 @@ WebInspector.UISourceCodeFrame._iconClassPerLevel = {};
WebInspector.UISourceCodeFrame._iconClassPerLevel[WebInspector.UISourceCode.Message.Level.Error] = "error-icon";
WebInspector.UISourceCodeFrame._iconClassPerLevel[WebInspector.UISourceCode.Message.Level.Warning] = "warning-icon";
+WebInspector.UISourceCodeFrame._bubbleTypePerLevel = {};
+WebInspector.UISourceCodeFrame._bubbleTypePerLevel[WebInspector.UISourceCode.Message.Level.Error] = "error";
+WebInspector.UISourceCodeFrame._bubbleTypePerLevel[WebInspector.UISourceCode.Message.Level.Warning] = "warning";
+
WebInspector.UISourceCodeFrame._lineClassPerLevel = {};
WebInspector.UISourceCodeFrame._lineClassPerLevel[WebInspector.UISourceCode.Message.Level.Error] = "text-editor-line-with-error";
WebInspector.UISourceCodeFrame._lineClassPerLevel[WebInspector.UISourceCode.Message.Level.Warning] = "text-editor-line-with-warning";
@@ -450,7 +454,8 @@ WebInspector.UISourceCodeFrame.RowMessage = function(message)
this.element = createElementWithClass("div", "text-editor-row-message");
this._icon = this.element.createChild("label", "", "dt-icon-label");
this._icon.type = WebInspector.UISourceCodeFrame._iconClassPerLevel[message.level()];
- this._repeatCountElement = this.element.createChild("span", "bubble-repeat-count hidden error");
+ this._repeatCountElement = this.element.createChild("label", "message-repeat-count hidden", "dt-small-bubble");
+ this._repeatCountElement.type = WebInspector.UISourceCodeFrame._bubbleTypePerLevel[message.level()];
var linesContainer = this.element.createChild("div", "text-editor-row-message-lines");
var lines = this._message.text().split("\n");
for (var i = 0; i < lines.length; ++i) {

Powered by Google App Engine
This is Rietveld 408576698