Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
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 | |
michael@0 | 8 | <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=342532 --> |
michael@0 | 9 | |
michael@0 | 10 | <title>Test: percentage height on absolutely positioned SVG</title> |
michael@0 | 11 | |
michael@0 | 12 | <!-- |
michael@0 | 13 | This testcase checks that percentage values for height on absolutely |
michael@0 | 14 | positioned SVG will be computed relative to their containing block, and |
michael@0 | 15 | not relative to the content area of the user agent. |
michael@0 | 16 | --> |
michael@0 | 17 | |
michael@0 | 18 | <style type="text/css"> |
michael@0 | 19 | |
michael@0 | 20 | html, body { |
michael@0 | 21 | padding: 0; |
michael@0 | 22 | border: 0; |
michael@0 | 23 | margin: 0; |
michael@0 | 24 | height: 100%; |
michael@0 | 25 | background: lime; |
michael@0 | 26 | } |
michael@0 | 27 | |
michael@0 | 28 | </style> |
michael@0 | 29 | </head> |
michael@0 | 30 | <body> |
michael@0 | 31 | |
michael@0 | 32 | <!-- create containing block for absolutely positioned children --> |
michael@0 | 33 | <div style="position:relative;"> |
michael@0 | 34 | |
michael@0 | 35 | <!-- div to expand parent div to a computed height of 20px --> |
michael@0 | 36 | <div style="height:20px; background:red;"/> |
michael@0 | 37 | |
michael@0 | 38 | <!-- absolutely positioned SVG - the explicit 100% percentage height |
michael@0 | 39 | should compute as a percentage of the parent div's computed height, |
michael@0 | 40 | not as a percentage of the body's height! I.e. no red should show. |
michael@0 | 41 | --> |
michael@0 | 42 | <svg xmlns="http://www.w3.org/2000/svg" style="position:absolute; top:0; width: 100%; height: 100%"> |
michael@0 | 43 | <rect width="100%" height="100%" fill="red"/> |
michael@0 | 44 | <rect width="100%" height="20px" fill="lime"/> |
michael@0 | 45 | </svg> |
michael@0 | 46 | |
michael@0 | 47 | </div> |
michael@0 | 48 | |
michael@0 | 49 | </body> |
michael@0 | 50 | </html> |