Bug 227238 - Use double instead of float where appropriate in HTML Canvas IDL
Summary: Use double instead of float where appropriate in HTML Canvas IDL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-21 15:07 PDT by Chris Dumez
Modified: 2021-06-21 17:23 PDT (History)
11 users (show)

See Also:


Attachments
Patch (39.25 KB, patch)
2021-06-21 15:13 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2021-06-21 15:07:29 PDT
There are a lot of places in our HTML Canvas IDL where we're using float type, even though the specification is using double. Let's fix those.
Comment 1 Chris Dumez 2021-06-21 15:13:50 PDT
Created attachment 431915 [details]
Patch
Comment 2 Sam Weinig 2021-06-21 15:24:44 PDT
Comment on attachment 431915 [details]
Patch

Let no one ever say bullying does not work. This proves it does ;). 

Thanks Chris!
Comment 3 Devin Rousso 2021-06-21 15:34:02 PDT
Comment on attachment 431915 [details]
Patch

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

> Source/WebCore/inspector/InspectorCanvasCallTracer.h:155
>      macro(std::optional<float>&) \

Is this still needed anymore?

> Source/WebCore/inspector/InspectorCanvasCallTracer.h:171
>      macro(Vector<float>&) \

Is this still needed anymore?
Comment 4 Chris Dumez 2021-06-21 15:35:10 PDT
(In reply to Devin Rousso from comment #3)
> Comment on attachment 431915 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=431915&action=review
> 
> > Source/WebCore/inspector/InspectorCanvasCallTracer.h:155
> >      macro(std::optional<float>&) \
> 
> Is this still needed anymore?
> 
> > Source/WebCore/inspector/InspectorCanvasCallTracer.h:171
> >      macro(Vector<float>&) \
> 
> Is this still needed anymore?

Yes, I tried to remove them and it failed to build. I believe this is because we still have some non-standard API using float and requiring those. I updated updated the "standard" API.
Comment 5 Sam Weinig 2021-06-21 16:25:07 PDT
(In reply to Devin Rousso from comment #3)
> Comment on attachment 431915 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=431915&action=review
> 
> > Source/WebCore/inspector/InspectorCanvasCallTracer.h:155
> >      macro(std::optional<float>&) \
> 
> Is this still needed anymore?
> 
> > Source/WebCore/inspector/InspectorCanvasCallTracer.h:171
> >      macro(Vector<float>&) \
> 
> Is this still needed anymore?

We really got to replace that with a non-macro version at some point. We have better technology.
Comment 6 EWS 2021-06-21 17:22:54 PDT
Committed r279093 (239010@main): <https://commits.webkit.org/239010@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 431915 [details].
Comment 7 Radar WebKit Bug Importer 2021-06-21 17:23:20 PDT
<rdar://problem/79588170>