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

Side by Side Diff: chrome/browser/resources/settings/search_settings.js

Issue 2774003002: MD Settings: Don't search inside <dialog> elements. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/search_settings_test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 cr.exportPath('settings'); 5 cr.exportPath('settings');
6 6
7 /** 7 /**
8 * A data structure used by callers to combine the results of multiple search 8 * A data structure used by callers to combine the results of multiple search
9 * requests. 9 * requests.
10 * 10 *
(...skipping 26 matching lines...) Expand all
37 37
38 /** 38 /**
39 * List of elements types that should not be searched at all. 39 * List of elements types that should not be searched at all.
40 * The only DOM-MODULE node is in <body> which is not searched, therefore 40 * The only DOM-MODULE node is in <body> which is not searched, therefore
41 * DOM-MODULE is not needed in this set. 41 * DOM-MODULE is not needed in this set.
42 * @const {!Set<string>} 42 * @const {!Set<string>}
43 */ 43 */
44 var IGNORED_ELEMENTS = new Set([ 44 var IGNORED_ELEMENTS = new Set([
45 'CONTENT', 45 'CONTENT',
46 'CR-EVENTS', 46 'CR-EVENTS',
47 'DIALOG',
47 'IMG', 48 'IMG',
48 'IRON-ICON', 49 'IRON-ICON',
49 'IRON-LIST', 50 'IRON-LIST',
50 'PAPER-ICON-BUTTON', 51 'PAPER-ICON-BUTTON',
51 /* TODO(dpapad): paper-item is used for dynamically populated dropdown
52 * menus. Perhaps a better approach is to mark the entire dropdown menu such
53 * that search algorithm can skip it as a whole instead.
54 */
55 'PAPER-ITEM',
tommycli 2017/03/24 19:07:19 I assume you've determined this is no longer neede
dpapad 2017/03/24 19:13:22 Yes no longer needed, because we removed all paper
56 'PAPER-RIPPLE', 52 'PAPER-RIPPLE',
57 'PAPER-SLIDER', 53 'PAPER-SLIDER',
58 'PAPER-SPINNER', 54 'PAPER-SPINNER',
59 'STYLE', 55 'STYLE',
60 'TEMPLATE', 56 'TEMPLATE',
61 ]); 57 ]);
62 58
63 /** 59 /**
64 * Finds all previous highlighted nodes under |node| (both within self and 60 * Finds all previous highlighted nodes under |node| (both within self and
65 * children's Shadow DOM) and replaces the highlights (yellow rectangle and 61 * children's Shadow DOM) and replaces the highlights (yellow rectangle and
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 function setSearchManagerForTesting(searchManager) { 629 function setSearchManagerForTesting(searchManager) {
634 SearchManagerImpl.instance_ = searchManager; 630 SearchManagerImpl.instance_ = searchManager;
635 } 631 }
636 632
637 return { 633 return {
638 getSearchManager: getSearchManager, 634 getSearchManager: getSearchManager,
639 setSearchManagerForTesting: setSearchManagerForTesting, 635 setSearchManagerForTesting: setSearchManagerForTesting,
640 SearchRequest: SearchRequest, 636 SearchRequest: SearchRequest,
641 }; 637 };
642 }); 638 });
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webui/settings/search_settings_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698