Commit 2d8a6616 authored by atotic's avatar atotic Committed by Commit bot

Fix incorrect margin computation

This bug caused LayoutTest to fail:
virtual/layout_ng/css2.1/20110323/absolute-replaced-width-055.htm

BUG=635619

[ng_bug_margin_top]

Review-Url: https://codereview.chromium.org/2628583003
Cr-Commit-Position: refs/heads/master@{#442726}
parent 18485e32
......@@ -112,9 +112,9 @@ void ComputeAbsoluteHorizontal(
}
}
} else if (!margin_left) {
margin_left = margin_space;
margin_left = margin_space - *margin_right;
} else if (!margin_right) {
margin_right = margin_space;
margin_right = margin_space - *margin_left;
} else {
// Are values overconstrained?
if (*margin_left + *margin_right != margin_space) {
......@@ -256,9 +256,9 @@ void ComputeAbsoluteVertical(
margin_bottom = margin_space;
}
} else if (!margin_top) {
margin_top = margin_space;
margin_top = margin_space - *margin_bottom;
} else if (!margin_bottom) {
margin_bottom = margin_space;
margin_bottom = margin_space - *margin_top;
} else {
// Are values overconstrained?
if (*margin_top + *margin_bottom != margin_space) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment