/* This file is part of the WebKit open source project. This file has been generated by generate-bindings.pl. DO NOT MODIFY! This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "config.h" #if ENABLE(XSLT) #include "JSXSLTProcessor.h" #include #include "Document.h" #include "DocumentFragment.h" #include "NodeFilter.h" #include "XSLTProcessor.h" #include using namespace JSC; namespace WebCore { ASSERT_CLASS_FITS_IN_CELL(JSXSLTProcessor) /* Hash table for prototype */ static const HashTableValue JSXSLTProcessorPrototypeTableValues[9] = { { "importStylesheet", DontDelete|Function, (intptr_t)jsXSLTProcessorPrototypeFunctionImportStylesheet, (intptr_t)1 }, { "transformToFragment", DontDelete|Function, (intptr_t)jsXSLTProcessorPrototypeFunctionTransformToFragment, (intptr_t)2 }, { "transformToDocument", DontDelete|Function, (intptr_t)jsXSLTProcessorPrototypeFunctionTransformToDocument, (intptr_t)1 }, { "setParameter", DontDelete|Function, (intptr_t)jsXSLTProcessorPrototypeFunctionSetParameter, (intptr_t)3 }, { "getParameter", DontDelete|Function, (intptr_t)jsXSLTProcessorPrototypeFunctionGetParameter, (intptr_t)2 }, { "removeParameter", DontDelete|Function, (intptr_t)jsXSLTProcessorPrototypeFunctionRemoveParameter, (intptr_t)2 }, { "clearParameters", DontDelete|Function, (intptr_t)jsXSLTProcessorPrototypeFunctionClearParameters, (intptr_t)0 }, { "reset", DontDelete|Function, (intptr_t)jsXSLTProcessorPrototypeFunctionReset, (intptr_t)0 }, { 0, 0, 0, 0 } }; static const HashTable JSXSLTProcessorPrototypeTable = #if ENABLE(PERFECT_HASH_SIZE) { 63, JSXSLTProcessorPrototypeTableValues, 0 }; #else { 17, 15, JSXSLTProcessorPrototypeTableValues, 0 }; #endif const ClassInfo JSXSLTProcessorPrototype::s_info = { "XSLTProcessorPrototype", 0, &JSXSLTProcessorPrototypeTable, 0 }; JSObject* JSXSLTProcessorPrototype::self(ExecState* exec) { return getDOMPrototype(exec); } bool JSXSLTProcessorPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { return getStaticFunctionSlot(exec, &JSXSLTProcessorPrototypeTable, this, propertyName, slot); } const ClassInfo JSXSLTProcessor::s_info = { "XSLTProcessor", 0, 0, 0 }; JSXSLTProcessor::JSXSLTProcessor(PassRefPtr structure, PassRefPtr impl) : DOMObject(structure) , m_impl(impl) { } JSXSLTProcessor::~JSXSLTProcessor() { forgetDOMObject(*Heap::heap(this)->globalData(), m_impl.get()); } JSObject* JSXSLTProcessor::createPrototype(ExecState* exec) { return new (exec) JSXSLTProcessorPrototype(JSXSLTProcessorPrototype::createStructure(exec->lexicalGlobalObject()->objectPrototype())); } JSValuePtr jsXSLTProcessorPrototypeFunctionImportStylesheet(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSXSLTProcessor::s_info)) return throwError(exec, TypeError); JSXSLTProcessor* castedThisObj = static_cast(asObject(thisValue)); return castedThisObj->importStylesheet(exec, args); } JSValuePtr jsXSLTProcessorPrototypeFunctionTransformToFragment(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSXSLTProcessor::s_info)) return throwError(exec, TypeError); JSXSLTProcessor* castedThisObj = static_cast(asObject(thisValue)); return castedThisObj->transformToFragment(exec, args); } JSValuePtr jsXSLTProcessorPrototypeFunctionTransformToDocument(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSXSLTProcessor::s_info)) return throwError(exec, TypeError); JSXSLTProcessor* castedThisObj = static_cast(asObject(thisValue)); return castedThisObj->transformToDocument(exec, args); } JSValuePtr jsXSLTProcessorPrototypeFunctionSetParameter(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSXSLTProcessor::s_info)) return throwError(exec, TypeError); JSXSLTProcessor* castedThisObj = static_cast(asObject(thisValue)); return castedThisObj->setParameter(exec, args); } JSValuePtr jsXSLTProcessorPrototypeFunctionGetParameter(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSXSLTProcessor::s_info)) return throwError(exec, TypeError); JSXSLTProcessor* castedThisObj = static_cast(asObject(thisValue)); return castedThisObj->getParameter(exec, args); } JSValuePtr jsXSLTProcessorPrototypeFunctionRemoveParameter(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSXSLTProcessor::s_info)) return throwError(exec, TypeError); JSXSLTProcessor* castedThisObj = static_cast(asObject(thisValue)); return castedThisObj->removeParameter(exec, args); } JSValuePtr jsXSLTProcessorPrototypeFunctionClearParameters(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSXSLTProcessor::s_info)) return throwError(exec, TypeError); JSXSLTProcessor* castedThisObj = static_cast(asObject(thisValue)); XSLTProcessor* imp = static_cast(castedThisObj->impl()); imp->clearParameters(); return jsUndefined(); } JSValuePtr jsXSLTProcessorPrototypeFunctionReset(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) { if (!thisValue->isObject(&JSXSLTProcessor::s_info)) return throwError(exec, TypeError); JSXSLTProcessor* castedThisObj = static_cast(asObject(thisValue)); XSLTProcessor* imp = static_cast(castedThisObj->impl()); imp->reset(); return jsUndefined(); } JSC::JSValuePtr toJS(JSC::ExecState* exec, XSLTProcessor* object) { return getDOMObjectWrapper(exec, object); } XSLTProcessor* toXSLTProcessor(JSC::JSValuePtr value) { return value->isObject(&JSXSLTProcessor::s_info) ? static_cast(asObject(value))->impl() : 0; } } #endif // ENABLE(XSLT)