[LayoutNG] Only apply block-end margins where the block actually ends.

If we reached the end of a block in an earlier fragmentainer, but
there's overflowing content, we'll revisit this block in subsequent
fragmentainers as long as child content needs it. Repeating the
block-end margins in these fragmentainers would be wrong, though.

Use AdjustForFragmentation() only for margins, and rename it to
AdjustMarginsForFragmentation().
The fieldset layout algorithm was using this one for borders/padding,
while block and multicol layout called
AdjustBorderScrollbarPaddingForFragmentation() in container_builder_.
Become more uniform by calling that method for all in
SetupFragmentBuilderForFragmentation() (via the base layout algorithm
constructor). Since this depends on the initial fragment geometry being
set, also do that in the base layout algorithm constructor.

Bug: 829028
Change-Id: I6808d023e4e79ab489bdb3a48e3c6c47cf9db6c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2287313
Reviewed-by: Alison Maher <almaher@microsoft.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786791}
diff --git a/css/css-break/margin-after-overflowed-block.html b/css/css-break/margin-after-overflowed-block.html
new file mode 100644
index 0000000..26a2eb2
--- /dev/null
+++ b/css/css-break/margin-after-overflowed-block.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/css-break-3/#parallel-flows">
+<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div style="columns:2; column-fill:auto; column-gap:0; width:100px; height:100px; background:red;">
+  <div style="margin-bottom:20px; height:50px;">
+    <div style="height:70px; background:green;"></div>
+    <div style="height:90px;"></div>
+    <div style="height:40px; background:green;"></div>
+  </div>
+  <div style="height:50px; background:green;"></div>
+  <div style="height:40px; background:green;"></div>
+</div>