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 28 matching lines...) Expand all Loading... |
39 this._promptElement = createElement("div"); | 39 this._promptElement = createElement("div"); |
40 this._promptElement.className = "database-query-prompt"; | 40 this._promptElement.className = "database-query-prompt"; |
41 this._promptElement.appendChild(createElement("br")); | 41 this._promptElement.appendChild(createElement("br")); |
42 this._promptElement.addEventListener("keydown", this._promptKeyDown.bind(thi
s), true); | 42 this._promptElement.addEventListener("keydown", this._promptKeyDown.bind(thi
s), true); |
43 this.element.appendChild(this._promptElement); | 43 this.element.appendChild(this._promptElement); |
44 | 44 |
45 this._prompt = new WebInspector.TextPromptWithHistory(this.completions.bind(
this), " "); | 45 this._prompt = new WebInspector.TextPromptWithHistory(this.completions.bind(
this), " "); |
46 this._proxyElement = this._prompt.attach(this._promptElement); | 46 this._proxyElement = this._prompt.attach(this._promptElement); |
47 | 47 |
48 this.element.addEventListener("click", this._messagesClicked.bind(this), tru
e); | 48 this.element.addEventListener("click", this._messagesClicked.bind(this), tru
e); |
49 } | 49 }; |
50 | 50 |
51 /** @enum {symbol} */ | 51 /** @enum {symbol} */ |
52 WebInspector.DatabaseQueryView.Events = { | 52 WebInspector.DatabaseQueryView.Events = { |
53 SchemaUpdated: Symbol("SchemaUpdated") | 53 SchemaUpdated: Symbol("SchemaUpdated") |
54 } | 54 }; |
55 | 55 |
56 WebInspector.DatabaseQueryView.prototype = { | 56 WebInspector.DatabaseQueryView.prototype = { |
57 _messagesClicked: function() | 57 _messagesClicked: function() |
58 { | 58 { |
59 if (!this._prompt.isCaretInsidePrompt() && this.element.isComponentSelec
tionCollapsed()) | 59 if (!this._prompt.isCaretInsidePrompt() && this.element.isComponentSelec
tionCollapsed()) |
60 this._prompt.moveCaretToEndOfPrompt(); | 60 this._prompt.moveCaretToEndOfPrompt(); |
61 }, | 61 }, |
62 | 62 |
63 /** | 63 /** |
64 * @param {!Element} proxyElement | 64 * @param {!Element} proxyElement |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 commandTextElement.textContent = query; | 195 commandTextElement.textContent = query; |
196 element.appendChild(commandTextElement); | 196 element.appendChild(commandTextElement); |
197 | 197 |
198 var resultElement = createElement("div"); | 198 var resultElement = createElement("div"); |
199 resultElement.className = "database-query-result"; | 199 resultElement.className = "database-query-result"; |
200 element.appendChild(resultElement); | 200 element.appendChild(resultElement); |
201 return resultElement; | 201 return resultElement; |
202 }, | 202 }, |
203 | 203 |
204 __proto__: WebInspector.VBox.prototype | 204 __proto__: WebInspector.VBox.prototype |
205 } | 205 }; |
OLD | NEW |