[LayoutNG] Fix Google Docs font picker menu.

LayoutNG lacks a mechanism that's present in the legacy engine, that
handles situations where a descendant adds a scrollbar, which affects
the inline-size of an ancestor (fit-content sizing).

This CL only fixes the issue when this happens to an out-of-flow
positioned ancestor, which is enough to fix the Google Docs issue.

Bug: 978979
Change-Id: Ib60bbe244d8ee2cd80f3209b3322a097738841d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1685388
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#674123}
diff --git a/css/css-sizing/auto-scrollbar-inside-stf-abspos-ref.html b/css/css-sizing/auto-scrollbar-inside-stf-abspos-ref.html
new file mode 100644
index 0000000..076893b
--- /dev/null
+++ b/css/css-sizing/auto-scrollbar-inside-stf-abspos-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<style>
+  body { overflow:hidden; }
+</style>
+<p>The word PASS should be visible below.</p>
+<div style="position:absolute; height:5em; overflow-y:scroll;">
+  <div style="height:15em;">PASS</div>
+</div>
diff --git a/css/css-sizing/auto-scrollbar-inside-stf-abspos.html b/css/css-sizing/auto-scrollbar-inside-stf-abspos.html
new file mode 100644
index 0000000..9479b2e
--- /dev/null
+++ b/css/css-sizing/auto-scrollbar-inside-stf-abspos.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/css-sizing-3/#valdef-width-fit-content-length-percentage">
+<link rel="match" href="auto-scrollbar-inside-stf-abspos-ref.html">
+<style>
+  /* Set non-auto overflow on the viewport, so that the UA is more likely to get
+     the size right the first time. Otherwise, a re-layout might hide the bug
+     that we're trying to test. */
+  body { overflow:hidden; }
+</style>
+<p>The word PASS should be visible below.</p>
+<div style="position:absolute;">
+  <div style="height:5em; overflow-y:auto;">
+    <div style="height:15em;">PASS</div>
+  </div>
+</div>