diff options
Diffstat (limited to 'WebCore/bindings/js/JSPluginElementFunctions.cpp')
-rw-r--r-- | WebCore/bindings/js/JSPluginElementFunctions.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/WebCore/bindings/js/JSPluginElementFunctions.cpp b/WebCore/bindings/js/JSPluginElementFunctions.cpp index e927ef1..b20b9a7 100644 --- a/WebCore/bindings/js/JSPluginElementFunctions.cpp +++ b/WebCore/bindings/js/JSPluginElementFunctions.cpp @@ -35,7 +35,7 @@ using namespace HTMLNames; // Runtime object support code for JSHTMLAppletElement, JSHTMLEmbedElement and JSHTMLObjectElement. -static Instance* pluginInstance(Node* node) +Instance* pluginInstance(Node* node) { if (!node) return 0; @@ -49,7 +49,7 @@ static Instance* pluginInstance(Node* node) return instance; } -static RuntimeObjectImp* getRuntimeObject(ExecState* exec, Node* node) +static RuntimeObject* getRuntimeObject(ExecState* exec, Node* node) { Instance* instance = pluginInstance(node); if (!instance) @@ -57,19 +57,11 @@ static RuntimeObjectImp* getRuntimeObject(ExecState* exec, Node* node) return instance->createRuntimeObject(exec); } -JSValue runtimeObjectGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) +JSValue runtimeObjectPropertyGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName) { - JSHTMLElement* thisObj = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); + JSHTMLElement* thisObj = static_cast<JSHTMLElement*>(asObject(slotBase)); HTMLElement* element = static_cast<HTMLElement*>(thisObj->impl()); - RuntimeObjectImp* runtimeObject = getRuntimeObject(exec, element); - return runtimeObject ? runtimeObject : jsUndefined(); -} - -JSValue runtimeObjectPropertyGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot) -{ - JSHTMLElement* thisObj = static_cast<JSHTMLElement*>(asObject(slot.slotBase())); - HTMLElement* element = static_cast<HTMLElement*>(thisObj->impl()); - RuntimeObjectImp* runtimeObject = getRuntimeObject(exec, element); + RuntimeObject* runtimeObject = getRuntimeObject(exec, element); if (!runtimeObject) return jsUndefined(); return runtimeObject->get(exec, propertyName); @@ -77,7 +69,7 @@ JSValue runtimeObjectPropertyGetter(ExecState* exec, const Identifier& propertyN bool runtimeObjectCustomGetOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot, JSHTMLElement* element) { - RuntimeObjectImp* runtimeObject = getRuntimeObject(exec, element->impl()); + RuntimeObject* runtimeObject = getRuntimeObject(exec, element->impl()); if (!runtimeObject) return false; if (!runtimeObject->hasProperty(exec, propertyName)) @@ -88,7 +80,7 @@ bool runtimeObjectCustomGetOwnPropertySlot(ExecState* exec, const Identifier& pr bool runtimeObjectCustomGetOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor, JSHTMLElement* element) { - RuntimeObjectImp* runtimeObject = getRuntimeObject(exec, element->impl()); + RuntimeObject* runtimeObject = getRuntimeObject(exec, element->impl()); if (!runtimeObject) return false; if (!runtimeObject->hasProperty(exec, propertyName)) @@ -104,7 +96,7 @@ bool runtimeObjectCustomGetOwnPropertyDescriptor(ExecState* exec, const Identifi bool runtimeObjectCustomPut(ExecState* exec, const Identifier& propertyName, JSValue value, HTMLElement* element, PutPropertySlot& slot) { - RuntimeObjectImp* runtimeObject = getRuntimeObject(exec, element); + RuntimeObject* runtimeObject = getRuntimeObject(exec, element); if (!runtimeObject) return 0; if (!runtimeObject->hasProperty(exec, propertyName)) |