| 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 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1086 this._searchHighlightNodes = []; | 1086 this._searchHighlightNodes = []; |
| 1087 this._searchHiglightNodeChanges = []; | 1087 this._searchHiglightNodeChanges = []; |
| 1088 if (!this._searchRegex) | 1088 if (!this._searchRegex) |
| 1089 return; | 1089 return; |
| 1090 | 1090 |
| 1091 var text = this.contentElement().deepTextContent(); | 1091 var text = this.contentElement().deepTextContent(); |
| 1092 var match; | 1092 var match; |
| 1093 this._searchRegex.lastIndex = 0; | 1093 this._searchRegex.lastIndex = 0; |
| 1094 var sourceRanges = []; | 1094 var sourceRanges = []; |
| 1095 while ((match = this._searchRegex.exec(text)) && match[0]) | 1095 while ((match = this._searchRegex.exec(text)) && match[0]) |
| 1096 sourceRanges.push(new Common.SourceRange(match.index, match[0].length)); | 1096 sourceRanges.push(new TextUtils.SourceRange(match.index, match[0].length))
; |
| 1097 | 1097 |
| 1098 if (sourceRanges.length) { | 1098 if (sourceRanges.length) { |
| 1099 this._searchHighlightNodes = | 1099 this._searchHighlightNodes = |
| 1100 UI.highlightSearchResults(this.contentElement(), sourceRanges, this._s
earchHiglightNodeChanges); | 1100 UI.highlightSearchResults(this.contentElement(), sourceRanges, this._s
earchHiglightNodeChanges); |
| 1101 } | 1101 } |
| 1102 } | 1102 } |
| 1103 | 1103 |
| 1104 /** | 1104 /** |
| 1105 * @return {?RegExp} | 1105 * @return {?RegExp} |
| 1106 */ | 1106 */ |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1248 toMessageElement() { | 1248 toMessageElement() { |
| 1249 if (!this._element) { | 1249 if (!this._element) { |
| 1250 super.toMessageElement(); | 1250 super.toMessageElement(); |
| 1251 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); | 1251 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); |
| 1252 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); | 1252 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); |
| 1253 this.setCollapsed(this._collapsed); | 1253 this.setCollapsed(this._collapsed); |
| 1254 } | 1254 } |
| 1255 return this._element; | 1255 return this._element; |
| 1256 } | 1256 } |
| 1257 }; | 1257 }; |
| OLD | NEW |