Lines Matching refs:headerContent
33 my @headerContent = ();
306 push(@headerContent, "typedef JSC::$jscType $type;\n\n");
315 push(@headerContent, "class $implClassName;\n\n");
667 push(@headerContent, "\nnamespace WebCore {\n\n");
679 push(@headerContent, "class $className : public $parentClassName {\n");
680 push(@headerContent, " typedef $parentClassName Base;\n");
681 push(@headerContent, "public:\n");
685 push(@headerContent, " $className(JSC::JSGlobalData&, JSC::Structure*, PassRefPtr<$implType>, JSDOMWindowShell*);\n");
687 push(@headerContent, " $className(JSC::JSGlobalData&, JSC::Structure*, PassRefPtr<$implType>);\n");
689 push(@headerContent, " $className(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<$implType>);\n");
693 push(@headerContent, " static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);\n") unless ($dataNode->extendedAttributes->{"ExtendsDOMGlobalObject"});
712 push(@headerContent, " virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);\n");
713 push(@headerContent, " virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);\n");
714 push(@headerContent, " virtual bool getOwnPropertySlot(JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);\n") if ($dataNode->extendedAttributes->{"HasIndexGetter"} || $dataNode->extendedAttributes->{"HasCustomIndexGetter"} || $dataNode->extendedAttributes->{"HasNumericIndexGetter"}) && !$dataNode->extendedAttributes->{"HasOverridingNameGetter"};
715 push(@headerContent, " bool getOwnPropertySlotDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);\n") if $dataNode->extendedAttributes->{"DelegatingGetOwnPropertySlot"};
716 push(@headerContent, " bool getOwnPropertyDescriptorDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);\n") if $dataNode->extendedAttributes->{"DelegatingGetOwnPropertySlot"};
735 push(@headerContent, " virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);\n");
736 push(@headerContent, " virtual void put(JSC::ExecState*, unsigned propertyName, JSC::JSValue);\n") if $dataNode->extendedAttributes->{"HasCustomIndexSetter"};
737 push(@headerContent, " bool putDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::JSValue, JSC::PutPropertySlot&);\n") if $dataNode->extendedAttributes->{"DelegatingPutFunction"};
741 push(@headerContent, " static const JSC::ClassInfo s_info;\n\n");
748 push(@headerContent,
756 push(@headerContent, " virtual void markChildren(JSC::MarkStack&);\n\n");
761 push(@headerContent, " virtual JSC::ScopeChainNode* pushEventHandlerScope(JSC::ExecState*, JSC::ScopeChainNode*) const;\n\n") if $dataNode->extendedAttributes->{"CustomPushEventHandlerScope"};
764 push(@headerContent, " virtual JSC::CallType getCallData(JSC::CallData&);\n\n") if $dataNode->extendedAttributes->{"CustomCall"};
767 push(@headerContent, " virtual bool deleteProperty(JSC::ExecState*, const JSC::Identifier&);\n") if $dataNode->extendedAttributes->{"CustomDeleteProperty"};
771 push(@headerContent, " virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);\n");
776 headerContent, " virtual bool defineOwnProperty(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&, bool shouldThrow);\n") if $interfaceName eq "DOMWindow";
780 push(@headerContent, " virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);\n");
785 push(@headerContent, " virtual void defineGetter(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSObject* getterFunction, unsigned attributes);\n") if $dataNode->extendedAttributes->{"CustomDefineGetter"};
788 push(@headerContent, " virtual void defineSetter(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSObject* setterFunction, unsigned attributes);\n") if $dataNode->extendedAttributes->{"CustomDefineSetter"};
791 push(@headerContent, " virtual JSC::JSValue lookupGetter(JSC::ExecState*, const JSC::Identifier& propertyName);\n") if $dataNode->extendedAttributes->{"CustomLookupGetter"};
794 push(@headerContent, " virtual JSC::JSValue lookupSetter(JSC::ExecState*, const JSC::Identifier& propertyName);\n") if $dataNode->extendedAttributes->{"CustomLookupSetter"};
798 push(@headerContent, " virtual bool toBoolean(JSC::ExecState*) const { return false; };\n");
803 push(@headerContent, " static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);\n") if (!($dataNode->extendedAttributes->{"OmitConstructor"} || $dataNode->extendedAttributes->{"CustomConstructor"}));
816 push(@headerContent, " static const unsigned " . $attribute->signature->name . "Slot = $numCachedAttributes + Base::AnonymousSlotCount;\n");
823 push(@headerContent, " using $parentClassName" . "::putAnonymousValue;\n");
824 push(@headerContent, " using $parentClassName" . "::getAnonymousValue;\n");
827 push(@headerContent, "\n // Custom attributes\n");
831 push(@headerContent, " JSC::JSValue " . $codeGenerator->WK_lcfirst($attribute->signature->name) . "(JSC::ExecState*) const;\n");
833 push(@headerContent, " void set" . $codeGenerator->WK_ucfirst($attribute->signature->name) . "(JSC::ExecState*, JSC::JSValue);\n");
836 push(@headerContent, " JSC::JSValue " . $codeGenerator->WK_lcfirst($attribute->signature->name) . "(JSC::ExecState*) const;\n");
839 push(@headerContent, " void set" . $codeGenerator->WK_ucfirst($attribute->signature->name) . "(JSC::ExecState*, JSC::JSValue);\n");
850 push(@headerContent, "\n // Custom functions\n");
854 push(@headerContent, " JSC::JSValue " . $functionImplementationName . "(JSC::ExecState*);\n");
860 push(@headerContent, " $implType* impl() const { return m_impl.get(); }\n\n");
861 push(@headerContent, "private:\n");
862 push(@headerContent, " RefPtr<$implType> m_impl;\n");
864 push(@headerContent, " $implClassName* impl() const\n");
865 push(@headerContent, " {\n");
866 push(@headerContent, " return static_cast<$implClassName*>(Base::impl());\n");
867 push(@headerContent, " }\n");
872 push(@headerContent, "public:\n");
873 push(@headerContent, " static const unsigned AnonymousSlotCount = $numCachedAttributes + Base::AnonymousSlotCount;\n");
877 push(@headerContent, "protected:\n");
878 push(@headerContent, " static const unsigned StructureFlags = ");
880 push(@headerContent, $structureFlag . " | ");
882 push(@headerContent, "Base::StructureFlags;\n");
886 push(@headerContent, " static JSC::JSValue indexGetter(JSC::ExecState*, JSC::JSValue, unsigned);\n");
889 push(@headerContent, " JSC::JSValue getByIndex(JSC::ExecState*, unsigned index);\n");
895 push(@headerContent, " void indexSetter(JSC::ExecState*, unsigned index, JSC::JSValue);\n");
899 push(@headerContent, "private:\n");
900 push(@headerContent, " static bool canGetItemsForName(JSC::ExecState*, $implClassName*, const JSC::Identifier&);\n");
901 push(@headerContent, " static JSC::JSValue nameGetter(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);\n");
904 push(@headerContent, "};\n\n");
907 push(@headerContent, "ALWAYS_INLINE bool ${className}::getOwnPropertySlot(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::PropertySlot& slot)\n");
908 push(@headerContent, "{\n");
909 push(@headerContent, GenerateGetOwnPropertySlotBody($dataNode, $interfaceName, $className, $implClassName, $numAttributes > 0, 1));
910 push(@headerContent, "}\n\n");
911 push(@headerContent, "ALWAYS_INLINE bool ${className}::getOwnPropertyDescriptor(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::PropertyDescriptor& descriptor)\n");
912 push(@headerContent, "{\n");
913 push(@headerContent, GenerateGetOwnPropertyDescriptorBody($dataNode, $interfaceName, $className, $implClassName, $numAttributes > 0, 1));
914 push(@headerContent, "}\n\n");
919 push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n");
921 push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n");
926 push(@headerContent, "PassRefPtr<NodeFilter> toNodeFilter(JSC::JSGlobalData&, JSC::JSValue);\n");
928 push(@headerContent, "$implType* to${interfaceName}(JSC::JSValue);\n");
932 push(@headerContent, "JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, $interfaceName*);\n");
935 push(@headerContent, "\n");
939 push(@headerContent, "class ${className}Prototype : public JSC::JSObjectWithGlobalObject {\n");
940 push(@headerContent, " typedef JSC::JSObjectWithGlobalObject Base;\n");
941 push(@headerContent, "public:\n");
943 push(@headerContent, " void* operator new(size_t);\n");
945 push(@headerContent, " void* operator new(size_t, JSC::JSGlobalData*);\n");
947 push(@headerContent, " static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);\n");
949 push(@headerContent, " static const JSC::ClassInfo s_info;\n");
951 push(@headerContent, " virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);\n");
952 push(@headerContent, " virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);\n");
953 push(@headerContent, " bool getOwnPropertySlotDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);\n") if $dataNode->extendedAttributes->{"DelegatingPrototypeGetOwnPropertySlot"};
954 push(@headerContent, " bool getOwnPropertyDescriptorDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);\n") if $dataNode->extendedAttributes->{"DelegatingPrototypeGetOwnPropertySlot"};
960 push(@headerContent,
966 push(@headerContent, " virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);\n");
967 push(@headerContent, " bool putDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::JSValue, JSC::PutPropertySlot&);\n");
971 push(@headerContent, " virtual void defineGetter(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSObject* getterFunction, unsigned attributes);\n") if $dataNode->extendedAttributes->{"CustomPrototypeDefineGetter"};
973 push(@headerContent, " ${className}Prototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) : JSC::JSObjectWithGlobalObject(globalData, globalObject, structure) { }\n");
976 push(@headerContent, "protected:\n");
977 push(@headerContent, " static const unsigned StructureFlags = ");
979 push(@headerContent, $structureFlag . " | ");
981 push(@headerContent, "Base::StructureFlags;\n");
983 push(@headerContent, "};\n\n");
987 GenerateConstructorDeclaration(\@headerContent, $className, $dataNode);
992 push(@headerContent,"// Functions\n\n");
996 push(@headerContent, "JSC::EncodedJSValue JSC_HOST_CALL ${functionName}(JSC::ExecState*);\n");
1001 push(@headerContent,"// Attributes\n\n");
1004 push(@headerContent, "JSC::JSValue ${getter}(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);\n");
1007 push(@headerContent, "void ${setter}(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);\n");
1013 push(@headerContent, "JSC::JSValue ${getter}(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);\n");
1018 push(@headerContent, "void ${constructorFunctionName}(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);\n");
1023 push(@headerContent,"// Constants\n\n");
1026 push(@headerContent, "JSC::JSValue ${getter}(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);\n");
1031 push(@headerContent, "\n} // namespace WebCore\n\n");
1032 push(@headerContent, "#endif // ${conditionalString}\n\n") if $conditionalString;
1033 push(@headerContent, "#endif\n");
2158 push(@headerContent, "\nnamespace WebCore {\n\n");
2159 push(@headerContent, "class $className : public $interfaceName, public ActiveDOMCallback {\n");
2160 push(@headerContent, "public:\n");
2163 push(@headerContent, " static PassRefPtr<$className> create(JSC::JSObject* callback, JSDOMGlobalObject* globalObject)\n");
2164 push(@headerContent, " {\n");
2165 push(@headerContent, " return adoptRef(new $className(callback, globalObject));\n");
2166 push(@headerContent, " }\n\n");
2169 push(@headerContent, " virtual ~$className();\n");
2174 push(@headerContent, "\n // Functions\n");
2179 push(@headerContent, " COMPILE_ASSERT(false)");
2182 push(@headerContent, " virtual " . GetNativeType($function->signature->type) . " " . $function->signature->name . "(");
2188 push(@headerContent, join(", ", @args));
2190 push(@headerContent, ");\n");
2194 push(@headerContent, "\nprivate:\n");
2197 push(@headerContent, " $className(JSC::JSObject* callback, JSDOMGlobalObject*);\n\n");
2200 push(@headerContent, " JSCallbackData* m_data;\n");
2201 push(@headerContent, "};\n\n");
2203 push(@headerContent, "} // namespace WebCore\n\n");
2205 push(@headerContent, "#endif // ${conditionalString}\n\n") if $conditionalString;
2206 push(@headerContent, "#endif\n");
2830 print $HEADER @headerContent;
2845 @headerContent = ();