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

Unified Diff: third_party/WebKit/LayoutTests/editing/selection/extend-to-line-boundary.html

Issue 1922223003: Change linesBoundingBox to return LayoutRect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/editing/selection/extend-to-line-boundary.html
diff --git a/third_party/WebKit/LayoutTests/editing/selection/extend-to-line-boundary.html b/third_party/WebKit/LayoutTests/editing/selection/extend-to-line-boundary.html
index 6df731c22a58636211a216de9a946967d70e107f..5bdd7df753233bd613e07e4ee94a4e7c96a1205b 100644
--- a/third_party/WebKit/LayoutTests/editing/selection/extend-to-line-boundary.html
+++ b/third_party/WebKit/LayoutTests/editing/selection/extend-to-line-boundary.html
@@ -11,7 +11,7 @@ function createEditableMultilineDiv(text, numLines) {
var span = document.createElement("span");
span.innerHTML = text;
document.body.appendChild(span);
- var widthPx = span.offsetWidth;
+ var widthPx = Math.ceil(span.getBoundingClientRect().width);
document.body.removeChild(span);
// Make div with those dimensions so that the text wraps predictably regardless of platform.

Powered by Google App Engine
This is Rietveld 408576698