Changeset 57592 in webkit
- Timestamp:
- Apr 14, 2010 11:42:10 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r57591 r57592 1 2010-04-14 Alexander Pavlov <apavlov@chromium.org> 2 3 Reviewed by Timothy Hatcher. 4 5 Web Inspector: Console: Shift-Tab does not cycle autocompletions in the reverse order 6 https://bugs.webkit.org/show_bug.cgi?id=37582 7 8 * inspector/front-end/TextPrompt.js: 9 (WebInspector.TextPrompt.prototype.complete): 10 (WebInspector.TextPrompt.prototype._completionsReady): 11 (WebInspector.TextPrompt.prototype._tabKeyPressed): 12 1 13 2010-04-14 Jeff Schiller <codedread@gmail.com> 2 14 -
trunk/WebCore/inspector/front-end/TextPrompt.js
r56280 r57592 173 173 }, 174 174 175 complete: function(auto )175 complete: function(auto, reverse) 176 176 { 177 177 this.clearAutoComplete(true); … … 186 186 return; 187 187 var wordPrefixRange = selectionRange.startContainer.rangeOfWord(selectionRange.startOffset, this.completionStopCharacters, this.element, "backward"); 188 this.completions(wordPrefixRange, auto, this._completionsReady.bind(this, selection, auto, wordPrefixRange ));189 }, 190 191 _completionsReady: function(selection, auto, originalWordPrefixRange, completions)188 this.completions(wordPrefixRange, auto, this._completionsReady.bind(this, selection, auto, wordPrefixRange, reverse)); 189 }, 190 191 _completionsReady: function(selection, auto, originalWordPrefixRange, reverse, completions) 192 192 { 193 193 if (!completions || !completions.length) … … 213 213 foundIndex = i; 214 214 215 if (foundIndex === null || (foundIndex + 1) >= completions.length) 215 var nextIndex = foundIndex + (reverse ? -1 : 1); 216 if (foundIndex === null || nextIndex >= completions.length) 216 217 var completionText = completions[0]; 218 else if (nextIndex < 0) 219 var completionText = completions[completions.length - 1]; 217 220 else 218 var completionText = completions[ foundIndex + 1];221 var completionText = completions[nextIndex]; 219 222 } 220 223 … … 355 358 event.stopPropagation(); 356 359 357 this.complete( );360 this.complete(false, event.shiftKey); 358 361 }, 359 362
Note: See TracChangeset
for help on using the changeset viewer.