| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <style> |
| 3 <head> | 3 p > b { |
| 4 <title>Test paddings and selection for inline elements</title> | 4 padding: 10px; |
| 5 <style> | 5 } |
| 6 p > b, pre > b { padding: 10px; } | 6 </style> |
| 7 </style> | 7 <p> |
| 8 </head> | 8 Lorem ipsum dolor sit amet, consectetur adipiscing elit.<br> |
| 9 <body> | 9 <b id="test">Sed dictum erat sit amet pharetra pretium.</b><br> |
| 10 <p> | 10 Nullam a est vitae orci tempus tincidunt nec at dolor. |
| 11 Lorem ipsum dolor sit amet, consectetur adipiscing elit.<br> | 11 </p> |
| 12 <b id="test">Sed dictum erat sit amet pharetra pretium.</b><br> | 12 <p> |
| 13 Nullam a est vitae orci tempus tincidunt nec at dolor. | 13 Tests whether selection includes padding in the Y direction for inline |
| 14 </p> | 14 elements. This padding would ideally not be included. http://crbug.com/657325#
c13 |
| 15 <p> | 15 </p> |
| 16 Tests that selections do not include padding in the Y direction for | 16 <script src="../../resources/run-after-layout-and-paint.js"></script> |
| 17 inline elements where it should be ignored. | 17 <script> |
| 18 </p> | 18 runAfterLayoutAndPaint(function() { |
| 19 <script> | 19 var node = document.getElementById('test').firstChild; |
| 20 var node = document.getElementById('test').firstChild; | 20 var range = document.createRange(); |
| 21 var range = document.createRange(); | 21 range.setStart(node, 5); |
| 22 range.setStart(node, 5); | 22 range.setEnd(node, node.length - 5); |
| 23 range.setEnd(node, node.length - 5); | 23 window.getSelection().addRange(range); |
| 24 window.getSelection().addRange(range); | 24 }, true); |
| 25 </script> | 25 </script> |
| 26 </body> | |
| 27 </html> | |
| OLD | NEW |