| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 iframe { | 3 iframe { |
| 4 position: absolute; | 4 position: absolute; |
| 5 left: 200px; | 5 left: 200px; |
| 6 top: 200px; | 6 top: 200px; |
| 7 height: 120px; | 7 height: 200px; |
| 8 width: 120px; | 8 width: 200px; |
| 9 padding: 10px; | 9 padding: 10px; |
| 10 border: none; | 10 border: none; |
| 11 transform: scale(2); | 11 transform: scale(2); |
| 12 } | 12 } |
| 13 .spacer { |
| 14 height: 2000px; |
| 15 } |
| 13 </style> | 16 </style> |
| 14 | 17 |
| 15 <iframe src="data:text/html;charset=utf-8,<html><body style='width:1000px; heigh
t:1000px;'><p style='font-size: 6px'>Should be covered by a green overlay.</p></
body></html>"></iframe> | 18 <iframe srcdoc=" |
| 19 <!DOCTYPE html> |
| 20 <style> |
| 21 iframe { |
| 22 height: 120px; |
| 23 width:120px; |
| 24 padding:10px; |
| 25 border:none; |
| 26 } |
| 27 </style> |
| 28 <iframe srcdoc=" |
| 29 <!DOCTYPE html> |
| 30 <body style='width:1000px; height:1000px;'> |
| 31 <p style='font-size: 6px'>Should be covered by a green overlay.</p> |
| 32 </body>"> |
| 33 </iframe>"></iframe> |
| 34 |
| 16 <div id="console"></div> | 35 <div id="console"></div> |
| 36 <div class="spacer"></div> |
| 17 | 37 |
| 18 <script src="../resources/js-test.js"></script> | 38 <script src="../resources/js-test.js"></script> |
| 19 <script src="../resources/run-after-layout-and-paint.js"></script> | 39 <script src="../resources/run-after-layout-and-paint.js"></script> |
| 20 <script src="resources/non-fast-scrollable-region-testing.js"></script> | 40 <script src="resources/non-fast-scrollable-region-testing.js"></script> |
| 21 <script> | 41 <script> |
| 22 window.jsTestIsAsync = true; | 42 window.jsTestIsAsync = true; |
| 23 description('This test ensures non-fast scrollable areas are calculated ' + | 43 description('This test ensures non-fast scrollable areas are calculated ' + |
| 24 'correctly when a CSS scale transformation is applied.'); | 44 'correctly when a CSS scale transformation is applied.'); |
| 25 | 45 |
| 26 onload = function() { | 46 onload = function() { |
| 27 runAfterLayoutAndPaint(function(){ | 47 runAfterLayoutAndPaint(function(){ |
| 28 nonFastScrollableRects = window.internals.nonFastScrollableRects(document)
; | 48 nonFastScrollableRects = window.internals.nonFastScrollableRects(document)
; |
| 29 shouldBe('nonFastScrollableRects.length', '1'); | 49 shouldBe('nonFastScrollableRects.length', '1'); |
| 30 shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[150, 15
0, 240, 240]'); | 50 shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[146, 14
6, 240, 240]'); |
| 31 | 51 |
| 32 drawNonFastScrollableRegionOverlays(); | 52 drawNonFastScrollableRegionOverlays(); |
| 33 | 53 |
| 34 finishJSTest(); | 54 finishJSTest(); |
| 35 }); | 55 }); |
| 36 }; | 56 }; |
| 37 </script> | 57 </script> |
| OLD | NEW |