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

Unified Diff: LayoutTests/fast/css/absolute-position-with-negative-width.html

Issue 578723003: Don't allow negative width for positioned elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix nit Created 6 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/fast/css/absolute-position-with-negative-width-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/absolute-position-with-negative-width.html
diff --git a/LayoutTests/fast/css/absolute-position-with-negative-width.html b/LayoutTests/fast/css/absolute-position-with-negative-width.html
new file mode 100644
index 0000000000000000000000000000000000000000..830de0b4493e71d6ec57d2bb8618bf47937b1773
--- /dev/null
+++ b/LayoutTests/fast/css/absolute-position-with-negative-width.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+<script src="../../resources/js-test.js"></script>
+
+<div style="position: relative; width: 0px">
+ <div style="position: absolute; left: 1px; right: 1px;" id="absolute_with_left_right"></div>
+</div>
+
+<script>
+absolute_with_left_right = document.getElementById("absolute_with_left_right");
+shouldBe("absolute_with_left_right.getBoundingClientRect().width","0");
+shouldBe("absolute_with_left_right.getClientRects()[0].width","0");
+shouldBe("absolute_with_left_right.offsetWidth","0");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/absolute-position-with-negative-width-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698