Bug 66964

Summary: Return the correct value for NPNVsupportsCarbonBool
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: Plug-insAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch aroben: review+

Description Anders Carlsson 2011-08-25 11:35:18 PDT
Return the correct value for NPNVsupportsCarbonBool
Comment 1 Anders Carlsson 2011-08-25 11:36:12 PDT
Created attachment 105226 [details]
Patch
Comment 2 Darin Adler 2011-08-25 11:43:14 PDT
Can we make a regression test for this?

What’s the real world impact?
Comment 3 Anders Carlsson 2011-08-25 11:47:08 PDT
(In reply to comment #2)
> Can we make a regression test for this?

We could, but it would involve making run-webkit-tests aware of whether Carbon plug-ins are available and look for different results depending on that. I don't think it's worth it.

> 
> What’s the real world impact?

Probably none - Carbon plug-ins just assume that the Carbon event model is supported. I just saw that it was wrong and it bothered me.
Comment 4 Adam Roben (:aroben) 2011-08-25 11:50:28 PDT
Comment on attachment 105226 [details]
Patch

This really should have a test associated with it.
Comment 5 Anders Carlsson 2011-08-25 13:23:07 PDT
Created attachment 105236 [details]
Patch
Comment 6 Adam Roben (:aroben) 2011-08-25 13:24:42 PDT
Comment on attachment 105236 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=105236&action=review

> Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/SupportsCarbonEventModel.cpp:56
> +    bool testConvert(double x, double y, NPCoordinateSpace sourceSpace, NPCoordinateSpace destSpace)
> +    {
> +        // First convert from src to dest.
> +        double destX, destY;
> +        if (!NPN_ConvertPoint(x, y, sourceSpace, &destX, &destY, destSpace))
> +            return false;
> +
> +        // Then convert back to src
> +        double srcX, srcY;
> +        if (!NPN_ConvertPoint(destX, destY, destSpace, &srcX, &srcY, sourceSpace))
> +            return false;
> +
> +
> +        // Then compare.
> +        if (srcX != x || srcY != y)
> +            return false;
> +
> +        return true;
> +    }

This function never seems to be called.

> Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/SupportsCarbonEventModel.cpp:58
> +    bool runTest()

This can be private.
Comment 7 Anders Carlsson 2011-08-25 13:26:46 PDT
Committed r93814: <http://trac.webkit.org/changeset/93814>