| 1 | /* |
| 2 | * Copyright 2008 Closure Compiler Authors |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /** |
| 18 | * @fileoverview Definitions for all the extensions over W3C's DOM |
| 19 | * specification by WebKit. This file depends on w3c_dom2.js. |
| 20 | * All the provided definitions has been type annotated |
| 21 | * |
| 22 | * @externs |
| 23 | */ |
| 24 | |
| 25 | /** |
| 26 | * @constructor |
| 27 | * @see http://trac.webkit.org/browser/trunk/Source/WebCore/page/MemoryInfo.idl |
| 28 | * @see http://trac.webkit.org/browser/trunk/Source/WebCore/page/MemoryInfo.cpp |
| 29 | */ |
| 30 | function MemoryInfo() {}; |
| 31 | |
| 32 | /** @type {number} */ |
| 33 | MemoryInfo.prototype.totalJSHeapSize; |
| 34 | |
| 35 | /** @type {number} */ |
| 36 | MemoryInfo.prototype.usedJSHeapSize; |
| 37 | |
| 38 | /** @type {number} */ |
| 39 | MemoryInfo.prototype.jsHeapSizeLimit; |
| 40 | |
| 41 | /** |
| 42 | * @constructor |
| 43 | * @see http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/ScriptProfileNode.idl |
| 44 | */ |
| 45 | function ScriptProfileNode() {}; |
| 46 | |
| 47 | /** @type {string} */ |
| 48 | ScriptProfileNode.prototype.functionName; |
| 49 | |
| 50 | /** @type {string} */ |
| 51 | ScriptProfileNode.prototype.url; |
| 52 | |
| 53 | /** @type {number} */ |
| 54 | ScriptProfileNode.prototype.lineNumber; |
| 55 | |
| 56 | /** @type {number} */ |
| 57 | ScriptProfileNode.prototype.totalTime; |
| 58 | |
| 59 | /** @type {number} */ |
| 60 | ScriptProfileNode.prototype.selfTime; |
| 61 | |
| 62 | /** @type {number} */ |
| 63 | ScriptProfileNode.prototype.numberOfCalls; |
| 64 | |
| 65 | /** @type {Array.<ScriptProfileNode>} */ |
| 66 | ScriptProfileNode.prototype.children; |
| 67 | |
| 68 | /** @type {boolean} */ |
| 69 | ScriptProfileNode.prototype.visible; |
| 70 | |
| 71 | /** @type {number} */ |
| 72 | ScriptProfileNode.prototype.callUID; |
| 73 | |
| 74 | /** |
| 75 | * @constructor |
| 76 | * @see http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/ScriptProfile.idl |
| 77 | */ |
| 78 | function ScriptProfile() {}; |
| 79 | |
| 80 | /** @type {string} */ |
| 81 | ScriptProfile.prototype.title; |
| 82 | |
| 83 | /** @type {number} */ |
| 84 | ScriptProfile.prototype.uid; |
| 85 | |
| 86 | /** @type {ScriptProfileNode} */ |
| 87 | ScriptProfile.prototype.head; |
| 88 | |
| 89 | /** |
| 90 | * @constructor |
| 91 | * @see http://trac.webkit.org/browser/trunk/Source/WebCore/page/Console.idl |
| 92 | * @see http://trac.webkit.org/browser/trunk/Source/WebCore/page/Console.cpp |
| 93 | */ |
| 94 | function Console() {}; |
| 95 | |
| 96 | /** |
| 97 | * @param {*} condition |
| 98 | * @param {...*} var_args |
| 99 | */ |
| 100 | Console.prototype.assert = function(condition, var_args) {}; |
| 101 | |
| 102 | /** |
| 103 | * @param {...*} var_args |
| 104 | */ |
| 105 | Console.prototype.error = function(var_args) {}; |
| 106 | |
| 107 | /** |
| 108 | * @param {...*} var_args |
| 109 | */ |
| 110 | Console.prototype.info = function(var_args) {}; |
| 111 | |
| 112 | /** |
| 113 | * @param {...*} var_args |
| 114 | */ |
| 115 | Console.prototype.log = function(var_args) {}; |
| 116 | |
| 117 | /** |
| 118 | * @param {...*} var_args |
| 119 | */ |
| 120 | Console.prototype.warn = function(var_args) {}; |
| 121 | |
| 122 | /** |
| 123 | * @param {...*} var_args |
| 124 | */ |
| 125 | Console.prototype.debug = function(var_args) {}; |
| 126 | |
| 127 | /** |
| 128 | * @param {*} value |
| 129 | */ |
| 130 | Console.prototype.dir = function(value) {}; |
| 131 | |
| 132 | /** |
| 133 | * @param {...*} var_args |
| 134 | */ |
| 135 | Console.prototype.dirxml = function(var_args) {}; |
| 136 | |
| 137 | /** |
| 138 | * @return {undefined} |
| 139 | */ |
| 140 | Console.prototype.trace = function() {}; |
| 141 | |
| 142 | /** |
| 143 | * @param {*} value |
| 144 | */ |
| 145 | Console.prototype.count = function(value) {}; |
| 146 | |
| 147 | /** |
| 148 | * @param {*} value |
| 149 | */ |
| 150 | Console.prototype.markTimeline = function(value) {}; |
| 151 | |
| 152 | /** |
| 153 | * @param {string=} opt_title |
| 154 | */ |
| 155 | Console.prototype.profile = function(opt_title) {}; |
| 156 | |
| 157 | /** @type {Array.<ScriptProfile>} */ |
| 158 | Console.prototype.profiles; |
| 159 | |
| 160 | Console.prototype.profileEnd = function() {}; |
| 161 | |
| 162 | /** |
| 163 | * @param {string} name |
| 164 | */ |
| 165 | Console.prototype.time = function(name) {}; |
| 166 | |
| 167 | /** |
| 168 | * @param {string} name |
| 169 | */ |
| 170 | Console.prototype.timeEnd = function(name) {}; |
| 171 | |
| 172 | /** |
| 173 | * @param {*} value |
| 174 | */ |
| 175 | Console.prototype.timeStamp = function(value) {}; |
| 176 | |
| 177 | /** |
| 178 | * @param {...*} var_args |
| 179 | */ |
| 180 | Console.prototype.group = function(var_args) {}; |
| 181 | |
| 182 | Console.prototype.groupEnd = function() {}; |
| 183 | |
| 184 | /** @type {MemoryInfo} */ |
| 185 | Console.prototype.memory; |
| 186 | |
| 187 | /** @type {Console} */ |
| 188 | Window.prototype.console; |
| 189 | |
| 190 | /** |
| 191 | * @type {number} |
| 192 | * @see http://developer.android.com/reference/android/webkit/WebView.html |
| 193 | */ |
| 194 | Window.prototype.devicePixelRatio; |
| 195 | |
| 196 | /** @type {Node} */ |
| 197 | Selection.prototype.baseNode; |
| 198 | |
| 199 | /** @type {number} */ |
| 200 | Selection.prototype.baseOffset; |
| 201 | |
| 202 | /** @type {Node} */ |
| 203 | Selection.prototype.extentNode; |
| 204 | |
| 205 | /** @type {number} */ |
| 206 | Selection.prototype.extentOffset; |
| 207 | |
| 208 | /** @type {string} */ |
| 209 | Selection.prototype.type; |
| 210 | |
| 211 | /** |
| 212 | * @return {undefined} |
| 213 | */ |
| 214 | Selection.prototype.empty = function() {}; |
| 215 | |
| 216 | /** |
| 217 | * @param {Node} baseNode |
| 218 | * @param {number} baseOffset |
| 219 | * @param {Node} extentNode |
| 220 | * @param {number} extentOffset |
| 221 | * @return {undefined} |
| 222 | */ |
| 223 | Selection.prototype.setBaseAndExtent = |
| 224 | function(baseNode, baseOffset, extentNode, extentOffset) {}; |
| 225 | |
| 226 | /** |
| 227 | * @param {string} alter |
| 228 | * @param {string} direction |
| 229 | * @param {string} granularity |
| 230 | * @return {undefined} |
| 231 | */ |
| 232 | Selection.prototype.modify = function(alter, direction, granularity) {}; |
| 233 | |
| 234 | /** |
| 235 | * @param {Element} element |
| 236 | * @param {string} pseudoElement |
| 237 | * @param {boolean=} opt_authorOnly |
| 238 | * @return {CSSRuleList} |
| 239 | * @nosideeffects |
| 240 | */ |
| 241 | ViewCSS.prototype.getMatchedCSSRules = |
| 242 | function(element, pseudoElement, opt_authorOnly) {}; |
| 243 | |
| 244 | /** |
| 245 | * @param {string} contextId |
| 246 | * @param {string} name |
| 247 | * @param {number} width |
| 248 | * @param {number} height |
| 249 | * @nosideeffects |
| 250 | */ |
| 251 | Document.prototype.getCSSCanvasContext = |
| 252 | function(contextId, name, width, height) {}; |
| 253 | |
| 254 | /** |
| 255 | * @type {string} |
| 256 | * @see http://code.google.com/chrome/whitepapers/pagevisibility.html |
| 257 | */ |
| 258 | Document.prototype.webkitVisibilityState; |