| OLD | NEW |
| 1 <!doctype HTML> | 1 <!doctype HTML> |
| 2 <style> | 2 <style> |
| 3 #scroller { | 3 #scroller { |
| 4 width: 400px; | 4 width: 400px; |
| 5 height: 300px; | 5 height: 300px; |
| 6 overflow: scroll; | 6 overflow: scroll; |
| 7 position: relative; | 7 position: relative; |
| 8 } | 8 } |
| 9 #clipper { | 9 #clipper { |
| 10 position: absolute; | 10 position: absolute; |
| 11 left: 50px; | 11 left: 50px; |
| 12 top: 250px; | 12 top: 250px; |
| 13 width: 300px; | 13 width: 300px; |
| 14 height: 200px; | 14 height: 200px; |
| 15 border: 5px dotted black; | 15 border: 5px dotted black; |
| 16 clip: rect(0px, 310px, 210px, 0px); | 16 clip: rect(0px, 310px, 210px, 0px); |
| 17 -webkit-clip-path: polygon(626px 463px,765px 236px,687px 31px,271px 100px,70
px 10px,49px 250px,133px 406px,374px 462px,529px 393px); | 17 -webkit-clip-path: polygon(626px 463px,765px 236px,687px 31px,271px 100px,70
px 10px,49px 250px,133px 406px,374px 462px,529px 393px); |
| 18 height: 2000px; | 18 height: 2000px; |
| 19 pointer-events: none; | 19 pointer-events: none; |
| 20 } | 20 } |
| 21 #fixed { | 21 #fixed { |
| 22 position: fixed; | 22 position: fixed; |
| 23 opacity: 0.99; /* Using 99% opacity on fixed pos elements to ensure they are
not automatically promoted. */ |
| 23 z-index: -1; | 24 z-index: -1; |
| 24 left: 0; | 25 left: 0; |
| 25 top: 0; | 26 top: 0; |
| 26 width: 100%; | 27 width: 100%; |
| 27 height: 100%; | 28 height: 100%; |
| 28 background: blue; | 29 background: blue; |
| 29 } | 30 } |
| 30 </style> | 31 </style> |
| 31 <div id="scroller"> | 32 <div id="scroller"> |
| 32 <div id="clipper"> | 33 <div id="clipper"> |
| 33 <div id="fixed"></div> | 34 <div id="fixed"></div> |
| 34 </div> | 35 </div> |
| 35 </div> | 36 </div> |
| 36 <script src="../../resources/js-test.js"></script> | 37 <script src="../../resources/js-test.js"></script> |
| 37 <script> | 38 <script> |
| 38 // These are from UseCounter.h | 39 // These are from UseCounter.h |
| 39 var ClipPathOfPositionedElement = 944; | 40 var ClipPathOfPositionedElement = 944; |
| 40 var ClipCssOfPositionedElement = 945; | 41 var ClipCssOfPositionedElement = 945; |
| 41 | 42 |
| 42 window.jsTestIsAsync = true; | 43 window.jsTestIsAsync = true; |
| 43 if (window.testRunner) { | 44 if (window.testRunner) { |
| 44 window.testRunner.layoutAndPaintAsyncThen(function() { | 45 window.testRunner.layoutAndPaintAsyncThen(function() { |
| 45 if (window.internals) { | 46 if (window.internals) { |
| 46 shouldBeTrue('internals.isUseCounted(document, ClipPathOfPositionedE
lement)'); | 47 shouldBeTrue('internals.isUseCounted(document, ClipPathOfPositionedE
lement)'); |
| 47 shouldBeTrue('internals.isUseCounted(document, ClipCssOfPositionedEl
ement)'); | 48 shouldBeTrue('internals.isUseCounted(document, ClipCssOfPositionedEl
ement)'); |
| 48 finishJSTest(); | 49 finishJSTest(); |
| 49 } | 50 } |
| 50 }); | 51 }); |
| 51 } | 52 } |
| 52 </script> | 53 </script> |
| OLD | NEW |