[Webkit-unassigned] [Bug 176500] New: SVG linear gradient - wrong stop color when offset is 100%

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 7 03:36:25 PDT 2017


            Bug ID: 176500
           Summary: SVG linear gradient - wrong stop color when offset is
           Product: WebKit
           Version: Other
          Hardware: PC
                OS: Windows 10
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: antisergey at gmail.com
                CC: zimmermann at kde.org

Created attachment 320107

  --> https://bugs.webkit.org/attachment.cgi?id=320107&action=review

Picture: expected (FF, Chrome) vs actual (WebKit)

There's a linear gradient which has two stops with offset 100%. Element using this gradient is expected to be filled with first color, but it's filled with second.

I have the following svg-file to reproduce error:

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="800" style="background:ivory" xmlns="http://www.w3.org/2000/svg" height="600" xmlns:svg="http://www.w3.org/2000/svg">
    <linearGradient x1="0%" spreadMethod="pad" id="lg1000" x2="0%" y2="0%" y1="100%">
      <stop stop-opacity="1" stop-color="red" offset="50%"/>
      <stop stop-opacity="1" stop-color="white" offset="50%"/>
        <linearGradient x1="0%" spreadMethod="pad" id="lg1001" x2="0%" y2="0%" y1="100%">
      <stop stop-opacity="1" stop-color="red" offset="100%"/>
      <stop stop-opacity="1" stop-color="white" offset="100%"/>
  <g visibility="visible" id="layer1">
    <rect width="110" id="el1000" fill="url(#lg1000)" transform="translate(294,128)" height="172" stroke="rgb(0,0,0)"/>
    <text text-anchor="middle" id="el1001" fill="rgb(0,0,0)" transform="translate(343,200)">50%</text>    
  <g id="layer2">
    <rect width="110" id="el1002" fill="url(#lg1001)" transform="translate(494,128)" height="172" stroke="rgb(0,0,0)"/>
    <text text-anchor="middle" id="el1003" fill="rgb(0,0,0)" transform="translate(543,200)">100%</text>    

Second rectangle with linear gradient, which has offset for both colors 100%, is expected to be filled with first color, red - and it's red in browsers: Firefox, Chrome, even in MS Edge.

I use Qt port of WebKit (Qt version 5.5.1) and separate QtWebKit build for the latest version of Qt (https://github.com/annulen/webkit/), error is reproduced in both versions - second rectangle is filled with second color, it's white.

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/20170907/22e6e8ff/attachment-0001.html>

More information about the webkit-unassigned mailing list