| OLD | NEW |
| 1 <head> | 1 <head> |
| 2 <script src="../../resources/ahem.js"></script> | 2 <script src="../../resources/ahem.js"></script> |
| 3 <style type="text/css"> | 3 <style type="text/css"> |
| 4 .ahem { font: 20px Ahem; } | 4 .ahem { font: 20px Ahem; } |
| 5 </style> | 5 </style> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 if (window.testRunner) | 8 if (window.testRunner) |
| 9 testRunner.dumpAsText(); | 9 testRunner.dumpAsText(); |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 content += "<p>line " + i + "</p>\n"; | 21 content += "<p>line " + i + "</p>\n"; |
| 22 return content; | 22 return content; |
| 23 } | 23 } |
| 24 | 24 |
| 25 function runFrameScrollTest() { | 25 function runFrameScrollTest() { |
| 26 var frame = frames[0]; | 26 var frame = frames[0]; |
| 27 var doc = frame.document; | 27 var doc = frame.document; |
| 28 var body = doc.body; | 28 var body = doc.body; |
| 29 body.innerHTML = generateContent(); | 29 body.innerHTML = generateContent(); |
| 30 frame.focus(); | 30 frame.focus(); |
| 31 body.focus(); |
| 31 frame.getSelection().collapse(body.firstChild, 0); | 32 frame.getSelection().collapse(body.firstChild, 0); |
| 32 if (onMacPlatform) | 33 if (onMacPlatform) |
| 33 offsets = [ 55, 175 ]; | 34 offsets = [ 55, 175 ]; |
| 34 else | 35 else |
| 35 offsets = [ 120, 240 ]; | 36 offsets = [ 120, 240 ]; |
| 36 runScrollingTest("iframe", frame, offsets, function() { return frame.pageYOf
fset; }); | 37 runScrollingTest("iframe", frame, offsets, function() { return frame.pageYOf
fset; }); |
| 37 } | 38 } |
| 38 | 39 |
| 39 function runDivScrollTest() { | 40 function runDivScrollTest() { |
| 40 var editable = document.getElementById('editable'); | 41 var editable = document.getElementById('editable'); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 <div>Page up/down (option+page up/down on Mac) should move the move cursor and s
croll the content | 82 <div>Page up/down (option+page up/down on Mac) should move the move cursor and s
croll the content |
| 82 in contenteditable elements. This sample covers scroll position test of a) ifram
e element containing | 83 in contenteditable elements. This sample covers scroll position test of a) ifram
e element containing |
| 83 contenteditable body and b) content editable div element. Even though the cursor
will move exactly to | 84 contenteditable body and b) content editable div element. Even though the cursor
will move exactly to |
| 84 the same location on all platforms (covered by test option-page-up-down.html), p
lease note that Mac will | 85 the same location on all platforms (covered by test option-page-up-down.html), p
lease note that Mac will |
| 85 scroll the visible area by placing the cursor position in the middle. All other
platforms will scroll by | 86 scroll the visible area by placing the cursor position in the middle. All other
platforms will scroll by |
| 86 keeping the cursor aligned with the top edge of the visible area. </div> | 87 keeping the cursor aligned with the top edge of the visible area. </div> |
| 87 <iframe src="../resources/contenteditable-iframe-fixed-size-src.html" style="hei
ght:150px; padding: 0px;"></iframe> | 88 <iframe src="../resources/contenteditable-iframe-fixed-size-src.html" style="hei
ght:150px; padding: 0px;"></iframe> |
| 88 <div id="editable" contenteditable="true" class="ahem" style="height:150px; over
flow:auto; padding: 0px; margin: 0px;"></div> | 89 <div id="editable" contenteditable="true" class="ahem" style="height:150px; over
flow:auto; padding: 0px; margin: 0px;"></div> |
| 89 <div id="results"></div> | 90 <div id="results"></div> |
| 90 </body> | 91 </body> |
| OLD | NEW |