diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/bindings/js/JSPluginElementFunctions.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/bindings/js/JSPluginElementFunctions.cpp | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSPluginElementFunctions.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSPluginElementFunctions.cpp index ada2a77a84..b20b9a712e 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSPluginElementFunctions.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSPluginElementFunctions.cpp @@ -20,10 +20,10 @@ #include "config.h" #include "JSPluginElementFunctions.h" +#include "Bridge.h" #include "HTMLNames.h" #include "HTMLPlugInElement.h" #include "JSHTMLElement.h" -#include "runtime.h" #include "runtime_object.h" using namespace JSC; @@ -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)) |