Bug 238231

Summary: calc(): Handle finite value with infinite step in round()
Product: WebKit Reporter: Nikos Mouchtaris <nmouchtaris>
Component: New BugsAssignee: Nikos Mouchtaris <nmouchtaris>
Status: RESOLVED FIXED    
Severity: Normal CC: esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, macpherson, menard, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
simon.fraser: review+, ews-feeder: commit-queue-
Patch none

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>