Bug 66964 - Return the correct value for NPNVsupportsCarbonBool
Summary: Return the correct value for NPNVsupportsCarbonBool
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-25 11:35 PDT by Anders Carlsson
Modified: 2011-08-25 13:26 PDT (History)
1 user (show)

See Also:


Attachments
Patch (1.34 KB, patch)
2011-08-25 11:36 PDT, Anders Carlsson
no flags Details | Formatted Diff | Diff
Patch (10.68 KB, patch)
2011-08-25 13:23 PDT, Anders Carlsson
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>