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

Unified Diff: Source/devtools/front_end/ConsoleViewMessage.js

Issue 214693005: DevTools: [Console] Display timestamps when the Console timestamps setting is re-enabled (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/devtools/front_end/ConsoleView.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ConsoleViewMessage.js
diff --git a/Source/devtools/front_end/ConsoleViewMessage.js b/Source/devtools/front_end/ConsoleViewMessage.js
index 4fba89e89640734767c395993c606a502cad36b0..1e9b0b3b3fcd344e5175ea68d2e262844f8867c8 100644
--- a/Source/devtools/front_end/ConsoleViewMessage.js
+++ b/Source/devtools/front_end/ConsoleViewMessage.js
@@ -52,8 +52,6 @@ WebInspector.ConsoleViewMessage = function(target, consoleMessage, linkifier)
"node": this._formatParameterAsNode,
"string": this._formatParameterAsString
};
-
- WebInspector.settings.consoleTimestampsEnabled.addChangeListener(this._consoleTimestampsSettingChanged, this);
}
WebInspector.ConsoleViewMessage.prototype = {
@@ -871,7 +869,7 @@ WebInspector.ConsoleViewMessage.prototype = {
return regexObject.test(this._formattedMessageText()) || (!!this._anchorElement && regexObject.test(this._anchorElement.textContent));
},
- _updateTimestamp: function(show)
+ updateTimestamp: function(show)
{
if (!this._element)
return;
@@ -884,14 +882,10 @@ WebInspector.ConsoleViewMessage.prototype = {
return;
}
- if (!show && this.timestampElement)
+ if (!show && this.timestampElement) {
this.timestampElement.remove();
- },
-
- _consoleTimestampsSettingChanged: function(event)
- {
- var enabled = /** @type {boolean} */ (event.data);
- this._updateTimestamp(enabled);
+ delete this.timestampElement;
+ }
},
/**
@@ -934,7 +928,7 @@ WebInspector.ConsoleViewMessage.prototype = {
if (this._repeatCount > 1)
this._showRepeatCountElement();
- this._updateTimestamp(WebInspector.settings.consoleTimestampsEnabled.get());
+ this.updateTimestamp(WebInspector.settings.consoleTimestampsEnabled.get());
return element;
},
« no previous file with comments | « Source/devtools/front_end/ConsoleView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698