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

Unified Diff: third_party/WebKit/LayoutTests/fast/block/float/block-with-negative-margin-clears-float.html

Issue 1766223002: Clear floats even when they are not tracked by a previous sibling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | third_party/WebKit/LayoutTests/fast/block/float/block-with-negative-margin-clears-float-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/block/float/block-with-negative-margin-clears-float.html
diff --git a/third_party/WebKit/LayoutTests/fast/block/float/block-with-negative-margin-clears-float.html b/third_party/WebKit/LayoutTests/fast/block/float/block-with-negative-margin-clears-float.html
new file mode 100644
index 0000000000000000000000000000000000000000..680874df5e6e91a9f0e346dcd324721ef98e70ea
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/block/float/block-with-negative-margin-clears-float.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<style>
+ #container {
+ width: 100px;
+ }
+
+ .float {
+ float: right;
+ height: 50px;
+ width: 100%;
+ background: green;
+ }
+
+ #clear {
+ clear: both;
+ height: 1px;
+ }
+
+ #next {
+ margin-top: -50px;
+ line-height: 0;
+ }
+
+ span {
+ display: inline-block;
+ width: 100%;
+ height: 50px;
+ background: green;
+ }
+</style>
+<p>crbug.com/591243: Clear floats when we have negative margin and are separated from the float by a div that doesn't track it.</p>
+<div id="container" data-expected-height=100>
+ <div class="float"></div>
+ <div id="clear"></div>
+ <div id="next">
+ <span></span>
+ </div>
+</div>
+<script src="../../../resources/check-layout.js"></script>
+<script>
+ checkLayout("#container");
+</script>
+
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/block/float/block-with-negative-margin-clears-float-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698