Bug 238231 - calc(): Handle finite value with infinite step in round()
Summary: calc(): Handle finite value with infinite step in round()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nikos Mouchtaris
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-22 15:56 PDT by Nikos Mouchtaris
Modified: 2022-03-24 18:05 PDT (History)
8 users (show)

See Also:


Attachments
Patch (12.59 KB, patch)
2022-03-22 16:01 PDT, Nikos Mouchtaris
simon.fraser: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (12.61 KB, patch)
2022-03-24 14:35 PDT, Nikos Mouchtaris
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos Mouchtaris 2022-03-22 15:56:02 PDT
Handle finite value with infinite step in round() from css/css-values/round-function.html
Comment 1 Nikos Mouchtaris 2022-03-22 16:01:41 PDT
Created attachment 455445 [details]
Patch
Comment 2 Simon Fraser (smfr) 2022-03-24 13:38:54 PDT
Comment on attachment 455445 [details]
Patch

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

> Source/WebCore/css/calc/CSSCalcPrimitiveValueNode.cpp:89
> +        m_value = CSSPrimitiveValue::create(signbit(m_value->doubleValue()) ? -std::numeric_limits<double>::infinity() : std::numeric_limits<double>::infinity(), m_value->primitiveType());

can this use copysign()?
Comment 3 Nikos Mouchtaris 2022-03-24 14:35:23 PDT
Created attachment 455684 [details]
Patch
Comment 4 Nikos Mouchtaris 2022-03-24 17:16:50 PDT
(In reply to Simon Fraser (smfr) from comment #2)
> Comment on attachment 455445 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=455445&action=review
> 
> > Source/WebCore/css/calc/CSSCalcPrimitiveValueNode.cpp:89
> > +        m_value = CSSPrimitiveValue::create(signbit(m_value->doubleValue()) ? -std::numeric_limits<double>::infinity() : std::numeric_limits<double>::infinity(), m_value->primitiveType());
> 
> can this use copysign()?

Fixed.
Comment 5 EWS 2022-03-24 18:04:21 PDT
Committed r291841 (248855@main): <https://commits.webkit.org/248855@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 455684 [details].
Comment 6 Radar WebKit Bug Importer 2022-03-24 18:05:23 PDT
<rdar://problem/90809047>