| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 387 |
| 388 delete this._currentSearchResultIndex; | 388 delete this._currentSearchResultIndex; |
| 389 delete this._searchResults; | 389 delete this._searchResults; |
| 390 | 390 |
| 391 var targets = WebInspector.targetManager.targets(); | 391 var targets = WebInspector.targetManager.targets(); |
| 392 for (var i = 0; i < targets.length; ++i) | 392 for (var i = 0; i < targets.length; ++i) |
| 393 targets[i].domModel.cancelSearch(); | 393 targets[i].domModel.cancelSearch(); |
| 394 }, | 394 }, |
| 395 | 395 |
| 396 /** | 396 /** |
| 397 * @param {string} query | 397 * @param {!WebInspector.SearchableView.SearchConfig} searchConfig |
| 398 * @param {boolean} shouldJump | 398 * @param {boolean} shouldJump |
| 399 * @param {boolean=} jumpBackwards | 399 * @param {boolean=} jumpBackwards |
| 400 */ | 400 */ |
| 401 performSearch: function(query, shouldJump, jumpBackwards) | 401 performSearch: function(searchConfig, shouldJump, jumpBackwards) |
| 402 { | 402 { |
| 403 var query = searchConfig.query; |
| 403 // Call searchCanceled since it will reset everything we need before doi
ng a new search. | 404 // Call searchCanceled since it will reset everything we need before doi
ng a new search. |
| 404 this.searchCanceled(); | 405 this.searchCanceled(); |
| 405 | 406 |
| 406 const whitespaceTrimmedQuery = query.trim(); | 407 const whitespaceTrimmedQuery = query.trim(); |
| 407 if (!whitespaceTrimmedQuery.length) | 408 if (!whitespaceTrimmedQuery.length) |
| 408 return; | 409 return; |
| 409 | 410 |
| 410 this._searchQuery = query; | 411 this._searchQuery = query; |
| 411 | 412 |
| 412 var targets = WebInspector.targetManager.targets(); | 413 var targets = WebInspector.targetManager.targets(); |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 this._jumpToSearchResult(this._currentSearchResultIndex + 1); | 570 this._jumpToSearchResult(this._currentSearchResultIndex + 1); |
| 570 }, | 571 }, |
| 571 | 572 |
| 572 jumpToPreviousSearchResult: function() | 573 jumpToPreviousSearchResult: function() |
| 573 { | 574 { |
| 574 if (!this._searchResults) | 575 if (!this._searchResults) |
| 575 return; | 576 return; |
| 576 this._jumpToSearchResult(this._currentSearchResultIndex - 1); | 577 this._jumpToSearchResult(this._currentSearchResultIndex - 1); |
| 577 }, | 578 }, |
| 578 | 579 |
| 580 /** |
| 581 * @return {boolean} |
| 582 */ |
| 583 supportsCaseSensitiveSearch: function() |
| 584 { |
| 585 return false; |
| 586 }, |
| 587 |
| 588 /** |
| 589 * @return {boolean} |
| 590 */ |
| 591 supportsRegexSearch: function() |
| 592 { |
| 593 return false; |
| 594 }, |
| 595 |
| 579 _highlightCurrentSearchResult: function() | 596 _highlightCurrentSearchResult: function() |
| 580 { | 597 { |
| 581 var index = this._currentSearchResultIndex; | 598 var index = this._currentSearchResultIndex; |
| 582 var searchResults = this._searchResults; | 599 var searchResults = this._searchResults; |
| 583 var searchResult = searchResults[index]; | 600 var searchResult = searchResults[index]; |
| 584 | 601 |
| 585 if (searchResult.node === null) { | 602 if (searchResult.node === null) { |
| 586 this._searchableView.updateCurrentMatchIndex(index); | 603 this._searchableView.updateCurrentMatchIndex(index); |
| 587 return; | 604 return; |
| 588 } | 605 } |
| (...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1555 | 1572 |
| 1556 WebInspector.ElementsPanelFactory.prototype = { | 1573 WebInspector.ElementsPanelFactory.prototype = { |
| 1557 /** | 1574 /** |
| 1558 * @return {!WebInspector.Panel} | 1575 * @return {!WebInspector.Panel} |
| 1559 */ | 1576 */ |
| 1560 createPanel: function() | 1577 createPanel: function() |
| 1561 { | 1578 { |
| 1562 return WebInspector.ElementsPanel.instance(); | 1579 return WebInspector.ElementsPanel.instance(); |
| 1563 } | 1580 } |
| 1564 } | 1581 } |
| OLD | NEW |