[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andersca at apple.com
andersca at apple.com
Wed Dec 22 15:24:33 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 9e0266124c6518e5e92aa3013172c92c31cfa37e
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 2 22:28:05 2010 +0000
Implement NP_HasProperty for NPObjectProxy
https://bugs.webkit.org/show_bug.cgi?id=48876
Reviewed by Sam Weinig.
WebKit2:
* Shared/Plugins/NPObjectMessageReceiver.cpp:
(WebKit::NPObjectMessageReceiver::hasProperty):
Call The hasProperty callback function.
* Shared/Plugins/NPObjectMessageReceiver.messages.in:
Add HasProperty message.
* Shared/Plugins/NPObjectProxy.cpp:
(WebKit::NPObjectProxy::hasProperty):
Send the HasProperty message.
(WebKit::NPObjectProxy::NP_HasProperty):
Call hasProperty.
LayoutTests:
Remove now passing test.
* platform/mac-wk2/Skipped:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b423e31..cc4ab00 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-02 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Implement NP_HasProperty for NPObjectProxy
+ https://bugs.webkit.org/show_bug.cgi?id=48876
+
+ Remove now passing test.
+
+ * platform/mac-wk2/Skipped:
+
2010-11-02 David Hyatt <hyatt at apple.com>
Reviewed by Dan Bernstein.
diff --git a/LayoutTests/platform/mac-wk2/Skipped b/LayoutTests/platform/mac-wk2/Skipped
index 14f8a13..7094945 100644
--- a/LayoutTests/platform/mac-wk2/Skipped
+++ b/LayoutTests/platform/mac-wk2/Skipped
@@ -1737,7 +1737,6 @@ plugins/return-negative-one-from-write.html
plugins/set-status.html
plugins/update-widgets-crash.html
plugins/window-open.html
-plugins/npruntime/embed-property.html
plugins/npruntime/enumerate.html
plugins/npruntime/evaluate.html
plugins/npruntime/get-int-identifier-special-values.html
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 192b195..53a5878 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,25 @@
+2010-11-02 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Implement NP_HasProperty for NPObjectProxy
+ https://bugs.webkit.org/show_bug.cgi?id=48876
+
+ * Shared/Plugins/NPObjectMessageReceiver.cpp:
+ (WebKit::NPObjectMessageReceiver::hasProperty):
+ Call The hasProperty callback function.
+
+ * Shared/Plugins/NPObjectMessageReceiver.messages.in:
+ Add HasProperty message.
+
+ * Shared/Plugins/NPObjectProxy.cpp:
+ (WebKit::NPObjectProxy::hasProperty):
+ Send the HasProperty message.
+
+ (WebKit::NPObjectProxy::NP_HasProperty):
+ Call hasProperty.
+
+
2010-11-02 Sam Weinig <sam at webkit.org>
Reviewed by Anders Carlsson.
diff --git a/WebKit2/Shared/Plugins/NPObjectMessageReceiver.cpp b/WebKit2/Shared/Plugins/NPObjectMessageReceiver.cpp
index 6df0fd9..5cc741f 100644
--- a/WebKit2/Shared/Plugins/NPObjectMessageReceiver.cpp
+++ b/WebKit2/Shared/Plugins/NPObjectMessageReceiver.cpp
@@ -60,6 +60,16 @@ void NPObjectMessageReceiver::deallocate()
delete this;
}
+void NPObjectMessageReceiver::hasProperty(const NPIdentifierData& propertyNameData, bool& returnValue)
+{
+ if (!m_npObject->_class->hasProperty) {
+ returnValue = false;
+ return;
+ }
+
+ returnValue = m_npObject->_class->hasProperty(m_npObject, propertyNameData.createNPIdentifier());
+}
+
void NPObjectMessageReceiver::getProperty(const NPIdentifierData& propertyNameData, bool& returnValue, NPVariantData& resultData)
{
if (!m_npObject->_class->getProperty) {
diff --git a/WebKit2/Shared/Plugins/NPObjectMessageReceiver.h b/WebKit2/Shared/Plugins/NPObjectMessageReceiver.h
index 321e0c2..a78e13d 100644
--- a/WebKit2/Shared/Plugins/NPObjectMessageReceiver.h
+++ b/WebKit2/Shared/Plugins/NPObjectMessageReceiver.h
@@ -53,6 +53,7 @@ private:
// Message handlers.
void deallocate();
+ void hasProperty(const NPIdentifierData&, bool& returnValue);
void getProperty(const NPIdentifierData&, bool& returnValue, NPVariantData& resultData);
NPRemoteObjectMap* m_npRemoteObjectMap;
diff --git a/WebKit2/Shared/Plugins/NPObjectMessageReceiver.messages.in b/WebKit2/Shared/Plugins/NPObjectMessageReceiver.messages.in
index 1fc120f..3dd0722 100644
--- a/WebKit2/Shared/Plugins/NPObjectMessageReceiver.messages.in
+++ b/WebKit2/Shared/Plugins/NPObjectMessageReceiver.messages.in
@@ -23,10 +23,8 @@
#if ENABLE(PLUGIN_PROCESS)
messages -> NPObjectMessageReceiver {
- # Deallocate the NPObject.
Deallocate() -> ()
-
- # Get the given property.
+ HasProperty(WebKit::NPIdentifierData propertyName) -> (bool returnValue)
GetProperty(WebKit::NPIdentifierData propertyName) -> (bool returnValue, WebKit::NPVariantData resultData)
}
diff --git a/WebKit2/Shared/Plugins/NPObjectProxy.cpp b/WebKit2/Shared/Plugins/NPObjectProxy.cpp
index 036392c..c3c4de5 100644
--- a/WebKit2/Shared/Plugins/NPObjectProxy.cpp
+++ b/WebKit2/Shared/Plugins/NPObjectProxy.cpp
@@ -84,6 +84,21 @@ void NPObjectProxy::initialize(NPRemoteObjectMap* npRemoteObjectMap, uint64_t np
m_npObjectID = npObjectID;
}
+bool NPObjectProxy::hasProperty(NPIdentifier propertyName)
+{
+ if (!m_npRemoteObjectMap)
+ return false;
+
+ NPIdentifierData propertyNameData = NPIdentifierData::fromNPIdentifier(propertyName);
+
+ bool returnValue = false;
+
+ if (!m_npRemoteObjectMap->connection()->sendSync(Messages::NPObjectMessageReceiver::HasProperty(propertyNameData), Messages::NPObjectMessageReceiver::HasProperty::Reply(returnValue), m_npObjectID))
+ return false;
+
+ return returnValue;
+}
+
bool NPObjectProxy::getProperty(NPIdentifier propertyName, NPVariant* result)
{
if (!m_npRemoteObjectMap)
@@ -156,10 +171,9 @@ bool NPObjectProxy::NP_InvokeDefault(NPObject*, const NPVariant* arguments, uint
return false;
}
-bool NPObjectProxy::NP_HasProperty(NPObject*, NPIdentifier propertyName)
+bool NPObjectProxy::NP_HasProperty(NPObject* npObject, NPIdentifier propertyName)
{
- notImplemented();
- return false;
+ return toNPObjectProxy(npObject)->hasProperty(propertyName);
}
bool NPObjectProxy::NP_GetProperty(NPObject* npObject, NPIdentifier propertyName, NPVariant* result)
diff --git a/WebKit2/Shared/Plugins/NPObjectProxy.h b/WebKit2/Shared/Plugins/NPObjectProxy.h
index 6bc5c49..cb9d24a 100644
--- a/WebKit2/Shared/Plugins/NPObjectProxy.h
+++ b/WebKit2/Shared/Plugins/NPObjectProxy.h
@@ -57,6 +57,7 @@ private:
void initialize(NPRemoteObjectMap* npRemoteObjectMap, uint64_t npObjectID);
+ bool hasProperty(NPIdentifier propertyName);
bool getProperty(NPIdentifier propertyName, NPVariant* result);
static NPClass* npClass();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list