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

Unified Diff: LayoutTests/fast/block/containing-block-negative-margins.html

Issue 570933002: Margins should expand/shrink an element's width if no float constrains it (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/block/containing-block-negative-margins-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/block/containing-block-negative-margins.html
diff --git a/LayoutTests/fast/block/containing-block-negative-margins.html b/LayoutTests/fast/block/containing-block-negative-margins.html
new file mode 100644
index 0000000000000000000000000000000000000000..f965315d4741f1ea69241978e0de0ef68767a5d4
--- /dev/null
+++ b/LayoutTests/fast/block/containing-block-negative-margins.html
@@ -0,0 +1,52 @@
+<!doctype html>
+<style>
+ body {
+ margin-left: 200px;
+ width: 35em;
+ }
+ div.floater {
+ float: right;
+ width: 20em;
+ margin-right: -23em;
+ margin-bottom: 1em;
+ }
+ table {
+ background-color: green;
+ }
+ #expands {
+ margin-left: -200px;
+ margin-right: -200px;
+ }
+ #shrinks {
+ margin-left: 200px;
+ margin-right: 200px;
+ }
+
+ td {
+ width: 1500px;
+ }
+
+</style>
+<div style="position: absolute">crbug.com/413202: Margins can expand/shrink the width of an element if a float does not constrain it.</div>
+<div class="floater"></div>
+<table id="expands" data-expected-client-width="960">
+ <tr>
+ <td></td>
+ </tr>
+</table>
+<table id="shrinks" data-expected-client-width="160">
+ <tr>
+ <td></td>
+ </tr>
+</table>
+<script src="../../resources/check-layout.js"></script>
+<script>
+ document.body.offsetLeft;
+ checkLayout("#expands");
+ checkLayout("#shrinks");
+</script>
+
+
+
+
+
« no previous file with comments | « no previous file | LayoutTests/fast/block/containing-block-negative-margins-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698