Bug 259038

Summary: [CSS Math Functions] Fix failures in css/css-values/minmax-percentage-serialize.html
Product: WebKit Reporter: Tim Nguyen (:ntim) <ntim>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Tim Nguyen (:ntim)
Reported 2023-07-09 16:27:29 PDT
`min(1%, 2%, 3%)` should stay `min(1%, 2%, 3%)` instead of collapsing to `calc(1%)`, given we can't conclude whether 1% is positive or negative. Same for `max(1%, 2%, 3%)`.
Attachments
Radar WebKit Bug Importer
Comment 1 2023-07-09 16:27:38 PDT
Tim Nguyen (:ntim)
Comment 2 2023-07-09 16:30:26 PDT
The only exception to this is if there's only one argument (see bug 259037)
Tim Nguyen (:ntim)
Comment 3 2023-07-09 18:29:22 PDT
So arguably, WebKit's behavior is more correct here, since it does the collapsing only for properties that have a non-negative range. The test should perhaps be adjusted to test for both types of properties.
Tim Nguyen (:ntim)
Comment 4 2023-07-09 18:36:41 PDT
It does look like the test uses text-indent, which does take a negative range as well, so WebKit isn't working as intended here.
Tim Nguyen (:ntim)
Comment 5 2023-07-09 19:50:40 PDT
Hmm, this is more about whether a percentage can resolve to a negative value. `text-indent` / `margin-left` percentages are relative to the size of the containing block...
Tim Nguyen (:ntim)
Comment 6 2024-09-18 23:06:31 PDT
The test now fully passes. Not sure what exactly fixed it though
Tim Nguyen (:ntim)
Comment 7 2024-09-18 23:09:01 PDT
*** This bug has been marked as a duplicate of bug 278244 ***
Note You need to log in before you can comment on or make changes to this bug.