| OLD | NEW |
| 1 "use strict"; | 1 "use strict"; |
| 2 // Written by Aryeh Gregor <ayg@aryeh.name> | 2 // Written by Aryeh Gregor <ayg@aryeh.name> |
| 3 | 3 |
| 4 // TODO: iframes, contenteditable/designMode | 4 // TODO: iframes, contenteditable/designMode |
| 5 | 5 |
| 6 // Everything is done in functions in this test harness, so we have to declare | 6 // Everything is done in functions in this test harness, so we have to declare |
| 7 // all the variables before use to make sure they can be reused. | 7 // all the variables before use to make sure they can be reused. |
| 8 var testDiv, paras, detachedDiv, detachedPara1, detachedPara2, | 8 var testDiv, paras, detachedDiv, detachedPara1, detachedPara2, |
| 9 foreignDoc, foreignPara1, foreignPara2, xmlDoc, xmlElement, | 9 foreignDoc, foreignPara1, foreignPara2, xmlDoc, xmlElement, |
| 10 detachedXmlElement, detachedTextNode, foreignTextNode, | 10 detachedXmlElement, detachedTextNode, foreignTextNode, |
| (...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 */ | 1074 */ |
| 1075 function rangeFromEndpoints(endpoints) { | 1075 function rangeFromEndpoints(endpoints) { |
| 1076 // If we just use document instead of the ownerDocument of endpoints[0], | 1076 // If we just use document instead of the ownerDocument of endpoints[0], |
| 1077 // WebKit will throw on setStart/setEnd. This is a WebKit bug, but it's in | 1077 // WebKit will throw on setStart/setEnd. This is a WebKit bug, but it's in |
| 1078 // range, not selection, so we don't want to fail anything for it. | 1078 // range, not selection, so we don't want to fail anything for it. |
| 1079 var range = ownerDocument(endpoints[0]).createRange(); | 1079 var range = ownerDocument(endpoints[0]).createRange(); |
| 1080 range.setStart(endpoints[0], endpoints[1]); | 1080 range.setStart(endpoints[0], endpoints[1]); |
| 1081 range.setEnd(endpoints[2], endpoints[3]); | 1081 range.setEnd(endpoints[2], endpoints[3]); |
| 1082 return range; | 1082 return range; |
| 1083 } | 1083 } |
| OLD | NEW |