Index: third_party/WebKit/LayoutTests/fast/multicol/vertical-rl/float-truncation.html |
diff --git a/third_party/WebKit/LayoutTests/fast/multicol/vertical-rl/float-truncation.html b/third_party/WebKit/LayoutTests/fast/multicol/vertical-rl/float-truncation.html |
index 4ac1f4673395525a8119e94cb36f34913643db8b..59b9ef67cc02c73c9a4e0f40e1a97bdd9ae5cae3 100644 |
--- a/third_party/WebKit/LayoutTests/fast/multicol/vertical-rl/float-truncation.html |
+++ b/third_party/WebKit/LayoutTests/fast/multicol/vertical-rl/float-truncation.html |
@@ -72,11 +72,10 @@ |
<script> |
function floatOffset(float) |
{ |
- var range = document.createRange(); |
- range.setStart(float, 0); |
- range.setEnd(float, 0); |
- range.expand("word"); |
- var rect = range.getBoundingClientRect(); |
+ var selection = getSelection(); |
+ selection.collapse(float, 0); |
+ selection.modify("extend", "forward", "word"); |
+ var rect = selection.getRangeAt(0).getBoundingClientRect(); |
var parentRect = float.parentNode.getBoundingClientRect(); |
return { width: rect.left - parentRect.left, height: rect.top - parentRect.top }; |
} |