[Webkit-unassigned] [Bug 271621] New: [serialization] color functions such as lab() etc do not handle calc(NaN) and calc(0 / 0) properly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 25 04:21:05 PDT 2024


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

            Bug ID: 271621
           Summary: [serialization] color functions such as lab() etc do
                    not handle calc(NaN) and calc(0 / 0) properly
           Product: WebKit
           Version: Safari 17
          Hardware: Unspecified
               URL: https://wpt.fyi/results/css/css-color/parsing/color-va
                    lid-lab.html
                OS: Unspecified
            Status: NEW
          Keywords: BrowserCompat, WPTImpact
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: karlcow at apple.com
                CC: m_dubet at apple.com, webkit-bug-importer at group.apple.com

Matthieu,

https://wpt.fyi/results/css/css-color/parsing/color-valid-lab.html
http://wpt.live/css/css-color/parsing/color-valid-lab.html


The tests pass in Firefox and Chrome.

Set 
   div.style["color"] = "rgb(calc(NaN) 30 30)"
Then 
   div.style.getPropertyValue('color')
Returns (as it should)
   "rgb(0, 30, 30)"

It has clamped the value to 0,
while it should have returned:


   "rgb(calc(NaN), 30, 30)"

The same is happening for 
   div.style["color"] = "rgb(calc(0 / 0) 30 30)"
where it should return
   "rgb(calc(NaN), 30, 30)"


See the rationales in https://github.com/w3c/csswg-drafts/issues/8629
This should fix some tests here and there

-- 
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/20240325/744e61dc/attachment.htm>


More information about the webkit-unassigned mailing list