From 60603f7da176f2ecbf026cbb687f6144ad41ba66 Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Fri, 21 Nov 2008 19:50:07 +0000 Subject: Fix the getintidentifier-special-values.html plugin layout test, which broke as a result of change r5829 to fix silverlight windowless plugin issues. One of the changes was to return int32 as the variant type wherever applicable. Firefox does the same and Silverlight does rely on this behavior. This is broken in webkit. I will be filing a bug against webkit. The fix is to support int32 as an incoming NPVariant type in the layout test plugin. TBR=jam Review URL: http://codereview.chromium.org/11574 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5837 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/tools/npapi_layout_test_plugin/PluginObject.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'webkit/tools/npapi_layout_test_plugin/PluginObject.cpp') diff --git a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp index 40a636c..a828879 100644 --- a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp +++ b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp @@ -443,8 +443,17 @@ static bool testEnumerate(PluginObject* obj, const NPVariant* args, uint32_t arg static bool testGetIntIdentifier(PluginObject*, const NPVariant* args, uint32_t argCount, NPVariant* result) { - if (argCount == 1 && NPVARIANT_IS_DOUBLE(args[0])) { - NPIdentifier identifier = browser->getintidentifier((int)NPVARIANT_TO_DOUBLE(args[0])); + if (argCount != 1) + return false; + + NPIdentifier identifier; + + if (NPVARIANT_IS_DOUBLE(args[0])) { + identifier = browser->getintidentifier((int)NPVARIANT_TO_DOUBLE(args[0])); + INT32_TO_NPVARIANT((int32)identifier, *result); + return true; + } else if (NPVARIANT_IS_INT32(args[0])) { + identifier = browser->getintidentifier((int)NPVARIANT_TO_INT32(args[0])); INT32_TO_NPVARIANT((int32)identifier, *result); return true; } -- cgit v1.1