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

Unified Diff: third_party/WebKit/LayoutTests/fast/sub-pixel/width-of-inline-in-float.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/fast/sub-pixel/width-of-inline-in-float.html
diff --git a/third_party/WebKit/LayoutTests/fast/sub-pixel/width-of-inline-in-float.html b/third_party/WebKit/LayoutTests/fast/sub-pixel/width-of-inline-in-float.html
new file mode 100644
index 0000000000000000000000000000000000000000..15e23933a4b32f582e193892daded0107e2bb4c6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/sub-pixel/width-of-inline-in-float.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test reported width of inline in float</title>
+ <style>
+ #outer {
+ float: left;
+ font-size: 15px;
+ }
+ p {
+ clear: left;
+ }
+ </style>
+ <script src="../../resources/testharness.js"></script>
+ <script src="../../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <span id="outer"><span id="inner">Customer Supportz</span></span>
+ <p>
+ The reported inner width must be the same as the outer width.
+ </p>
+ <script>
+ test(function() {
+ var outer = document.getElementById('outer');
+ var inner = document.getElementById('inner');
+
+ assert_equals(outer.offsetWidth, inner.offsetWidth,
+ 'Inner offsetWidth must match outer offsetWidth.');
+
+ assert_equals(outer.offsetWidth,
+ Math.round(outer.getBoundingClientRect().width),
+ 'Outer offsetWidth must match rounded width.');
+
+ assert_equals(inner.offsetWidth,
+ Math.round(inner.getBoundingClientRect().width),
+ 'Inner offsetWidth must match rounded width.');
+ });
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698