Changeset 64174 in webkit
- Timestamp:
- Jul 27, 2010 4:15:41 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64171 r64174 1 2010-07-27 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Implement JSNPObject::propertyGetter 6 https://bugs.webkit.org/show_bug.cgi?id=43091 7 8 * platform/mac-wk2/Skipped: 9 Add a test I forgot to add, and remove plugins/npruntime/embed-property.html because it passes now. 10 1 11 2010-07-27 Martin Robinson <mrobinson@igalia.com> 2 12 -
trunk/LayoutTests/platform/mac-wk2/Skipped
r64169 r64174 1389 1389 java 1390 1390 platform/mac/plugins 1391 plugins/attach-during-destroy.html 1391 1392 plugins/clicking-missing-plugin-fires-delegate.html 1392 1393 plugins/destroy-during-npp-new.html … … 1412 1413 plugins/netscape-plugin-setwindow-size.html 1413 1414 plugins/npruntime/bindings-test.html 1414 plugins/npruntime/embed-property.html1415 1415 plugins/npruntime/enumerate.html 1416 1416 plugins/npruntime/get-int-identifier-special-values.html -
trunk/WebKit2/ChangeLog
r64172 r64174 1 2010-07-27 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Implement JSNPObject::propertyGetter 6 https://bugs.webkit.org/show_bug.cgi?id=43091 7 8 * WebProcess/Plugins/JSNPObject.cpp: 9 (WebKit::JSNPObject::propertyGetter): 10 Ask the NPObject for its property. 11 12 * WebProcess/Plugins/NPRuntimeObjectMap.cpp: 13 (WebKit::NPRuntimeObjectMap::jsNPObjectDestroyed): 14 Add a stub. 15 16 (WebKit::NPRuntimeObjectMap::convertNPVariantToValue): 17 Implement this for everything except objects. 18 1 19 2010-07-27 Sam Weinig <sam@webkit.org> 2 20 -
trunk/WebKit2/WebProcess/Plugins/JSNPObject.cpp
r64167 r64174 26 26 #include "JSNPObject.h" 27 27 28 #include "NPRuntimeObjectMap.h" 28 29 #include "NPRuntimeUtilities.h" 29 30 #include <JavaScriptCore/Error.h> 30 31 #include <JavaScriptCore/JSGlobalObject.h> 32 #include <JavaScriptCore/JSLock.h> 31 33 #include <JavaScriptCore/ObjectPrototype.h> 32 34 #include <WebCore/IdentifierRep.h> … … 72 74 } 73 75 74 JSValue JSNPObject::propertyGetter(ExecState* , JSValue, const Identifier&)76 JSValue JSNPObject::propertyGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName) 75 77 { 78 JSNPObject* thisObj = static_cast<JSNPObject*>(asObject(slotBase)); 79 80 if (!thisObj->m_npObject) 81 return throwInvalidAccessError(exec); 82 83 if (!thisObj->m_npObject->_class->getProperty) 84 return jsUndefined(); 85 86 NPVariant property; 87 VOID_TO_NPVARIANT(property); 88 89 bool result; 90 { 91 JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly); 92 NPIdentifier npIdentifier = npIdentifierFromIdentifier(propertyName); 93 result = thisObj->m_npObject->_class->getProperty(thisObj->m_npObject, npIdentifier, &property); 94 95 // FIXME: Handle getProperty setting an exception. 96 // FIXME: Find out what happens if calling getProperty causes the plug-in to go away. 97 } 98 99 if (!result) 100 return jsUndefined(); 101 102 return thisObj->m_objectMap->convertNPVariantToValue(exec, property); 76 103 // FIXME: Implement. 77 104 return jsUndefined(); -
trunk/WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.cpp
r64167 r64174 29 29 #include "NPJSObject.h" 30 30 #include "NPRuntimeUtilities.h" 31 #include "NotImplemented.h" 31 32 #include "PluginView.h" 32 33 #include <WebCore/Frame.h> … … 70 71 } 71 72 73 void NPRuntimeObjectMap::jsNPObjectDestroyed(JSNPObject* jsNPObject) 74 { 75 // FIXME: Implement. 76 } 77 78 JSValue NPRuntimeObjectMap::convertNPVariantToValue(JSC::ExecState* exec, const NPVariant& variant) 79 { 80 switch (variant.type) { 81 case NPVariantType_Void: 82 return jsUndefined(); 83 84 case NPVariantType_Null: 85 return jsNull(); 86 87 case NPVariantType_Bool: 88 return jsBoolean(variant.value.boolValue); 89 90 case NPVariantType_Int32: 91 return jsNumber(exec, variant.value.intValue); 92 93 case NPVariantType_Double: 94 return jsNumber(exec, variant.value.doubleValue); 95 96 case NPVariantType_String: 97 return jsString(exec, String::fromUTF8WithLatin1Fallback(variant.value.stringValue.UTF8Characters, 98 variant.value.stringValue.UTF8Length)); 99 case NPVariantType_Object: 100 default: 101 notImplemented(); 102 break; 103 } 104 105 return jsUndefined(); 106 } 107 72 108 void NPRuntimeObjectMap::invalidate() 73 109 { -
trunk/WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.h
r64167 r64174 30 30 31 31 struct NPObject; 32 typedef struct _NPVariant NPVariant; 32 33 33 34 namespace JSC { … … 35 36 class JSGlobalObject; 36 37 class JSObject; 38 class JSValue; 37 39 } 38 40 39 41 namespace WebKit { 40 42 43 class JSNPObject; 41 44 class NPJSObject; 42 45 class PluginView; … … 56 59 JSC::JSObject* getOrCreateJSObject(JSC::ExecState*, JSC::JSGlobalObject*, NPObject*); 57 60 61 void jsNPObjectDestroyed(JSNPObject*); 62 63 JSC::JSValue convertNPVariantToValue(JSC::ExecState*, const NPVariant&); 58 64 59 65 // Called when the plug-in is destroyed. Will invalidate all the NPObjects.
Note: See TracChangeset
for help on using the changeset viewer.