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