Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Unified Diff: third_party/WebKit/LayoutTests/fast/multicol/vertical-lr/float-truncation.html

Issue 1987983002: Remove Range.expand() method Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/multicol/vertical-lr/float-truncation.html
diff --git a/third_party/WebKit/LayoutTests/fast/multicol/vertical-lr/float-truncation.html b/third_party/WebKit/LayoutTests/fast/multicol/vertical-lr/float-truncation.html
index 6e96866ff1f50d8ad18e6f62fe7686008e1a7153..43aedddc00a0dfeaa6f00daa6bcda175e4c97df6 100644
--- a/third_party/WebKit/LayoutTests/fast/multicol/vertical-lr/float-truncation.html
+++ b/third_party/WebKit/LayoutTests/fast/multicol/vertical-lr/float-truncation.html
@@ -69,11 +69,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 };
}

Powered by Google App Engine
This is Rietveld 408576698