Index: third_party/WebKit/LayoutTests/fast/block/positioning/fixed-in-abs-height-change.html |
diff --git a/third_party/WebKit/LayoutTests/fast/block/positioning/fixed-in-abs-height-change.html b/third_party/WebKit/LayoutTests/fast/block/positioning/fixed-in-abs-height-change.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..34c01fdb1ebdda27899fc5635338601298124ffc |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/block/positioning/fixed-in-abs-height-change.html |
@@ -0,0 +1,39 @@ |
+<!DOCTYPE html> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<style> |
+ |
+.fixed { |
+ left: 100px; |
+ width: 600px; |
+ height: 25%; |
+ position: fixed; |
+} |
+.box { |
+ position: absolute; |
+ bottom: 0; |
+ width: 600px; |
+ height: 100px; |
+ background: lightblue; |
+} |
+ |
+</style> |
+<div style="position: absolute"> |
+ <div class="fixed"> |
+ <div class="box"></div> |
+ </div> |
+</div> |
+<script> |
+ |
+test(() => { |
+ // Force initial layout. |
+ document.body.offsetHeight; |
+ |
+ var fixed = document.querySelector(".fixed"); |
+ var box = document.querySelector(".box"); |
+ fixed.style.height = "75%"; |
+ |
+ assert_equals(box.offsetTop, 350); |
mstensho (USE GERRIT)
2016/10/19 18:24:30
This value depends on the viewport height, which i
skobes
2016/10/19 21:48:40
Good point, done.
|
+}, "Fixed-pos in abs-pos container updates children on height change."); |
+ |
+</script> |