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

Unified Diff: third_party/WebKit/LayoutTests/fast/block/over-constrained-auto-margin.html

Issue 2841823006: Resolve inline margins in over-constrained situations correctly. (Closed)
Patch Set: In regular block layout, the width of a child's margin box should always be equal to that of its co… Created 3 years, 8 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/over-constrained-auto-margin.html
diff --git a/third_party/WebKit/LayoutTests/fast/block/over-constrained-auto-margin.html b/third_party/WebKit/LayoutTests/fast/block/over-constrained-auto-margin.html
new file mode 100644
index 0000000000000000000000000000000000000000..adc29a0246093ce349fcf83850ac6a90936b4e5f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/block/over-constrained-auto-margin.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<div style="width: 400px; border: 3px solid black;">
+ <div id="target1" style="
+ margin-left: 10px; width: 500px; border: 3px solid gray;
+ margin-right: auto;">
+ </div>
+</div>
+<div style="width: 400px; border: 3px solid black; direction: rtl;">
+ <div id="target2" style="
+ margin-right: 10px; width: 500px; border: 3px solid gray;
+ margin-left: auto; ">
+ </div>
+</div>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+ test(() => {
+ assert_equals(getComputedStyle(target1).marginRight, "-116px");
+ assert_equals(getComputedStyle(target2).marginLeft, "-116px");
+ }, "Right-aligned float in zero-width block");
+</script>

Powered by Google App Engine
This is Rietveld 408576698