Bug 217246

Summary: TranslateTransformOperation shouldn't take in a FloatSize to convert z as a double
Product: WebKit Reporter: Antoine Quint <graouts>
Component: New BugsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, ews-watchlist, graouts, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Antoine Quint 2020-10-02 13:09:00 PDT
TranslateTransformOperation shouldn't take in a FloatSize to convert z as a double
Comment 1 Antoine Quint 2020-10-02 13:11:23 PDT
Created attachment 410358 [details]
Patch
Comment 2 Darin Adler 2020-10-02 13:17:40 PDT
Comment on attachment 410358 [details]
Patch

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

> Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h:53
> +    double xAsDouble(const FloatSize& borderBoxSize) const { return floatValueForLength(m_x, borderBoxSize.width()); }
> +    double yAsDouble(const FloatSize& borderBoxSize) const { return floatValueForLength(m_y, borderBoxSize.height()); }
> +    double zAsDouble() const { return floatValueForLength(m_z, 1); }

Strange mix here. We are calling something that computes a float, then converting it to a double when returning it, then it seems 2 of the 3 call sites call narrowPrecisionToFloat on a value that was just converted *from* a float. Maybe this should return float, not double?
Comment 3 Radar WebKit Bug Importer 2020-10-09 13:09:14 PDT
<rdar://problem/70150086>
Comment 4 Antoine Quint 2020-10-19 12:03:27 PDT
Created attachment 411771 [details]
Patch
Comment 5 Antoine Quint 2020-10-19 23:20:14 PDT
Committed r268714: <https://trac.webkit.org/changeset/268714>