OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 }, | 62 }, |
63 | 63 |
64 _messagesClicked: function() | 64 _messagesClicked: function() |
65 { | 65 { |
66 if (!this._prompt.isCaretInsidePrompt() && this.element.isComponentSelec
tionCollapsed()) | 66 if (!this._prompt.isCaretInsidePrompt() && this.element.isComponentSelec
tionCollapsed()) |
67 this._prompt.moveCaretToEndOfPrompt(); | 67 this._prompt.moveCaretToEndOfPrompt(); |
68 }, | 68 }, |
69 | 69 |
70 /** | 70 /** |
71 * @param {!Element} proxyElement | 71 * @param {!Element} proxyElement |
| 72 * @param {string} text |
| 73 * @param {number} cursorOffset |
72 * @param {!Range} wordRange | 74 * @param {!Range} wordRange |
73 * @param {boolean} force | 75 * @param {boolean} force |
74 * @param {function(!Array.<string>, number=)} completionsReadyCallback | 76 * @param {function(!Array.<string>, number=)} completionsReadyCallback |
75 */ | 77 */ |
76 completions: function(proxyElement, wordRange, force, completionsReadyCallba
ck) | 78 completions: function(proxyElement, text, cursorOffset, wordRange, force, co
mpletionsReadyCallback) |
77 { | 79 { |
78 var prefix = wordRange.toString().toLowerCase(); | 80 var prefix = wordRange.toString().toLowerCase(); |
79 if (!prefix) | 81 if (!prefix) |
80 return; | 82 return; |
81 var results = []; | 83 var results = []; |
82 | 84 |
83 function accumulateMatches(textArray) | 85 function accumulateMatches(textArray) |
84 { | 86 { |
85 for (var i = 0; i < textArray.length; ++i) { | 87 for (var i = 0; i < textArray.length; ++i) { |
86 var text = textArray[i].toLowerCase(); | 88 var text = textArray[i].toLowerCase(); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 element.appendChild(commandTextElement); | 206 element.appendChild(commandTextElement); |
205 | 207 |
206 var resultElement = createElement("div"); | 208 var resultElement = createElement("div"); |
207 resultElement.className = "database-query-result"; | 209 resultElement.className = "database-query-result"; |
208 element.appendChild(resultElement); | 210 element.appendChild(resultElement); |
209 return resultElement; | 211 return resultElement; |
210 }, | 212 }, |
211 | 213 |
212 __proto__: WebInspector.VBox.prototype | 214 __proto__: WebInspector.VBox.prototype |
213 } | 215 } |
OLD | NEW |