OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 /** | 872 /** |
873 * @param {boolean} show | 873 * @param {boolean} show |
874 */ | 874 */ |
875 updateTimestamp: function(show) | 875 updateTimestamp: function(show) |
876 { | 876 { |
877 if (!this._formattedMessage) | 877 if (!this._formattedMessage) |
878 return; | 878 return; |
879 | 879 |
880 if (show && !this.timestampElement) { | 880 if (show && !this.timestampElement) { |
881 this.timestampElement = createElementWithClass("span", "console-time
stamp"); | 881 this.timestampElement = createElementWithClass("span", "console-time
stamp"); |
| 882 this.timestampElement.addEventListener("dblclick", revealSetting, fa
lse); |
882 this.timestampElement.textContent = (new Date(this._message.timestam
p)).toConsoleTime() + " "; | 883 this.timestampElement.textContent = (new Date(this._message.timestam
p)).toConsoleTime() + " "; |
883 var afterRepeatCountChild = this._repeatCountElement && this._repeat
CountElement.nextSibling; | 884 var afterRepeatCountChild = this._repeatCountElement && this._repeat
CountElement.nextSibling; |
884 this._formattedMessage.insertBefore(this.timestampElement, this._for
mattedMessage.firstChild); | 885 this._formattedMessage.insertBefore(this.timestampElement, this._for
mattedMessage.firstChild); |
885 return; | 886 return; |
886 } | 887 } |
887 | 888 |
888 if (!show && this.timestampElement) { | 889 if (!show && this.timestampElement) { |
889 this.timestampElement.remove(); | 890 this.timestampElement.remove(); |
890 delete this.timestampElement; | 891 delete this.timestampElement; |
891 } | 892 } |
| 893 |
| 894 function revealSetting() |
| 895 { |
| 896 WebInspector.Revealer.reveal(WebInspector.moduleSetting("consoleTime
stampsEnabled")); |
| 897 } |
892 }, | 898 }, |
893 | 899 |
894 /** | 900 /** |
895 * @return {number} | 901 * @return {number} |
896 */ | 902 */ |
897 nestingLevel: function() | 903 nestingLevel: function() |
898 { | 904 { |
899 return this._nestingLevel; | 905 return this._nestingLevel; |
900 }, | 906 }, |
901 | 907 |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 { | 1324 { |
1319 if (!this._wrapperElement) { | 1325 if (!this._wrapperElement) { |
1320 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); | 1326 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); |
1321 this._wrapperElement.classList.toggle("collapsed", this._collapsed); | 1327 this._wrapperElement.classList.toggle("collapsed", this._collapsed); |
1322 } | 1328 } |
1323 return this._wrapperElement; | 1329 return this._wrapperElement; |
1324 }, | 1330 }, |
1325 | 1331 |
1326 __proto__: WebInspector.ConsoleViewMessage.prototype | 1332 __proto__: WebInspector.ConsoleViewMessage.prototype |
1327 } | 1333 } |
OLD | NEW |