Changeset 71273 in webkit
- Timestamp:
- Nov 3, 2010 2:54:17 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r71268 r71273 1 2010-11-03 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Adam Roben. 4 5 Implement NP_SetProperty 6 https://bugs.webkit.org/show_bug.cgi?id=48956 7 8 Remove now passing test. 9 10 * platform/mac-wk2/Skipped: 11 1 12 2010-11-03 Matthew Delaney <mdelaney@apple.com> 2 13 -
trunk/LayoutTests/platform/mac-wk2/Skipped
r71183 r71273 1747 1747 plugins/npruntime/plugin-scriptable-object-invoke-default.html 1748 1748 plugins/npruntime/round-trip-npobject.html 1749 plugins/npruntime/set-property.html1750 1749 1751 1750 ######################################## -
trunk/WebKit2/ChangeLog
r71270 r71273 1 2010-11-03 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Adam Roben. 4 5 Implement NP_SetProperty 6 https://bugs.webkit.org/show_bug.cgi?id=48956 7 8 * Shared/Plugins/NPObjectMessageReceiver.cpp: 9 (WebKit::NPObjectMessageReceiver::setProperty): 10 Call the NPClass setProperty function. 11 12 * Shared/Plugins/NPObjectMessageReceiver.messages.in: 13 Add SetProperty message. 14 15 * Shared/Plugins/NPObjectProxy.cpp: 16 (WebKit::NPObjectProxy::setProperty): 17 Send a SetProperty message. 18 19 (WebKit::NPObjectProxy::NP_SetProperty): 20 Call NPObjectProxy::setProperty. 21 1 22 2010-11-03 Anders Carlsson <andersca@apple.com> 2 23 -
trunk/WebKit2/Shared/Plugins/NPObjectMessageReceiver.cpp
r71183 r71273 127 127 } 128 128 129 void NPObjectMessageReceiver::setProperty(const NPIdentifierData& propertyNameData, const NPVariantData& propertyValueData, bool& returnValue) 130 { 131 if (!m_npObject->_class->setProperty) { 132 returnValue = false; 133 return; 134 } 135 136 NPVariant propertyValue = m_npRemoteObjectMap->npVariantDataToNPVariant(propertyValueData); 137 138 // Set the property. 139 returnValue = m_npObject->_class->setProperty(m_npObject, propertyNameData.createNPIdentifier(), &propertyValue); 140 141 // And release the value. 142 releaseNPVariantValue(&propertyValue); 143 } 144 129 145 } // namespace WebKit 130 146 -
trunk/WebKit2/Shared/Plugins/NPObjectMessageReceiver.h
r71183 r71273 58 58 void hasProperty(const NPIdentifierData&, bool& returnValue); 59 59 void getProperty(const NPIdentifierData&, bool& returnValue, NPVariantData& resultData); 60 void setProperty(const NPIdentifierData&, const NPVariantData& propertyValueData, bool& returnValue); 60 61 61 62 NPRemoteObjectMap* m_npRemoteObjectMap; -
trunk/WebKit2/Shared/Plugins/NPObjectMessageReceiver.messages.in
r71183 r71273 29 29 HasProperty(WebKit::NPIdentifierData propertyName) -> (bool returnValue) 30 30 GetProperty(WebKit::NPIdentifierData propertyName) -> (bool returnValue, WebKit::NPVariantData resultData) 31 SetProperty(WebKit::NPIdentifierData propertyName, WebKit::NPVariantData propertyValueData) -> (bool returnValue) 31 32 } 32 33 -
trunk/WebKit2/Shared/Plugins/NPObjectProxy.cpp
r71183 r71273 159 159 } 160 160 161 bool NPObjectProxy::setProperty(NPIdentifier propertyName, const NPVariant* value) 162 { 163 if (!m_npRemoteObjectMap) 164 return false; 165 166 NPIdentifierData propertyNameData = NPIdentifierData::fromNPIdentifier(propertyName); 167 NPVariantData propertyValueData = m_npRemoteObjectMap->npVariantToNPVariantData(*value); 168 169 bool returnValue = false; 170 171 if (!m_npRemoteObjectMap->connection()->sendSync(Messages::NPObjectMessageReceiver::SetProperty(propertyNameData, propertyValueData), Messages::NPObjectMessageReceiver::SetProperty::Reply(returnValue), m_npObjectID)) 172 return false; 173 174 return returnValue; 175 } 176 161 177 NPClass* NPObjectProxy::npClass() 162 178 { … … 219 235 } 220 236 221 bool NPObjectProxy::NP_SetProperty(NPObject*, NPIdentifier propertyName, const NPVariant* value) 222 { 223 notImplemented(); 224 return false; 237 bool NPObjectProxy::NP_SetProperty(NPObject* npObject, NPIdentifier propertyName, const NPVariant* value) 238 { 239 return toNPObjectProxy(npObject)->setProperty(propertyName, value); 225 240 } 226 241 -
trunk/WebKit2/Shared/Plugins/NPObjectProxy.h
r71183 r71273 62 62 bool hasProperty(NPIdentifier propertyName); 63 63 bool getProperty(NPIdentifier propertyName, NPVariant* result); 64 bool setProperty(NPIdentifier propertyName, const NPVariant* value); 64 65 65 66 static NPClass* npClass();
Note: See TracChangeset
for help on using the changeset viewer.