Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / nodesFromRect / nodesFromRect-inline-image.html
blob1d1789ce29dd76b436ab5472721deb627cf3707b
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Document::nodesFromRect : inline image - bug 85849</title>
5 <script src="../../../resources/js-test.js"></script>
6 <script src="resources/nodesFromRect.js"></script>
7 <style>
8 #sandbox {
9 position: absolute;
10 left: 0px;
11 top: 0px;
12 width: 400px;
13 height: 200px;
15 #sandbox #container { padding: 2px; padding-bottom: 10px; }
16 #sandbox #container span { font-size: 36px; }
17 #sandbox img { background-color: black; }
18 </style>
19 </head>
20 <body id="body">
21 <div id=sandbox>
22 <div id=container>
23 <span>
24 <img width="100" height="100"></img>
25 </span>
26 </div>
27 </div>
29 <p id="description"></p>
30 <span id="console"></span>
31 <script type="application/javascript">
32 function runTest()
34 description(document.title);
35 window.scrollTo(0, 0);
36 /* Point based test over the img only. */
37 checkRect(20, 20, 1, 1, "IMG");
38 /* Rect based test over the img only. */
39 checkRect(15, 15, 10, 10, "IMG");
40 /* Rect based test over the div only. */
41 checkRect(0, 0, 2, 2, "DIV#container");
42 /* Rect based test over the span only. */
43 checkRect(3, 103, 2, 2, "SPAN");
45 /* Note that for the tests below, the img bounds are considered to be (2, 2) x (100, 100). */
46 /* Rect based test over the entire img. */
47 checkRect(2, 2, 100, 100, "IMG");
48 /* Point based test over the img and the span. */
49 checkRect(2, 99, 1, 1, "IMG");
50 /* Rect based test over the img and the span with the img fully covering the hit region. */
51 checkRect(2, 98, 2, 2, "IMG");
52 /* Rect based test over the img and the span with the img not fully covering the hit region. */
53 checkRect(3, 101, 2, 5, "IMG, SPAN");
54 /* Rect based test over the img, span and their container. */
55 checkRect(3, 101, 2, 18, "IMG, SPAN, DIV#container");
56 /* Rect based test over just span and its container. */
57 checkRect(3, 103, 2, 16, "SPAN, DIV#container");
58 /* Rect based test over the img that is not over span with the img not fully covering the hit region. */
59 checkRect(1, 1, 3, 3, "IMG, DIV#container");
62 runTest();
63 </script>
64 </body>
65 </html>