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

Unified Diff: third_party/WebKit/LayoutTests/fast/block/shrink-to-fit-with-height-stretched-abspos-and-auto-scrollbar-sibling.html

Issue 2553833002: Refactor layoutBlock() and layoutBlockFlow(). Happens to fix bugs. (Closed)
Patch Set: Created 4 years 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 | third_party/WebKit/LayoutTests/fragmentation/auto-scrollbar-shrink-to-fit.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/block/shrink-to-fit-with-height-stretched-abspos-and-auto-scrollbar-sibling.html
diff --git a/third_party/WebKit/LayoutTests/fast/block/shrink-to-fit-with-height-stretched-abspos-and-auto-scrollbar-sibling.html b/third_party/WebKit/LayoutTests/fast/block/shrink-to-fit-with-height-stretched-abspos-and-auto-scrollbar-sibling.html
new file mode 100644
index 0000000000000000000000000000000000000000..b87a6c71f88232988ebbb63fa0fd4638a5b0244f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/block/shrink-to-fit-with-height-stretched-abspos-and-auto-scrollbar-sibling.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<p>There should be a green square below. No red.</p>
+<div style="float:left; position:relative; background:red;">
+ <div id="abspos" style="position:absolute; top:0; right:0; bottom:0; left:0; background:green;"></div>
+ <div style="width:150px; max-height:150px; overflow:auto;">
+ <div id="child" style="width:100px; height:100px;"></div>
+ </div>
+</div>
+<div style="clear:both;"></div>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+ test(() => {
+ var abspos = document.getElementById("abspos");
+ var child = document.getElementById("child");
+ assert_equals(abspos.offsetWidth, 150);
+ assert_equals(abspos.offsetHeight, 100);
+ document.body.offsetLeft;
+ child.style.height = "400px";
+ assert_equals(abspos.offsetWidth, 150);
+ assert_equals(abspos.offsetHeight, 150);
+ }, "Add content to an overflow:auto container, so that scrollbars appear");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fragmentation/auto-scrollbar-shrink-to-fit.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698