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

Side by Side Diff: Source/devtools/front_end/FilteredItemSelectionDialog.js

Issue 239283002: DevTools: goto-line functionality should not change selected uisourcecode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add testcase Created 6 years, 8 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
« no previous file with comments | « LayoutTests/inspector/filtered-item-selection-dialog-filtering-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 renderAsTwoRows: function() 112 renderAsTwoRows: function()
113 { 113 {
114 this._renderAsTwoRows = true; 114 this._renderAsTwoRows = true;
115 }, 115 },
116 116
117 onEnter: function() 117 onEnter: function()
118 { 118 {
119 if (!this._delegate.itemCount()) 119 if (!this._delegate.itemCount())
120 return; 120 return;
121 var selectedIndex = this._selectedIndexInFiltered < this._filteredItems. length ? this._filteredItems[this._selectedIndexInFiltered] : null; 121 var selectedIndex = this._shouldShowMatchingItems() && this._selectedInd exInFiltered < this._filteredItems.length ? this._filteredItems[this._selectedIn dexInFiltered] : null;
122 this._delegate.selectItem(selectedIndex, this._promptElement.value.trim( )); 122 this._delegate.selectItem(selectedIndex, this._promptElement.value.trim( ));
123 }, 123 },
124 124
125 _itemsLoaded: function() 125 _itemsLoaded: function()
126 { 126 {
127 127
128 if (this._loadTimeout) 128 if (this._loadTimeout)
129 return; 129 return;
130 this._loadTimeout = setTimeout(this._updateAfterItemsLoaded.bind(this), 0); 130 this._loadTimeout = setTimeout(this._updateAfterItemsLoaded.bind(this), 0);
131 }, 131 },
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDial og(new WebInspector.SelectUISourceCodeForProjectTypeDialog(type, callback)); 880 var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDial og(new WebInspector.SelectUISourceCodeForProjectTypeDialog(type, callback));
881 filteredItemSelectionDialog.setQuery(name); 881 filteredItemSelectionDialog.setQuery(name);
882 filteredItemSelectionDialog.renderAsTwoRows(); 882 filteredItemSelectionDialog.renderAsTwoRows();
883 WebInspector.Dialog.show(relativeToElement, filteredItemSelectionDialog); 883 WebInspector.Dialog.show(relativeToElement, filteredItemSelectionDialog);
884 } 884 }
885 885
886 /** 886 /**
887 * @typedef {{index: number, total: number, chunk: !Array.<!{selectorText: strin g, lineNumber: number, columnNumber: number}>}} 887 * @typedef {{index: number, total: number, chunk: !Array.<!{selectorText: strin g, lineNumber: number, columnNumber: number}>}}
888 */ 888 */
889 WebInspector.JavaScriptOutlineDialog.MessageEventData; 889 WebInspector.JavaScriptOutlineDialog.MessageEventData;
OLDNEW
« no previous file with comments | « LayoutTests/inspector/filtered-item-selection-dialog-filtering-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698