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 13e3af830b030d1189e5dee9cbe1d2d0fb148c50..7ec7effb7347488b35b4f7759666b009ca3aa61d 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js |
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js |
@@ -122,9 +122,6 @@ Console.ConsoleViewMessage = class { |
iconType = 'smallicon-command-result'; |
this._decorationWrapper.appendChild(UI.Icon.create(iconType, 'message-level-icon')); |
- // Timestamps may affect repeat counter. |
- this._updateRepeatCountElement(); |
pfeldman
2017/02/21 19:21:12
I'd rather do it the other way around and create i
luoe
2017/02/23 01:09:34
I tried placing message.updateMessageElement() ins
|
- |
/** |
* @param {number} timestamp |
* @param {boolean} full |
@@ -955,11 +952,17 @@ Console.ConsoleViewMessage = class { |
* @return {!Element} |
*/ |
toMessageElement() { |
- if (this._element) |
- return this._element; |
+ if (!this._element) { |
+ this._element = createElement('div'); |
+ this.updateMessageElement(); |
+ } |
+ |
+ // Update repeat count. |
+ var show = this._repeatCount > 1; |
+ this._repeatCountElement.textContent = show ? this._repeatCount : ''; |
+ this._repeatCountElement.classList.toggle('hidden', !show); |
+ this._element.classList.toggle('repeated-message', show); |
- this._element = createElement('div'); |
- this.updateMessageElement(); |
return this._element; |
} |
@@ -1029,22 +1032,10 @@ Console.ConsoleViewMessage = class { |
resetIncrementRepeatCount() { |
this._repeatCount = 1; |
- this._updateRepeatCountElement(); |
} |
incrementRepeatCount() { |
this._repeatCount++; |
- this._updateRepeatCountElement(); |
- } |
- |
- _updateRepeatCountElement() { |
- if (!this._repeatCountElement) |
- return; |
- var show = this._repeatCount > 1; |
- this._repeatCountElement.textContent = show ? this._repeatCount : ''; |
- this._repeatCountElement.classList.toggle('hidden', !show); |
- if (this._element) |
- this._element.classList.toggle('repeated-message', show); |
} |
get text() { |