layout/reftests/svg/mask-img-ref.html

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.

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <body style="margin:0">
michael@0 4 <img src='data:image/svg+xml,
michael@0 5 <!-- vim: set expandtab ts=2 sw=2 tw=80: -->
michael@0 6 <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"
michael@0 7 xmlns:xlink="http://www.w3.org/1999/xlink"
michael@0 8 viewBox="0 0 700 130">
michael@0 9 <defs>
michael@0 10 <style type="text/css">
michael@0 11 .fillSpan {
michael@0 12 fill: lightgrey;
michael@0 13 stroke: black;
michael@0 14 }
michael@0 15 </style>
michael@0 16 <!-- Fade out effect -->
michael@0 17 <mask id="fadeout" maskContentUnits="objectBoundingBox">
michael@0 18 <rect x="-0.05" y="-0.05" width="1.1" height="1.1"
michael@0 19 fill="url(%23fadeoutGrad)"/>
michael@0 20 </mask>
michael@0 21 <linearGradient id="fadeoutGrad">
michael@0 22 <stop offset="0" stop-color="white" stop-opacity="1"/>
michael@0 23 <stop offset="0.35" stop-color="white" stop-opacity="1"/>
michael@0 24 <stop offset="0.9" stop-color="white" stop-opacity="0"/>
michael@0 25 </linearGradient>
michael@0 26 </defs>
michael@0 27 <rect y="50" width="150" height="80" class="fillSpan" mask="url(%23fadeout)"/>
michael@0 28 </svg>
michael@0 29 ' border=0 width="700">
michael@0 30 </body>
michael@0 31 </html>

mercurial