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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 _promptKeyDown: function(event) | 112 _promptKeyDown: function(event) |
113 { | 113 { |
114 if (isEnterKey(event)) { | 114 if (isEnterKey(event)) { |
115 this._enterKeyPressed(event); | 115 this._enterKeyPressed(event); |
116 return; | 116 return; |
117 } | 117 } |
118 }, | 118 }, |
119 | 119 |
120 _enterKeyPressed: function(event) | 120 _enterKeyPressed: function(event) |
121 { | 121 { |
122 event.consume(); | 122 event.consume(true); |
123 | 123 |
124 this.prompt.clearAutoComplete(true); | 124 this.prompt.clearAutoComplete(true); |
125 | 125 |
126 var query = this.prompt.text; | 126 var query = this.prompt.text; |
127 if (!query.length) | 127 if (!query.length) |
128 return; | 128 return; |
129 | 129 |
130 this.prompt.pushHistoryItem(query); | 130 this.prompt.pushHistoryItem(query); |
131 this.prompt.text = ""; | 131 this.prompt.text = ""; |
132 | 132 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 element.appendChild(commandTextElement); | 197 element.appendChild(commandTextElement); |
198 | 198 |
199 var resultElement = document.createElement("div"); | 199 var resultElement = document.createElement("div"); |
200 resultElement.className = "database-query-result"; | 200 resultElement.className = "database-query-result"; |
201 element.appendChild(resultElement); | 201 element.appendChild(resultElement); |
202 return resultElement; | 202 return resultElement; |
203 } | 203 } |
204 } | 204 } |
205 | 205 |
206 WebInspector.DatabaseQueryView.prototype.__proto__ = WebInspector.View.prototype
; | 206 WebInspector.DatabaseQueryView.prototype.__proto__ = WebInspector.View.prototype
; |
OLD | NEW |