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