| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 for (var i = 0; this._dataGrids && i < this._dataGrids.length; ++i) { | 79 for (var i = 0; this._dataGrids && i < this._dataGrids.length; ++i) { |
| 80 var dataGrid = this._dataGrids[i]; | 80 var dataGrid = this._dataGrids[i]; |
| 81 var parentElement = this._dataGridParents.get(dataGrid) || null; | 81 var parentElement = this._dataGridParents.get(dataGrid) || null; |
| 82 dataGrid.show(parentElement); | 82 dataGrid.show(parentElement); |
| 83 dataGrid.updateWidths(); | 83 dataGrid.updateWidths(); |
| 84 } | 84 } |
| 85 }, | 85 }, |
| 86 | 86 |
| 87 cacheFastHeight: function() | 87 cacheFastHeight: function() |
| 88 { | 88 { |
| 89 this._cachedHeight = this.contentElement().clientHeight; | 89 this._cachedHeight = this.contentElement().offsetHeight; |
| 90 }, | 90 }, |
| 91 | 91 |
| 92 willHide: function() | 92 willHide: function() |
| 93 { | 93 { |
| 94 for (var i = 0; this._dataGrids && i < this._dataGrids.length; ++i) { | 94 for (var i = 0; this._dataGrids && i < this._dataGrids.length; ++i) { |
| 95 var dataGrid = this._dataGrids[i]; | 95 var dataGrid = this._dataGrids[i]; |
| 96 this._dataGridParents.put(dataGrid, dataGrid.element.parentElement); | 96 this._dataGridParents.put(dataGrid, dataGrid.element.parentElement); |
| 97 dataGrid.detach(); | 97 dataGrid.detach(); |
| 98 } | 98 } |
| 99 }, | 99 }, |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 }, | 899 }, |
| 900 | 900 |
| 901 highlightSearchResults: function(regexObject) | 901 highlightSearchResults: function(regexObject) |
| 902 { | 902 { |
| 903 if (!this._formattedMessage) | 903 if (!this._formattedMessage) |
| 904 return; | 904 return; |
| 905 | 905 |
| 906 this._highlightSearchResultsInElement(regexObject, this._messageElement)
; | 906 this._highlightSearchResultsInElement(regexObject, this._messageElement)
; |
| 907 if (this._anchorElement) | 907 if (this._anchorElement) |
| 908 this._highlightSearchResultsInElement(regexObject, this._anchorEleme
nt); | 908 this._highlightSearchResultsInElement(regexObject, this._anchorEleme
nt); |
| 909 | |
| 910 this._element.scrollIntoViewIfNeeded(); | |
| 911 }, | 909 }, |
| 912 | 910 |
| 913 _highlightSearchResultsInElement: function(regexObject, element) | 911 _highlightSearchResultsInElement: function(regexObject, element) |
| 914 { | 912 { |
| 915 regexObject.lastIndex = 0; | 913 regexObject.lastIndex = 0; |
| 916 var text = element.textContent; | 914 var text = element.textContent; |
| 917 var match = regexObject.exec(text); | 915 var match = regexObject.exec(text); |
| 918 var matchRanges = []; | 916 var matchRanges = []; |
| 919 while (match) { | 917 while (match) { |
| 920 matchRanges.push(new WebInspector.SourceRange(match.index, match[0].
length)); | 918 matchRanges.push(new WebInspector.SourceRange(match.index, match[0].
length)); |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1241 { | 1239 { |
| 1242 if (!this._wrapperElement) { | 1240 if (!this._wrapperElement) { |
| 1243 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); | 1241 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this
); |
| 1244 this._wrapperElement.classList.toggle("collapsed", this._collapsed); | 1242 this._wrapperElement.classList.toggle("collapsed", this._collapsed); |
| 1245 } | 1243 } |
| 1246 return this._wrapperElement; | 1244 return this._wrapperElement; |
| 1247 }, | 1245 }, |
| 1248 | 1246 |
| 1249 __proto__: WebInspector.ConsoleViewMessage.prototype | 1247 __proto__: WebInspector.ConsoleViewMessage.prototype |
| 1250 } | 1248 } |
| OLD | NEW |