Bug 259038
Summary: | [CSS Math Functions] Fix failures in css/css-values/minmax-percentage-serialize.html | ||
---|---|---|---|
Product: | WebKit | Reporter: | Tim Nguyen (:ntim) <ntim> |
Component: | CSS | Assignee: | 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)
`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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/111986644>
Tim Nguyen (:ntim)
The only exception to this is if there's only one argument (see bug 259037)
Tim Nguyen (:ntim)
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)
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)
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)
The test now fully passes. Not sure what exactly fixed it though
Tim Nguyen (:ntim)
*** This bug has been marked as a duplicate of bug 278244 ***