Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / compositing / overflow / textarea-scroll-touch.html
blobc20d892c223b99622fd57f9f7234ed3208f5741c
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 html {
6 -webkit-overflow-scrolling: touch;
9 textarea {
10 width: 200px;
11 height: 120px;
12 margin: 10px;
13 border: 1px solid black;
14 display: inline-block;
15 font-size: 24pt;
16 background-color: #CCCCCC;
18 </style>
19 <script>
20 if (window.testRunner)
21 testRunner.dumpAsText();
23 if (window.internals)
24 window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
26 function testScrollability(element)
28 // This will cause scrollable element content layers to be offset by y=50 with respect to their scrolling container.
29 element.scrollTop = 50;
32 function doTest()
34 var divs = document.querySelectorAll('body > textarea');
35 for (var i = 0; i < divs.length; ++i)
36 testScrollability(divs[i]);
38 if (window.testRunner)
39 document.getElementById('results').innerText = window.internals.layerTreeAsText(document);
41 window.addEventListener('load', doTest, false);
42 </script>
43 </head>
44 <body>
46 <textarea>
47 Lorem ipsum dolor sit amet, consectetur adipisicing elit.
48 </textarea>
50 <textarea disabled>
51 Lorem ipsum dolor sit amet, consectetur adipisicing elit.
52 </textarea>
54 <pre id="results">This test requires DRT.</pre>
55 </body>
56 </html>