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

Unified Diff: third_party/WebKit/LayoutTests/fast/block/positioning/relative-with-implicit-height-containing-block-2.html

Issue 2288563002: Treat implicit height on positioned objects as non-auto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bug 61049 Created 4 years, 4 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/block/positioning/relative-with-implicit-height-containing-block-2.html
diff --git a/third_party/WebKit/LayoutTests/fast/block/positioning/relative-with-implicit-height-containing-block-2.html b/third_party/WebKit/LayoutTests/fast/block/positioning/relative-with-implicit-height-containing-block-2.html
new file mode 100644
index 0000000000000000000000000000000000000000..a83bf8407abeb03b8c3545ebc230e4c3c08cab13
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/block/positioning/relative-with-implicit-height-containing-block-2.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<style>
+#wrapper {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ bottom: 0px;
+ right: 0px;
+}
+#child {
+ position: relative;
+ width: 100px;
+ height: 100px;
+ top: 50%;
+ background-color: green;
+}
+#ref {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ top: 300px;
+ left: 0px;
+ background-color: red;
+}
+</style>
+<p>crbug.com/61049: There should be no red box below.</p>
+<div id="log"></div>
+<div id="ref"></div>
+<div id="wrapper">
+ <div id="child"></div>
+</div>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script>
+ test(() => {
+ assert_equals(document.getElementById("child").getClientRects()[0].top, window.innerHeight / 2, "Child should be at 300px.");
+ }, "Check that #child is in the correct position.");
+</script>

Powered by Google App Engine
This is Rietveld 408576698