OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 }, | 435 }, |
436 | 436 |
437 /** | 437 /** |
438 * @override | 438 * @override |
439 * @param {!WebInspector.SearchableView.SearchConfig} searchConfig | 439 * @param {!WebInspector.SearchableView.SearchConfig} searchConfig |
440 * @param {boolean} shouldJump | 440 * @param {boolean} shouldJump |
441 * @param {boolean=} jumpBackwards | 441 * @param {boolean=} jumpBackwards |
442 */ | 442 */ |
443 performSearch: function(searchConfig, shouldJump, jumpBackwards) | 443 performSearch: function(searchConfig, shouldJump, jumpBackwards) |
444 { | 444 { |
445 var matcher = createPlainTextSearchRegex(searchConfig.query, searchConfi
g.caseSensitive ? "": "i"); | 445 var matcher = createPlainTextSearchRegex(searchConfig.query, searchConfi
g.caseSensitive ? "" : "i"); |
446 | 446 |
447 var selectedEntryIndex = this._searchResultIndex !== -1 ? this._searchRe
sults[this._searchResultIndex] : -1; | 447 var selectedEntryIndex = this._searchResultIndex !== -1 ? this._searchRe
sults[this._searchResultIndex] : -1; |
448 this._searchResults = []; | 448 this._searchResults = []; |
449 var entriesCount = this._dataProvider._entryNodes.length; | 449 var entriesCount = this._dataProvider._entryNodes.length; |
450 for (var index = 0; index < entriesCount; ++index) { | 450 for (var index = 0; index < entriesCount; ++index) { |
451 if (this._dataProvider.entryTitle(index).match(matcher)) | 451 if (this._dataProvider.entryTitle(index).match(matcher)) |
452 this._searchResults.push(index); | 452 this._searchResults.push(index); |
453 } | 453 } |
454 | 454 |
455 if (this._searchResults.length) { | 455 if (this._searchResults.length) { |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 { | 761 { |
762 var ratio = window.devicePixelRatio; | 762 var ratio = window.devicePixelRatio; |
763 this._overviewCanvas.width = width * ratio; | 763 this._overviewCanvas.width = width * ratio; |
764 this._overviewCanvas.height = height * ratio; | 764 this._overviewCanvas.height = height * ratio; |
765 this._overviewCanvas.style.width = width + "px"; | 765 this._overviewCanvas.style.width = width + "px"; |
766 this._overviewCanvas.style.height = height + "px"; | 766 this._overviewCanvas.style.height = height + "px"; |
767 }, | 767 }, |
768 | 768 |
769 __proto__: WebInspector.VBox.prototype | 769 __proto__: WebInspector.VBox.prototype |
770 } | 770 } |
OLD | NEW |