layout/reftests/svg/opacity-and-gradient-02.svg

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     1 <!--
     2      Any copyright is dedicated to the Public Domain.
     3      http://creativecommons.org/publicdomain/zero/1.0/
     4 -->
     5 <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
     7   <title>Testcase for opacity on elements referencing a gradient</title>
     9   <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=539165 -->
    11   <defs>
    12     <linearGradient id="lime" gradientUnits="userSpaceOnUse">
    13       <stop stop-color="lime"/>
    14     </linearGradient>
    15     <linearGradient id="red" gradientUnits="userSpaceOnUse">
    16       <stop stop-color="red"/>
    17     </linearGradient>
    18     <linearGradient id="red2" gradientUnits="userSpaceOnUse">
    19       <stop stop-color="red" offset="0%"/>
    20       <stop stop-color="red" offset="100%"/>
    21     </linearGradient>
    22     <linearGradient id="redgreen" gradientUnits="userSpaceOnUse">
    23       <stop stop-color="red" offset="0%"/>
    24       <stop stop-color="lime" offset="100%"/>
    25     </linearGradient>
    26   </defs>
    28   <rect width="100%" height="100%" fill="url(#lime)"/>
    30   <!-- test 'opacity' -->
    31   <rect width="25%" height="100%" fill="red" opacity="1"/>
    33   <!-- test 'fill-opacity' -->
    34   <rect x="25%" width="25%" height="100%" fill="url(#red)" fill-opacity="0.5"/>
    36   <!-- test 'fill-opacity' -->
    37   <rect x="50%" width="25%" height="100%" fill="url(#red2)" fill-opacity="0.5"/>
    39   <!-- test 'fill-opacity' -->
    40   <rect x="75%" width="25%" height="100%" fill="url(#redgreen)" fill-opacity="0"/>
    42 </svg>

mercurial