| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 body { width: 600px; } | 5 body { width: 600px; } |
| 6 | 6 |
| 7 #footNote { | 7 #footNote { |
| 8 -webkit-flow-into: footNote; | 8 -webkit-flow-into: footNote; |
| 9 display: block; | 9 display: block; |
| 10 font-size: 13px; | 10 font-size: 13px; |
| 11 } | 11 } |
| 12 | 12 |
| 13 #footNoteRegion { -webkit-flow-from: footNote; } | 13 #footNoteRegion { -webkit-flow-from: footNote; } |
| 14 #content { -webkit-flow-into: content; } | 14 #content { -webkit-flow-into: content; } |
| 15 #region { -webkit-flow-from: content; } | 15 #region { -webkit-flow-from: content; } |
| 16 </style> | 16 </style> |
| 17 </head> | 17 </head> |
| 18 <body> | 18 <body> |
| 19 | 19 |
| 20 <div id="region"></div> | 20 <div id="region"></div> |
| 21 <div id="footNoteRegion"></div> | 21 <div id="footNoteRegion"></div> |
| 22 <div id="content"> | 22 <div id="content"> |
| 23 <h1 style="margin-top: 0px">Selecting text through different CSS-Region flow
s</h1> | 23 <h1 style="margin-top: 0px">Selecting text through different CSS-Region flow
s</h1> |
| 24 <div id="contentText"> | 24 <div id="contentText"> |
| 25 This text contains a footnote as a nested region what is diplayed below
the article. (1) <span id="footNote"> | 25 This text contains a footnote as a nested region what is diplayed <span
id="start">below</span> the article. (1) <span id="footNote"> |
| 26 <span><span></span>(1) This is a footnote. Footnotes can be quite long a
nd go over several lines. This footnote | 26 <span><span></span>(1) This is a footnote. Footnotes can be quite long a
nd go over several lines. This footnote |
| 27 is nested inside the text above and displayed here with the help of css-
regions.</span></span> If you start selecting | 27 is nested inside the text <span id="end">above</span> and displayed here
with the help of css-regions.</span></span> If you start selecting |
| 28 text from this article until somewhere in the footnote and then click so
mewhere, the selection should be cleared. | 28 text from this article until somewhere in the footnote and then click so
mewhere, the selection should be cleared. |
| 29 </div> | 29 </div> |
| 30 </div> | 30 </div> |
| 31 | 31 |
| 32 <script> | 32 <script> |
| 33 if (window.testRunner) { | 33 if (window.testRunner) { |
| 34 // We are positioning the mouse to the center of the contentText and start h
olding the mouse down | 34 // We are positioning the mouse to the center of the contentText and start h
olding the mouse down |
| 35 var start = document.getElementById("contentText"); | 35 var start = document.getElementById("start"); |
| 36 var xStartPosition = start.offsetLeft + 10; | 36 var xStartPosition = start.offsetLeft + 0; |
| 37 var yStartPosition = start.offsetTop + start.offsetHeight / 2; | 37 var yStartPosition = start.offsetTop + start.offsetHeight / 2; |
| 38 eventSender.mouseMoveTo(xStartPosition, yStartPosition); | 38 eventSender.mouseMoveTo(xStartPosition, yStartPosition); |
| 39 eventSender.mouseDown(); | 39 eventSender.mouseDown(); |
| 40 | 40 |
| 41 // We are posotioning the mouse to the center of the footNote (what is a dif
ferent region flow) and release the button | 41 // We are positioning the mouse to the center of the footNote (what is a dif
ferent region flow) and release the button |
| 42 var end = document.getElementById("footNoteRegion"); | 42 var end = document.getElementById("end"); |
| 43 var xEndPosition = end.offsetLeft + end.offsetWidth / 2; | 43 var xEndPosition = end.offsetLeft + 0; |
| 44 var yEndPosition = end.offsetTop + end.offsetHeight / 2; | 44 var yEndPosition = end.offsetTop + end.offsetHeight / 2; |
| 45 eventSender.mouseMoveTo(xEndPosition, yEndPosition); | 45 eventSender.mouseMoveTo(xEndPosition, yEndPosition); |
| 46 eventSender.mouseUp(); | 46 eventSender.mouseUp(); |
| 47 | |
| 48 // We are moving the mouse somewhere else and click to clear the selection | |
| 49 eventSender.mouseMoveTo(1, 1); | |
| 50 eventSender.mouseDown(); | |
| 51 eventSender.mouseUp(); | |
| 52 } | 47 } |
| 53 </script> | 48 </script> |
| 54 </body> | 49 </body> |
| 55 </html> | 50 </html> |
| OLD | NEW |