diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 19:50:07 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 19:50:07 +0000 |
commit | 60603f7da176f2ecbf026cbb687f6144ad41ba66 (patch) | |
tree | 13a7eb45ddb6b138a8c462e18dc0a918f82cd25c /webkit/tools | |
parent | b66db7d8f8ecf6d14b7496beb246125da950f9f9 (diff) | |
download | chromium_src-60603f7da176f2ecbf026cbb687f6144ad41ba66.zip chromium_src-60603f7da176f2ecbf026cbb687f6144ad41ba66.tar.gz chromium_src-60603f7da176f2ecbf026cbb687f6144ad41ba66.tar.bz2 |
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
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/npapi_layout_test_plugin/PluginObject.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
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; } |