2 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 // WebKit Web Facing API
33 /** @type {boolean} */
34 Event.prototype.isMetaOrCtrlForTest;
38 * @extends {KeyboardEvent}
39 * @param {string} eventType
40 * @param {!Object=} properties
42 window.KeyboardEvent = function(eventType, properties) {}
47 KeyboardEvent.DOM_KEY_LOCATION_NUMPAD;
49 /** @param {*} message */
50 function postMessage(message) {}
56 * @param {string} eventName
57 * @param {!Function} listener
58 * @param {boolean=} capturing
60 function addEventListener(eventName, listener, capturing) {}
64 * @param {boolean=} onlyFirst
68 Array.prototype.remove = function(value, onlyFirst) {}
70 * @return {!Object.<string, boolean>}
74 Array.prototype.keySet = function() {}
76 * @param {number} index
77 * @return {!Array.<!T>}
81 Array.prototype.rotate = function(index) {}
84 * @param {function(!T,!S):number=} comparator
89 Array.prototype.lowerBound = function(object, comparator) {}
92 * @param {function(!T,!S):number=} comparator
97 Array.prototype.upperBound = function(object, comparator) {}
100 * @param {function(!T,!S):number} comparator
105 Array.prototype.binaryIndexOf = function(value, comparator) {}
107 * @param {function(number, number): number} comparator
108 * @param {number} leftBound
109 * @param {number} rightBound
110 * @param {number} sortWindowLeft
111 * @param {number} sortWindowRight
112 * @return {!Array.<number>}
113 * @this {Array.<number>}
115 Array.prototype.sortRange = function(comparator, leftBound, rightBound, sortWindowLeft, sortWindowRight) {}
118 * @param {function(!T,!T): number=} comparator
119 * @return {!Array.<T>}
123 Array.prototype.stableSort = function(comparator) {}
126 * @this {Array.<number>}
127 * @param {function(number,number):boolean} comparator
128 * @param {number} left
129 * @param {number} right
130 * @param {number} pivotIndex
133 Array.prototype.partition = function(comparator, left, right, pivotIndex) {}
136 * @this {Array.<number>}
138 * @param {function(number,number):boolean=} comparator
141 Array.prototype.qselect = function(k, comparator) {}
144 * @param {string} field
145 * @return {!Array.<!T>}
146 * @this {Array.<!Object.<string,T>>}
149 Array.prototype.select = function(field) {}
152 * @return {!T|undefined}
156 Array.prototype.peekLast = function() {}
159 * @param {!Array.<T>} array
160 * @param {function(T,T):number} comparator
161 * @return {!Array.<T>}
165 Array.prototype.intersectOrdered = function(array, comparator) {}
168 * @param {!Array.<T>} array
169 * @param {function(T,T):number} comparator
170 * @return {!Array.<T>}
174 Array.prototype.mergeOrdered = function(array, comparator) {}
180 function DOMFileSystem() {}
183 * @type {DirectoryEntry}
185 DOMFileSystem.prototype.root = null;
188 function InspectorFrontendHostAPI() {}
189 /** @param {!Function=} callback callback */
190 InspectorFrontendHostAPI.prototype.addFileSystem = function(callback) {}
191 /** @param {!Function=} callback callback */
192 InspectorFrontendHostAPI.prototype.append = function(url, content, callback) {}
193 /** @param {!Function=} callback callback */
194 InspectorFrontendHostAPI.prototype.indexPath = function(requestId, fileSystemPath, callback) {}
195 /** @return {string} */
196 InspectorFrontendHostAPI.prototype.getSelectionBackgroundColor = function() {}
197 /** @return {string} */
198 InspectorFrontendHostAPI.prototype.getSelectionForegroundColor = function() {}
199 /** @return {boolean} */
200 InspectorFrontendHost.isUnderTest = function() {}
202 * Requests inspected page to be placed atop of the inspector frontend
203 * with passed insets from the frontend sides, respecting minimum size passed.
204 * @param {{top: number, left: number, right: number, bottom: number}} insets
205 * @param {{width: number, height: number}} minSize
207 InspectorFrontendHostAPI.prototype.setContentsResizingStrategy = function(insets, minSize) {}
208 InspectorFrontendHostAPI.prototype.inspectElementCompleted = function() {}
209 /** @param {!Function=} callback callback */
210 InspectorFrontendHostAPI.prototype.moveWindowBy = function(x, y, callback) {}
211 /** @param {!Function=} callback callback */
212 InspectorFrontendHostAPI.prototype.openInNewTab = function(url, callback) {}
213 /** @param {!Function=} callback callback */
214 InspectorFrontendHostAPI.prototype.removeFileSystem = function(fileSystemPath, callback) {}
215 /** @param {!Function=} callback callback */
216 InspectorFrontendHostAPI.prototype.requestFileSystems = function(callback) {}
217 /** @param {!Function=} callback callback */
218 InspectorFrontendHostAPI.prototype.save = function(url, content, forceSaveAs, callback) {}
219 /** @param {!Function=} callback callback */
220 InspectorFrontendHostAPI.prototype.searchInPath = function(requestId, fileSystemPath, query, callback) {}
221 /** @param {!Function=} callback callback */
222 InspectorFrontendHostAPI.prototype.stopIndexing = function(requestId, callback) {}
224 InspectorFrontendHostAPI.prototype.bringToFront = function() {}
225 InspectorFrontendHostAPI.prototype.closeWindow = function() {}
226 InspectorFrontendHostAPI.prototype.copyText = function(text) {}
227 InspectorFrontendHostAPI.prototype.inspectedURLChanged = function(url) {}
228 InspectorFrontendHostAPI.prototype.isolatedFileSystem = function(fileSystemId, registeredName) {}
229 InspectorFrontendHostAPI.prototype.upgradeDraggedFileSystemPermissions = function(DOMFileSystem) {}
230 InspectorFrontendHostAPI.prototype.platform = function() {}
231 InspectorFrontendHostAPI.prototype.port = function() {}
232 InspectorFrontendHostAPI.prototype.recordActionTaken = function(actionCode) {}
233 InspectorFrontendHostAPI.prototype.recordPanelShown = function(panelCode) {}
234 InspectorFrontendHostAPI.prototype.recordSettingChanged = function(settingCode) {}
235 InspectorFrontendHostAPI.prototype.sendMessageToBackend = function(message) {}
236 InspectorFrontendHostAPI.prototype.sendMessageToEmbedder = function(message) {}
237 InspectorFrontendHostAPI.prototype.setInjectedScriptForOrigin = function(origin, script) {}
238 InspectorFrontendHostAPI.prototype.setIsDocked = function(isDocked) {}
239 InspectorFrontendHostAPI.prototype.setZoomFactor = function(zoom) {}
240 InspectorFrontendHostAPI.prototype.zoomFactor = function() {}
241 InspectorFrontendHostAPI.prototype.zoomIn = function() {}
242 InspectorFrontendHostAPI.prototype.zoomOut = function() {}
243 InspectorFrontendHostAPI.prototype.resetZoom = function() {}
244 /** @type {InspectorFrontendHostAPI} */
245 var InspectorFrontendHost;
246 InspectorFrontendHost.embedderMessageAck = function(id, error) {}
248 // FIXME: remove everything below.
249 var FormatterWorker = {}
250 var WebInspector = {}
252 WebInspector.queryParamsObject = {}
253 WebInspector.toggleSearchingForNode = function() {}
254 WebInspector.panels = {};
257 * @param {string=} messageLevel
258 * @param {boolean=} showConsole
260 WebInspector.log = function(message, messageLevel, showConsole) {}
262 WebInspector.showErrorMessage = function(error) {}
264 WebInspector.addMainEventListeners = function(doc) {}
266 WebInspector.openResource = function(url, external) {}
268 WebInspector.showConsole = function() {}
271 * @param {string} expression
272 * @param {boolean=} showResultOnly
274 WebInspector.evaluateInConsole = function(expression, showResultOnly) {}
276 WebInspector.queryParamsObject = {}
278 WebInspector.Events = {
279 InspectorLoaded: "InspectorLoaded"
282 /** Extensions API */
285 function AuditCategory() {}
287 function AuditResult() {}
289 function EventSink() {}
291 function ExtensionSidebarPane() {}
295 function PanelWithSidebar() {}
297 function Request() {}
299 function Resource() {}
301 function Timeline() {}
308 function ExtensionDescriptor() {
316 function ExtensionReloadOptions() {
317 this.ignoreCache = false;
318 this.injectedScript = "";
319 this.preprocessingScript = "";
323 WebInspector.showPanel = function(panel)
330 WebInspector.inspectedPageDomain;
332 WebInspector.SourceJavaScriptTokenizer = {}
333 WebInspector.SourceJavaScriptTokenizer.Keywords = {}
338 WebInspector.isInspectingDevice = function() {}
343 WebInspector.isWorkerFrontend = function() {}
348 WebInspector.isDedicatedWorkerFrontend = function() {}
350 var InspectorTest = {}
354 difflib.stringAsLines = function(text) { return []; }
356 difflib.SequenceMatcher = function(baseText, newText) { }
357 difflib.SequenceMatcher.prototype.get_opcodes = function() { return []; }
360 var CodeMirror = function() { }
361 CodeMirror.on = function(obj, type, handler) { }
362 CodeMirror.prototype = {
363 addKeyMap: function(map) { },
364 addLineClass: function(handle, where, cls) { },
365 addLineWidget: function(handle, node, options) { },
367 * @param {string|!Object} spec
368 * @param {!Object=} options
370 addOverlay: function(spec, options) { },
371 addWidget: function(pos, node, scroll, vert, horiz) { },
372 charCoords: function(pos, mode) { },
373 clearGutter: function(gutterID) { },
374 clearHistory: function() { },
375 clipPos: function(pos) { },
376 coordsChar: function(coords, mode) { },
377 cursorCoords: function(start, mode) { },
378 defaultCharWidth: function() { },
379 defaultTextHeight: function() { },
380 deleteH: function(dir, unit) { },
381 eachLine: function(from, to, op) { },
382 execCommand: function(cmd) { },
383 extendSelection: function(from, to) { },
384 findMarksAt: function(pos) { },
385 findMatchingBracket: function() { },
386 findPosH: function(from, amount, unit, visually) { },
387 findPosV: function(from, amount, unit, goalColumn) { },
388 firstLine: function() { },
389 focus: function() { },
390 getAllMarks: function() { },
391 /** @param {string=} start */
392 getCursor: function(start) { },
393 getDoc: function() { },
394 getGutterElement: function() { },
395 getHistory: function() { },
396 getInputField: function(){ },
397 getLine: function(line) { },
399 * @return {!{wrapClass: string}}
401 getLineHandle: function(line) { },
402 getLineNumber: function(line) { },
403 getMode: function() { },
404 getOption: function(option) { },
405 getRange: function(from, to, lineSep) { },
407 * @return {!{left: number, top: number, width: number, height: number, clientWidth: number, clientHeight: number}}
409 getScrollInfo: function() { },
410 getScrollerElement: function() { },
411 getSelection: function() { },
412 getStateAfter: function(line) { },
413 getTokenAt: function(pos) { },
414 getValue: function(lineSep) { },
415 getViewport: function() { },
416 getWrapperElement: function() { },
417 hasFocus: function() { },
418 historySize: function() { },
419 indentLine: function(n, dir, aggressive) { },
420 indentSelection: function(how) { },
421 indexFromPos: function(coords) { },
422 isClean: function() { },
423 iterLinkedDocs: function(f) { },
424 lastLine: function() { },
425 lineCount: function() { },
426 lineInfo: function(line) { },
428 * @param {number} height
429 * @param {string=} mode
431 lineAtHeight: function(height, mode) { },
432 linkedDoc: function(options) { },
433 markClean: function() { },
434 markText: function(from, to, options) { },
435 moveH: function(dir, unit) { },
436 moveV: function(dir, unit) { },
437 off: function(type, f) { },
438 on: function(type, f) { },
439 operation: function(f) { },
440 posFromIndex: function(off) { },
441 redo: function() { },
442 refresh: function() { },
443 removeKeyMap: function(map) { },
444 removeLine: function(line) { },
445 removeLineClass: function(handle, where, cls) { },
446 removeLineWidget: function(widget) { },
447 removeOverlay: function(spec) { },
448 replaceRange: function(code, from, to, origin) { },
449 replaceSelection: function(code, collapse, origin) { },
450 scrollIntoView: function(pos, margin) { },
451 scrollTo: function(x, y) { },
452 setBookmark: function(pos, options) { },
453 setCursor: function(line, ch, extend) { },
454 setExtending: function(val) { },
455 setGutterMarker: function(line, gutterID, value) { },
456 setHistory: function(histData) { },
457 setLine: function(line, text) { },
458 setOption: function(option, value) { },
459 setSelection: function(anchor, head) { },
460 setSize: function(width, height) { },
461 setValue: function(code) { },
462 somethingSelected: function() { },
463 swapDoc: function(doc) { },
464 undo: function() { },
465 unlinkDoc: function(other) { }
467 /** @type {number} */
468 CodeMirror.prototype.lineCount;
470 CodeMirror.showHint = function(codeMirror, hintintFunction) { };
471 CodeMirror.commands = {};
472 CodeMirror.modes = {};
473 CodeMirror.mimeModes = {};
474 CodeMirror.getMode = function(options, spec) { };
475 CodeMirror.overlayMode = function(mode1, mode2, squashSpans) { };
476 CodeMirror.defineMode = function(modeName, modeConstructor) { };
477 CodeMirror.startState = function(mode) { };
480 CodeMirror.Pos = function(line, ch) { }
482 CodeMirror.Pos.prototype.line;
484 CodeMirror.Pos.prototype.ch;
487 CodeMirror.StringStream = function(line)
492 CodeMirror.StringStream.prototype = {
493 backUp: function (n) { },
494 column: function () { },
495 current: function () { },
496 eat: function (match) { },
497 eatSpace: function () { },
498 eatWhile: function (match) { },
499 eol: function () { },
500 indentation: function () { },
502 * @param {!RegExp|string} pattern
503 * @param {boolean=} consume
504 * @param {boolean=} caseInsensitive
506 match: function (pattern, consume, caseInsensitive) { },
507 next: function () { },
508 peek: function () { },
509 skipTo: function (ch) { },
510 skipToEnd: function () { },
514 /** @type {Object.<string, !Object.<string, string>>} */
517 /** @type {{scrollLeft: number, scrollTop: number}} */
520 WebInspector.suggestReload = function() { }
521 WebInspector.reload = function() { }
522 WebInspector._inspectedTabId;
524 /** @type {boolean} */
525 window.dispatchStandaloneTestRunnerMessages;