Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/XMLView.js

Issue 2769843003: DevTools: split text_utils out of common module (Closed)
Patch Set: rebaseline Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @implements {UI.Searchable} 5 * @implements {UI.Searchable}
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Network.XMLView = class extends UI.Widget { 8 Network.XMLView = class extends UI.Widget {
9 /** 9 /**
10 * @param {!Document} parsedXML 10 * @param {!Document} parsedXML
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 if (this._closeTag && this.parent && !this.parent.expanded) 263 if (this._closeTag && this.parent && !this.parent.expanded)
264 return false; 264 return false;
265 regex.lastIndex = 0; 265 regex.lastIndex = 0;
266 var cssClasses = UI.highlightedSearchResultClassName; 266 var cssClasses = UI.highlightedSearchResultClassName;
267 if (additionalCssClassName) 267 if (additionalCssClassName)
268 cssClasses += ' ' + additionalCssClassName; 268 cssClasses += ' ' + additionalCssClassName;
269 var content = this.listItemElement.textContent.replace(/\xA0/g, ' '); 269 var content = this.listItemElement.textContent.replace(/\xA0/g, ' ');
270 var match = regex.exec(content); 270 var match = regex.exec(content);
271 var ranges = []; 271 var ranges = [];
272 while (match) { 272 while (match) {
273 ranges.push(new Common.SourceRange(match.index, match[0].length)); 273 ranges.push(new TextUtils.SourceRange(match.index, match[0].length));
274 match = regex.exec(content); 274 match = regex.exec(content);
275 } 275 }
276 if (ranges.length) 276 if (ranges.length)
277 UI.highlightRangesWithStyleClass(this.listItemElement, ranges, cssClasses, this._highlightChanges); 277 UI.highlightRangesWithStyleClass(this.listItemElement, ranges, cssClasses, this._highlightChanges);
278 return !!this._highlightChanges.length; 278 return !!this._highlightChanges.length;
279 } 279 }
280 280
281 revertHighlightChanges() { 281 revertHighlightChanges() {
282 UI.revertDomChanges(this._highlightChanges); 282 UI.revertDomChanges(this._highlightChanges);
283 this._highlightChanges = []; 283 this._highlightChanges = [];
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 } 366 }
367 367
368 /** 368 /**
369 * @override 369 * @override
370 */ 370 */
371 onpopulate() { 371 onpopulate() {
372 Network.XMLView.Node.populate(this, this._node, this._xmlView); 372 Network.XMLView.Node.populate(this, this._node, this._xmlView);
373 this.appendChild(new Network.XMLView.Node(this._node, true, this._xmlView)); 373 this.appendChild(new Network.XMLView.Node(this._node, true, this._xmlView));
374 } 374 }
375 }; 375 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698