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

Unified Diff: third_party/WebKit/LayoutTests/fast/multicol/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/float-truncation.html
diff --git a/third_party/WebKit/LayoutTests/fast/multicol/float-truncation.html b/third_party/WebKit/LayoutTests/fast/multicol/float-truncation.html
index 43d0206ad4ed5eef8ae85391751798f42f4f33e0..9597272670ecadcf0d0608d57c668c1777bce7cd 100644
--- a/third_party/WebKit/LayoutTests/fast/multicol/float-truncation.html
+++ b/third_party/WebKit/LayoutTests/fast/multicol/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 };
}

Powered by Google App Engine
This is Rietveld 408576698