| OLD | NEW |
| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 257 |
| 258 _onInput: function(event) | 258 _onInput: function(event) |
| 259 { | 259 { |
| 260 this._shouldShowMatchingItems = this._delegate.shouldShowMatchingItems(t
his._promptElement.value); | 260 this._shouldShowMatchingItems = this._delegate.shouldShowMatchingItems(t
his._promptElement.value); |
| 261 this._updateShowMatchingItems(); | 261 this._updateShowMatchingItems(); |
| 262 this._scheduleFilter(); | 262 this._scheduleFilter(); |
| 263 }, | 263 }, |
| 264 | 264 |
| 265 _updateShowMatchingItems: function() | 265 _updateShowMatchingItems: function() |
| 266 { | 266 { |
| 267 this._itemElementsContainer.enableStyleClass("hidden", !this._shouldShow
MatchingItems); | 267 this._itemElementsContainer.classList.toggle("hidden", !this._shouldShow
MatchingItems); |
| 268 this.element.style.height = this._shouldShowMatchingItems ? this._dialog
Height + "px" : "auto"; | 268 this.element.style.height = this._shouldShowMatchingItems ? this._dialog
Height + "px" : "auto"; |
| 269 }, | 269 }, |
| 270 | 270 |
| 271 _onKeyDown: function(event) | 271 _onKeyDown: function(event) |
| 272 { | 272 { |
| 273 var newSelectedIndex = this._selectedIndexInFiltered; | 273 var newSelectedIndex = this._selectedIndexInFiltered; |
| 274 | 274 |
| 275 switch (event.keyCode) { | 275 switch (event.keyCode) { |
| 276 case WebInspector.KeyboardShortcut.Keys.Down.code: | 276 case WebInspector.KeyboardShortcut.Keys.Down.code: |
| 277 if (++newSelectedIndex >= this._filteredItems.length) | 277 if (++newSelectedIndex >= this._filteredItems.length) |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDial
og(new WebInspector.SelectUISourceCodeForProjectTypeDialog(type, callback)); | 878 var filteredItemSelectionDialog = new WebInspector.FilteredItemSelectionDial
og(new WebInspector.SelectUISourceCodeForProjectTypeDialog(type, callback)); |
| 879 filteredItemSelectionDialog.setQuery(name); | 879 filteredItemSelectionDialog.setQuery(name); |
| 880 filteredItemSelectionDialog.renderAsTwoRows(); | 880 filteredItemSelectionDialog.renderAsTwoRows(); |
| 881 WebInspector.Dialog.show(relativeToElement, filteredItemSelectionDialog); | 881 WebInspector.Dialog.show(relativeToElement, filteredItemSelectionDialog); |
| 882 } | 882 } |
| 883 | 883 |
| 884 /** | 884 /** |
| 885 * @typedef {{index: number, total: number, chunk: !Array.<!{selectorText: strin
g, lineNumber: number, columnNumber: number}>}} | 885 * @typedef {{index: number, total: number, chunk: !Array.<!{selectorText: strin
g, lineNumber: number, columnNumber: number}>}} |
| 886 */ | 886 */ |
| 887 WebInspector.JavaScriptOutlineDialog.MessageEventData; | 887 WebInspector.JavaScriptOutlineDialog.MessageEventData; |
| OLD | NEW |