JSPluginElementFunctions.h [plain text]
#ifndef JSPluginElementFunctions_h
#define JSPluginElementFunctions_h
#include "JSDOMBinding.h"
namespace JSC {
namespace Bindings {
class Instance;
}
}
namespace WebCore {
class HTMLElement;
class JSHTMLElement;
JSC::Bindings::Instance* pluginInstance(HTMLElement&);
WEBCORE_EXPORT JSC::JSObject* pluginScriptObject(JSC::ExecState*, JSHTMLElement*);
JSC::EncodedJSValue pluginElementPropertyGetter(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
bool pluginElementCustomGetOwnPropertySlot(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&, JSHTMLElement*);
bool pluginElementCustomPut(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSHTMLElement*, JSC::PutPropertySlot&);
JSC::CallType pluginElementGetCallData(JSHTMLElement*, JSC::CallData&);
template <class Type, class Base> bool pluginElementCustomGetOwnPropertySlot(JSC::ExecState* exec, JSC::PropertyName propertyName, JSC::PropertySlot& slot, Type* element)
{
if (!element->globalObject()->world().isNormal()) {
if (JSC::getStaticValueSlot<Type, Base>(exec, *Type::info()->staticPropHashTable, element, propertyName, slot))
return true;
JSC::JSValue proto = element->prototype();
if (proto.isObject() && JSC::jsCast<JSC::JSObject*>(asObject(proto))->hasProperty(exec, propertyName))
return false;
}
return pluginElementCustomGetOwnPropertySlot(exec, propertyName, slot, element);
}
}
#endif // JSPluginElementFunctions_h