WebCore/generated/JSDocument.cpp
changeset 2 303757a437d3
parent 0 4f2f89ce4247
equal deleted inserted replaced
0:4f2f89ce4247 2:303757a437d3
   252 #define THUNK_GENERATOR(generator) , generator
   252 #define THUNK_GENERATOR(generator) , generator
   253 #else
   253 #else
   254 #define THUNK_GENERATOR(generator)
   254 #define THUNK_GENERATOR(generator)
   255 #endif
   255 #endif
   256 
   256 
   257 static const HashTableValue JSDocumentPrototypeTableValues[38] =
   257 static const HashTableValue JSDocumentPrototypeTableValues[39] =
   258 {
   258 {
   259     { "createElement", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateElement), (intptr_t)1 THUNK_GENERATOR(0) },
   259     { "createElement", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateElement), (intptr_t)1 THUNK_GENERATOR(0) },
   260     { "createDocumentFragment", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateDocumentFragment), (intptr_t)0 THUNK_GENERATOR(0) },
   260     { "createDocumentFragment", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateDocumentFragment), (intptr_t)0 THUNK_GENERATOR(0) },
   261     { "createTextNode", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateTextNode), (intptr_t)1 THUNK_GENERATOR(0) },
   261     { "createTextNode", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateTextNode), (intptr_t)1 THUNK_GENERATOR(0) },
   262     { "createComment", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateComment), (intptr_t)1 THUNK_GENERATOR(0) },
   262     { "createComment", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateComment), (intptr_t)1 THUNK_GENERATOR(0) },
   284     { "queryCommandIndeterm", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQueryCommandIndeterm), (intptr_t)1 THUNK_GENERATOR(0) },
   284     { "queryCommandIndeterm", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQueryCommandIndeterm), (intptr_t)1 THUNK_GENERATOR(0) },
   285     { "queryCommandState", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQueryCommandState), (intptr_t)1 THUNK_GENERATOR(0) },
   285     { "queryCommandState", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQueryCommandState), (intptr_t)1 THUNK_GENERATOR(0) },
   286     { "queryCommandSupported", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQueryCommandSupported), (intptr_t)1 THUNK_GENERATOR(0) },
   286     { "queryCommandSupported", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQueryCommandSupported), (intptr_t)1 THUNK_GENERATOR(0) },
   287     { "queryCommandValue", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQueryCommandValue), (intptr_t)1 THUNK_GENERATOR(0) },
   287     { "queryCommandValue", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQueryCommandValue), (intptr_t)1 THUNK_GENERATOR(0) },
   288     { "getElementsByName", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetElementsByName), (intptr_t)1 THUNK_GENERATOR(0) },
   288     { "getElementsByName", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetElementsByName), (intptr_t)1 THUNK_GENERATOR(0) },
       
   289     { "nodesFromRect", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionNodesFromRect), (intptr_t)5 THUNK_GENERATOR(0) },
   289     { "elementFromPoint", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionElementFromPoint), (intptr_t)2 THUNK_GENERATOR(0) },
   290     { "elementFromPoint", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionElementFromPoint), (intptr_t)2 THUNK_GENERATOR(0) },
   290     { "caretRangeFromPoint", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCaretRangeFromPoint), (intptr_t)2 THUNK_GENERATOR(0) },
   291     { "caretRangeFromPoint", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCaretRangeFromPoint), (intptr_t)2 THUNK_GENERATOR(0) },
   291     { "getSelection", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetSelection), (intptr_t)0 THUNK_GENERATOR(0) },
   292     { "getSelection", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetSelection), (intptr_t)0 THUNK_GENERATOR(0) },
   292     { "getCSSCanvasContext", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetCSSCanvasContext), (intptr_t)4 THUNK_GENERATOR(0) },
   293     { "getCSSCanvasContext", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetCSSCanvasContext), (intptr_t)4 THUNK_GENERATOR(0) },
   293     { "getElementsByClassName", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetElementsByClassName), (intptr_t)1 THUNK_GENERATOR(0) },
   294     { "getElementsByClassName", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetElementsByClassName), (intptr_t)1 THUNK_GENERATOR(0) },
   295     { "querySelectorAll", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQuerySelectorAll), (intptr_t)1 THUNK_GENERATOR(0) },
   296     { "querySelectorAll", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQuerySelectorAll), (intptr_t)1 THUNK_GENERATOR(0) },
   296     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
   297     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
   297 };
   298 };
   298 
   299 
   299 #undef THUNK_GENERATOR
   300 #undef THUNK_GENERATOR
   300 static JSC_CONST_HASHTABLE HashTable JSDocumentPrototypeTable = { 135, 127, JSDocumentPrototypeTableValues, 0 };
   301 static JSC_CONST_HASHTABLE HashTable JSDocumentPrototypeTable = { 136, 127, JSDocumentPrototypeTableValues, 0 };
   301 const ClassInfo JSDocumentPrototype::s_info = { "DocumentPrototype", 0, &JSDocumentPrototypeTable, 0 };
   302 const ClassInfo JSDocumentPrototype::s_info = { "DocumentPrototype", 0, &JSDocumentPrototypeTable, 0 };
   302 
   303 
   303 JSObject* JSDocumentPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
   304 JSObject* JSDocumentPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
   304 {
   305 {
   305     return getDOMPrototype<JSDocument>(exec, globalObject);
   306     return getDOMPrototype<JSDocument>(exec, globalObject);
  2159 
  2160 
  2160     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getElementsByName(elementName)));
  2161     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->getElementsByName(elementName)));
  2161     return JSValue::encode(result);
  2162     return JSValue::encode(result);
  2162 }
  2163 }
  2163 
  2164 
       
  2165 EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionNodesFromRect(ExecState* exec)
       
  2166 {
       
  2167     JSValue thisValue = exec->hostThisValue();
       
  2168     if (!thisValue.inherits(&JSDocument::s_info))
       
  2169         return throwVMTypeError(exec);
       
  2170     JSDocument* castedThis = static_cast<JSDocument*>(asObject(thisValue));
       
  2171     Document* imp = static_cast<Document*>(castedThis->impl());
       
  2172     int x = exec->argument(0).toInt32(exec);
       
  2173     int y = exec->argument(1).toInt32(exec);
       
  2174     unsigned hPadding = exec->argument(2).toInt32(exec);
       
  2175     unsigned vPadding = exec->argument(3).toInt32(exec);
       
  2176     bool ignoreClipping = exec->argument(4).toBoolean(exec);
       
  2177 
       
  2178 
       
  2179     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->nodesFromRect(x, y, hPadding, vPadding, ignoreClipping)));
       
  2180     return JSValue::encode(result);
       
  2181 }
       
  2182 
  2164 EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionElementFromPoint(ExecState* exec)
  2183 EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionElementFromPoint(ExecState* exec)
  2165 {
  2184 {
  2166     JSValue thisValue = exec->hostThisValue();
  2185     JSValue thisValue = exec->hostThisValue();
  2167     if (!thisValue.inherits(&JSDocument::s_info))
  2186     if (!thisValue.inherits(&JSDocument::s_info))
  2168         return throwVMTypeError(exec);
  2187         return throwVMTypeError(exec);