OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style> | 2 <style> |
3 div { width: 0px; height: 0px } | 3 div { width: 0px; height: 0px } |
4 #reflectionOffset { -webkit-box-reflect: right calc(50%) } | 4 #reflectionOffset { -webkit-box-reflect: right calc(50%) } |
5 #reflectionMask { -webkit-box-reflect: below calc(5px) -webkit-gradient
(linear, 0 0, 0 0) 25 25 25 25 stretch stretch; } | 5 #reflectionMask { -webkit-box-reflect: below calc(5px) -webkit-gradient
(linear, 0 0, 0 0) 25 25 25 25 stretch stretch; } |
6 </style> | 6 </style> |
7 <body> | 7 <body> |
8 <p>Test calling getPropertyValue on computed styles for -webkit-border-image
property.</p> | 8 <p>Test calling getPropertyValue on computed styles for -webkit-border-image
property.</p> |
9 <pre id="console"></pre> | 9 <pre id="console"></pre> |
10 | 10 |
11 <div id="reflectionOffset"></div> | 11 <div id="reflectionOffset"></div> |
12 <div id="reflectionMask"></div> | 12 <div id="reflectionMask"></div> |
13 </body> | 13 </body> |
14 <script> | 14 <script> |
15 function log(msg) | 15 function log(msg) |
16 { | 16 { |
17 document.getElementById('console').appendChild(document.createTextNode(m
sg + '\n')); | 17 document.getElementById('console').appendChild(document.createTextNode(m
sg + '\n')); |
18 } | 18 } |
19 | 19 |
20 function subTest(object, property) | 20 function subTest(object, property) |
21 { | 21 { |
22 log(' ' + property); | 22 log(' ' + property); |
23 var value = document.defaultView.getComputedStyle(object, null).getPrope
rtyValue(property); | 23 var value = document.defaultView.getComputedStyle(object, null).getPrope
rtyValue(property); |
24 log(' getPropertyValue: ' + value + (value == 'none' ? ' <- FAIL'
: '')); | 24 log(' getPropertyValue: ' + value + (value == 'none' ? ' <- FAIL'
: '')); |
25 log(' getPropertyCSSValue: ' + document.defaultView.getComputedStyle(
object, null).getPropertyCSSValue(property)); | |
26 } | 25 } |
27 | 26 |
28 function test(id, value) | 27 function test(id, value) |
29 { | 28 { |
30 log('-webkit-box-reflect: ' + value + ';'); | 29 log('-webkit-box-reflect: ' + value + ';'); |
31 var object = document.getElementById(id); | 30 var object = document.getElementById(id); |
32 subTest(object, '-webkit-box-reflect'); | 31 subTest(object, '-webkit-box-reflect'); |
33 } | 32 } |
34 | 33 |
35 if (window.testRunner) | 34 if (window.testRunner) |
36 testRunner.dumpAsText(); | 35 testRunner.dumpAsText(); |
37 test('reflectionOffset', 'right calc(50%)'); | 36 test('reflectionOffset', 'right calc(50%)'); |
38 log(''); | 37 log(''); |
39 test('reflectionMask', 'below calc(5px) -webkit-gradient(linear, 0 0, 0 0) 2
5 25 25 25 stretch stretch'); | 38 test('reflectionMask', 'below calc(5px) -webkit-gradient(linear, 0 0, 0 0) 2
5 25 25 25 stretch stretch'); |
40 </script> | 39 </script> |
41 | 40 |
OLD | NEW |