| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/st
rict.dtd"> | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/st
rict.dtd"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 5 <title>Selection on replaced element</title> | 5 <title>Selection on replaced element</title> |
| 6 <style type="text/css"> | 6 <style type="text/css"> |
| 7 img { | 7 img { |
| 8 position: relative; | 8 position: relative; |
| 9 top: 80px; | 9 top: 80px; |
| 10 } | 10 } |
| 11 img.moved { | 11 img.moved { |
| 12 top: 0px; | 12 top: 0px; |
| 13 } | 13 } |
| 14 </style> | 14 </style> |
| 15 <script src="resources/text-based-repaint.js" type="text/javascript" charset="
utf-8"></script> | 15 <script src="resources/text-based-repaint.js" type="text/javascript" charset="
utf-8"></script> |
| 16 <script type="text/javascript" charset="utf-8"> | 16 <script type="text/javascript" charset="utf-8"> |
| 17 function loaded() | 17 function loaded() |
| 18 { | 18 { |
| 19 var selection = window.getSelection(); | 19 var selection = window.getSelection(); |
| 20 var image = document.getElementById('test'); | 20 var image = document.getElementById('test'); |
| 21 selection.setBaseAndExtent(image, 0, image, 1); | 21 selection.setBaseAndExtent(image, 0, image, 1); |
| 22 runRepaintTest(); | 22 runRepaintAndPixelTest(); |
| 23 } | 23 } |
| 24 function repaintTest() | 24 function repaintTest() |
| 25 { | 25 { |
| 26 document.getElementById('test').className = 'moved'; | 26 document.getElementById('test').className = 'moved'; |
| 27 } | 27 } |
| 28 </script> | 28 </script> |
| 29 </head> | 29 </head> |
| 30 <body onload="loaded()"> | 30 <body onload="loaded()"> |
| 31 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=22472">https://bu
gs.webkit.org/show_bug.cgi?id=22472</a> | 31 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=22472">https://bu
gs.webkit.org/show_bug.cgi?id=22472</a> |
| 32 <i>Selection is not completely erased when a replaced element moves</i> | 32 <i>Selection is not completely erased when a replaced element moves</i> |
| 33 </p> | 33 </p> |
| 34 <img id="test" src="resources/apple.jpg" width="214" height="232" alt="Apple"> | 34 <img id="test" src="resources/apple.jpg" width="214" height="232" alt="Apple"> |
| 35 </body> | 35 </body> |
| 36 </html> | 36 </html> |
| OLD | NEW |