| 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 29 matching lines...) Expand all Loading... |
| 40 this._message = consoleMessage; | 40 this._message = consoleMessage; |
| 41 this._linkifier = linkifier; | 41 this._linkifier = linkifier; |
| 42 this._repeatCount = 1; | 42 this._repeatCount = 1; |
| 43 this._closeGroupDecorationCount = 0; | 43 this._closeGroupDecorationCount = 0; |
| 44 this._nestingLevel = nestingLevel; | 44 this._nestingLevel = nestingLevel; |
| 45 | 45 |
| 46 /** @type {?WebInspector.DataGrid} */ | 46 /** @type {?WebInspector.DataGrid} */ |
| 47 this._dataGrid = null; | 47 this._dataGrid = null; |
| 48 this._previewFormatter = new WebInspector.RemoteObjectPreviewFormatter(); | 48 this._previewFormatter = new WebInspector.RemoteObjectPreviewFormatter(); |
| 49 this._searchRegex = null; | 49 this._searchRegex = null; |
| 50 } | 50 }; |
| 51 | 51 |
| 52 WebInspector.ConsoleViewMessage.prototype = { | 52 WebInspector.ConsoleViewMessage.prototype = { |
| 53 /** | 53 /** |
| 54 * @return {?WebInspector.Target} | 54 * @return {?WebInspector.Target} |
| 55 */ | 55 */ |
| 56 _target: function() | 56 _target: function() |
| 57 { | 57 { |
| 58 return this.consoleMessage().target(); | 58 return this.consoleMessage().target(); |
| 59 }, | 59 }, |
| 60 | 60 |
| (...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1209 formattedResult.appendChild(WebInspector.linkifyStringAsFragment(str
ing.substring(start, links[i].positionLeft))); | 1209 formattedResult.appendChild(WebInspector.linkifyStringAsFragment(str
ing.substring(start, links[i].positionLeft))); |
| 1210 formattedResult.appendChild(this._linkifier.linkifyScriptLocation(ta
rget, null, links[i].url, links[i].lineNumber, links[i].columnNumber)); | 1210 formattedResult.appendChild(this._linkifier.linkifyScriptLocation(ta
rget, null, links[i].url, links[i].lineNumber, links[i].columnNumber)); |
| 1211 start = links[i].positionRight; | 1211 start = links[i].positionRight; |
| 1212 } | 1212 } |
| 1213 | 1213 |
| 1214 if (start !== string.length) | 1214 if (start !== string.length) |
| 1215 formattedResult.appendChild(WebInspector.linkifyStringAsFragment(str
ing.substring(start))); | 1215 formattedResult.appendChild(WebInspector.linkifyStringAsFragment(str
ing.substring(start))); |
| 1216 | 1216 |
| 1217 return formattedResult; | 1217 return formattedResult; |
| 1218 } | 1218 } |
| 1219 } | 1219 }; |
| 1220 | 1220 |
| 1221 /** | 1221 /** |
| 1222 * @constructor | 1222 * @constructor |
| 1223 * @extends {WebInspector.ConsoleViewMessage} | 1223 * @extends {WebInspector.ConsoleViewMessage} |
| 1224 * @param {!WebInspector.ConsoleMessage} consoleMessage | 1224 * @param {!WebInspector.ConsoleMessage} consoleMessage |
| 1225 * @param {!WebInspector.Linkifier} linkifier | 1225 * @param {!WebInspector.Linkifier} linkifier |
| 1226 * @param {number} nestingLevel | 1226 * @param {number} nestingLevel |
| 1227 */ | 1227 */ |
| 1228 WebInspector.ConsoleGroupViewMessage = function(consoleMessage, linkifier, nesti
ngLevel) | 1228 WebInspector.ConsoleGroupViewMessage = function(consoleMessage, linkifier, nesti
ngLevel) |
| 1229 { | 1229 { |
| 1230 console.assert(consoleMessage.isGroupStartMessage()); | 1230 console.assert(consoleMessage.isGroupStartMessage()); |
| 1231 WebInspector.ConsoleViewMessage.call(this, consoleMessage, linkifier, nestin
gLevel); | 1231 WebInspector.ConsoleViewMessage.call(this, consoleMessage, linkifier, nestin
gLevel); |
| 1232 this.setCollapsed(consoleMessage.type === WebInspector.ConsoleMessage.Messag
eType.StartGroupCollapsed); | 1232 this.setCollapsed(consoleMessage.type === WebInspector.ConsoleMessage.Messag
eType.StartGroupCollapsed); |
| 1233 } | 1233 }; |
| 1234 | 1234 |
| 1235 WebInspector.ConsoleGroupViewMessage.prototype = { | 1235 WebInspector.ConsoleGroupViewMessage.prototype = { |
| 1236 /** | 1236 /** |
| 1237 * @param {boolean} collapsed | 1237 * @param {boolean} collapsed |
| 1238 */ | 1238 */ |
| 1239 setCollapsed: function(collapsed) | 1239 setCollapsed: function(collapsed) |
| 1240 { | 1240 { |
| 1241 this._collapsed = collapsed; | 1241 this._collapsed = collapsed; |
| 1242 if (this._element) | 1242 if (this._element) |
| 1243 this._element.classList.toggle("collapsed", this._collapsed); | 1243 this._element.classList.toggle("collapsed", this._collapsed); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1258 toMessageElement: function() | 1258 toMessageElement: function() |
| 1259 { | 1259 { |
| 1260 if (!this._element) { | 1260 if (!this._element) { |
| 1261 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); | 1261 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); |
| 1262 this._element.classList.toggle("collapsed", this._collapsed); | 1262 this._element.classList.toggle("collapsed", this._collapsed); |
| 1263 } | 1263 } |
| 1264 return this._element; | 1264 return this._element; |
| 1265 }, | 1265 }, |
| 1266 | 1266 |
| 1267 __proto__: WebInspector.ConsoleViewMessage.prototype | 1267 __proto__: WebInspector.ConsoleViewMessage.prototype |
| 1268 } | 1268 }; |
| OLD | NEW |