[Webkit-unassigned] [Bug 245356] New: Make narrowPrecisionToFloat() use clampTo<float>() instead of static_cast

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 19 00:59:29 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=245356

            Bug ID: 245356
           Summary: Make narrowPrecisionToFloat() use clampTo<float>()
                    instead of static_cast
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ahmad.saleem792 at gmail.com
                CC: sabouhallawa at apple.com, zimmermann at kde.org

Following Blink patch changed:

https://src.chromium.org/viewvc/blink?view=revision&revision=182563

below code:

Webkit GitHub - https://github.com/WebKit/WebKit/blob/8afe31a018b11741abdf9b4d5bb973d7c1d9ff05/Source/WebCore/platform/FloatConversion.h#L44

It addresses following issue:

For numbers within the range of valid floats, this has no effect.  For numbers
outside that range, the old code was technically undefined behavior (and in
practice would result in bad things like converting to infinity).  Now such
numbers will be deterministically clamped to +/-FLOAT_MAX

This issue in large zoom-in for SVG etc.

I think it would be good to merge this patch unless if people advise, it shouldn't be case.

Thanks!!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220919/7a006138/attachment-0001.htm>


More information about the webkit-unassigned mailing list