[Webkit-unassigned] [Bug 271651] New: getComputedStyle value for gradient should be converted to pixels when specified in em

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 25 16:05:20 PDT 2024


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

            Bug ID: 271651
           Summary: getComputedStyle value for gradient should be
                    converted to pixels when specified in em
           Product: WebKit
           Version: Safari 17
          Hardware: Unspecified
               URL: https://wpt.fyi/results/css/css-images/parsing/gradien
                    t-interpolation-method-computed.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: webkit-bug-importer at group.apple.com

https://wpt.live/results/css/css-images/parsing/gradient-interpolation-method-computed.html

When setting
  <div style="background-image: radial-gradient(50% 640px, rgb(255, 0, 0), rgb(0, 0, 255))">foo</div>

Then doing:

  const div = document.querySelector('div');
  div.style.getPropertyValue('background-image');
  window.getComputedStyle(div).backgroundImage;

returns:

Safari:  
getPropertyValue: "radial-gradient(50% 40em, rgb(255, 0, 0), rgb(0, 0, 255))"
getComputedStyle: "radial-gradient(50% 40em, rgb(255, 0, 0), rgb(0, 0, 255))"

Firefox: 
getPropertyValue: "radial-gradient(50% 40em, rgb(255, 0, 0), rgb(0, 0, 255))"
getComputedStyle: "radial-gradient(50% 640px, rgb(255, 0, 0), rgb(0, 0, 255))"


It would fix 110 tests in 
http://wpt.live/css/css-images/parsing/gradient-interpolation-method-computed.html

-- 
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/3b2df2dc/attachment-0001.htm>


More information about the webkit-unassigned mailing list