| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 Timeline.FlameChartStyle = { | 5 Timeline.FlameChartStyle = { |
| 6 textColor: '#333' | 6 textColor: '#333' |
| 7 }; | 7 }; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * @enum {symbol} | 10 * @enum {symbol} |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 return; | 363 return; |
| 364 var index = this._selectedSearchResult ? this._searchResults.indexOf(this._s
electedSearchResult) : 0; | 364 var index = this._selectedSearchResult ? this._searchResults.indexOf(this._s
electedSearchResult) : 0; |
| 365 this._jumpToSearchResult(index - 1); | 365 this._jumpToSearchResult(index - 1); |
| 366 } | 366 } |
| 367 | 367 |
| 368 /** | 368 /** |
| 369 * @override | 369 * @override |
| 370 * @return {boolean} | 370 * @return {boolean} |
| 371 */ | 371 */ |
| 372 supportsCaseSensitiveSearch() { | 372 supportsCaseSensitiveSearch() { |
| 373 return false; | 373 return true; |
| 374 } | 374 } |
| 375 | 375 |
| 376 /** | 376 /** |
| 377 * @override | 377 * @override |
| 378 * @return {boolean} | 378 * @return {boolean} |
| 379 */ | 379 */ |
| 380 supportsRegexSearch() { | 380 supportsRegexSearch() { |
| 381 return false; | 381 return true; |
| 382 } | 382 } |
| 383 | 383 |
| 384 /** | 384 /** |
| 385 * @param {number} index | 385 * @param {number} index |
| 386 */ | 386 */ |
| 387 _jumpToSearchResult(index) { | 387 _jumpToSearchResult(index) { |
| 388 this._selectSearchResult(mod(index, this._searchResults.length)); | 388 this._selectSearchResult(mod(index, this._searchResults.length)); |
| 389 this._highlightSearchResult(this._selectedSearchResult, this._searchRegex, t
rue); | 389 this._highlightSearchResult(this._selectedSearchResult, this._searchRegex, t
rue); |
| 390 } | 390 } |
| 391 | 391 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 delete this._searchRegex; | 462 delete this._searchRegex; |
| 463 } | 463 } |
| 464 | 464 |
| 465 /** | 465 /** |
| 466 * @override | 466 * @override |
| 467 * @param {!UI.SearchableView.SearchConfig} searchConfig | 467 * @param {!UI.SearchableView.SearchConfig} searchConfig |
| 468 * @param {boolean} shouldJump | 468 * @param {boolean} shouldJump |
| 469 * @param {boolean=} jumpBackwards | 469 * @param {boolean=} jumpBackwards |
| 470 */ | 470 */ |
| 471 performSearch(searchConfig, shouldJump, jumpBackwards) { | 471 performSearch(searchConfig, shouldJump, jumpBackwards) { |
| 472 var query = searchConfig.query; | 472 this._searchRegex = searchConfig.toSearchRegex(); |
| 473 this._searchRegex = createPlainTextSearchRegex(query, 'i'); | |
| 474 delete this._searchResults; | 473 delete this._searchResults; |
| 475 this._updateSearchHighlight(true, shouldJump, jumpBackwards); | 474 this._updateSearchHighlight(true, shouldJump, jumpBackwards); |
| 476 } | 475 } |
| 477 }; | 476 }; |
| 478 | 477 |
| 479 /** | 478 /** |
| 480 * @unrestricted | 479 * @unrestricted |
| 481 */ | 480 */ |
| 482 Timeline.TimelineFlameChartView.Selection = class { | 481 Timeline.TimelineFlameChartView.Selection = class { |
| 483 /** | 482 /** |
| 484 * @param {!Timeline.TimelineSelection} selection | 483 * @param {!Timeline.TimelineSelection} selection |
| 485 * @param {number} entryIndex | 484 * @param {number} entryIndex |
| 486 */ | 485 */ |
| 487 constructor(selection, entryIndex) { | 486 constructor(selection, entryIndex) { |
| 488 this.timelineSelection = selection; | 487 this.timelineSelection = selection; |
| 489 this.entryIndex = entryIndex; | 488 this.entryIndex = entryIndex; |
| 490 } | 489 } |
| 491 }; | 490 }; |
| OLD | NEW |