Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | <!-- |
michael@0 | 2 | Any copyright is dedicated to the Public Domain. |
michael@0 | 3 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 4 | --> |
michael@0 | 5 | <html xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Test SVG clipPath clipping of transformed HTML elements</title> |
michael@0 | 8 | <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=773197 --> |
michael@0 | 9 | <style type="text/css"> |
michael@0 | 10 | |
michael@0 | 11 | * { margin: 0; border: 0; padding: 0;} |
michael@0 | 12 | |
michael@0 | 13 | div { |
michael@0 | 14 | position: absolute; |
michael@0 | 15 | left: 1px; |
michael@0 | 16 | top: 1px; |
michael@0 | 17 | width: 3px; |
michael@0 | 18 | height: 3px; |
michael@0 | 19 | transform: scale(100,100); |
michael@0 | 20 | transform-origin: 0 0; |
michael@0 | 21 | } |
michael@0 | 22 | |
michael@0 | 23 | </style> |
michael@0 | 24 | </head> |
michael@0 | 25 | <body bgcolor="lime"> |
michael@0 | 26 | |
michael@0 | 27 | <svg xmlns="http://www.w3.org/2000/svg" width="300" height="300" |
michael@0 | 28 | style="display:block; position:absolute;"> |
michael@0 | 29 | <clipPath id="cp1" x="0" y="0" width="1" height="1" clipPathUnits="objectBoundingBox"> |
michael@0 | 30 | <circle cx="0.5" cy="0.5" r="0.01" fill="white"/> |
michael@0 | 31 | <circle cx="0.5" cy="0.5" r="0.48" fill="white"/> |
michael@0 | 32 | </clipPath> |
michael@0 | 33 | <clipPath id="cp2" x="0" y="0" width="1" height="1" clipPathUnits="objectBoundingBox"> |
michael@0 | 34 | <circle cx="0.5" cy="0.5" r="0.01" fill="white"/> |
michael@0 | 35 | <circle cx="0.5" cy="0.5" r="0.50" fill="white"/> |
michael@0 | 36 | </clipPath> |
michael@0 | 37 | <circle cx="150" cy="150" r="147" fill="red"/> |
michael@0 | 38 | </svg> |
michael@0 | 39 | |
michael@0 | 40 | <div style="background: red; clip-path: url(#cp1);"/> |
michael@0 | 41 | <div style="background: lime; clip-path: url(#cp2);"/> |
michael@0 | 42 | |
michael@0 | 43 | </body> |
michael@0 | 44 | </html> |