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

Side by Side Diff: Source/devtools/front_end/elements/ElementsPanel.js

Issue 658403002: DevTools: Support regex search and case sensitive search in sources panel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed tests Created 6 years, 2 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 | Annotate | Revision Log
OLDNEW
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
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
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/console/ConsoleView.js ('k') | Source/devtools/front_end/extensions/ExtensionPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698