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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 this._cachedHeight = this.contentElement().offsetHeight; | 111 this._cachedHeight = this.contentElement().offsetHeight; |
112 }, | 112 }, |
113 | 113 |
114 /** | 114 /** |
115 * @return {number} | 115 * @return {number} |
116 */ | 116 */ |
117 fastHeight: function() | 117 fastHeight: function() |
118 { | 118 { |
119 if (this._cachedHeight) | 119 if (this._cachedHeight) |
120 return this._cachedHeight; | 120 return this._cachedHeight; |
121 const defaultConsoleRowHeight = 18; // Sync with consoleView.css | 121 // This value reflects the 18px min-height of .console-message, plus the |
| 122 // 1px border of .console-message-wrapper. Keep in sync with consoleView
.css. |
| 123 const defaultConsoleRowHeight = 19; |
122 if (this._message.type === WebInspector.ConsoleMessage.MessageType.Table
) { | 124 if (this._message.type === WebInspector.ConsoleMessage.MessageType.Table
) { |
123 var table = this._message.parameters[0]; | 125 var table = this._message.parameters[0]; |
124 if (table && table.preview) | 126 if (table && table.preview) |
125 return defaultConsoleRowHeight * table.preview.properties.length
; | 127 return defaultConsoleRowHeight * table.preview.properties.length
; |
126 } | 128 } |
127 return defaultConsoleRowHeight; | 129 return defaultConsoleRowHeight; |
128 }, | 130 }, |
129 | 131 |
130 /** | 132 /** |
131 * @return {!WebInspector.ConsoleMessage} | 133 * @return {!WebInspector.ConsoleMessage} |
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1340 { | 1342 { |
1341 if (!this._wrapperElement) { | 1343 if (!this._wrapperElement) { |
1342 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); | 1344 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); |
1343 this._wrapperElement.classList.toggle("collapsed", this._collapsed); | 1345 this._wrapperElement.classList.toggle("collapsed", this._collapsed); |
1344 } | 1346 } |
1345 return this._wrapperElement; | 1347 return this._wrapperElement; |
1346 }, | 1348 }, |
1347 | 1349 |
1348 __proto__: WebInspector.ConsoleViewMessage.prototype | 1350 __proto__: WebInspector.ConsoleViewMessage.prototype |
1349 } | 1351 } |
OLD | NEW |