17 function addTest(i
, j
)
19 var iframe
= document
.createElement("iframe");
20 document
.body
.appendChild(iframe
);
21 var doc
= iframe
.contentDocument
;
22 var pre
= doc
.createElement("pre");
23 var text
= doc
.createTextNode("foo\n\nbar");
24 pre
.appendChild(text
);
25 pre
.style
.margin
= "0";
26 doc
.body
.appendChild(pre
);
27 var sel
= doc
.defaultView
.getSelection();
28 sel
.setBaseAndExtent(text
, i
, text
, j
);
32 iframe { border:
1px solid blue; width:
60px; height:
70px; margin:
4px; }
37 Test for
<i><a href=
"http://bugs.webkit.org/show_bug.cgi?id=13153">http://bugs.webkit.org/show_bug.cgi?id=
13153</a>
38 REGRESSION: Visual highlighting of pre-populated blank line in textarea is broken
</i>.
41 Testing the highlighting of and near hard line breaks.
47 Testing the highlighting of text split across boxes.
49 <iframe style=
"width: 128px;" src=
"data:text/html,
50 <div id='target'>Lorem ipsum dolor</div>
52 var text = document.getElementById('target').firstChild;
53 getSelection().setBaseAndExtent(text, 13, text, 16);