Bug 227238

Summary: Use double instead of float where appropriate in HTML Canvas IDL
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: CanvasAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, dino, esprehn+autocc, ews-watchlist, gyuyoung.kim, hi, joepeck, kondapallykalyan, sabouhallawa, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=227146
Attachments:
Description Flags
Patch none

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>