[ReplacedNG] Fix max-content size of flex-item.

Previously if we had an indefinite available inline-size, and an
aspect-ratio only replaced element (svg with viewBox), we'd "give up"
and use "zero".

This isn't what legacy does, instead it uses the "default natural size"
in the appropriate direction.

(Firefox uses the ICB size, but has bad invalidation).

This changes our behaviour to use the "default natural size" for this
case.

Bug: 1217941
Change-Id: Ia78d6c763c69b7c515fefacbf37b8184472fb4dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2950601
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: David Grogan <dgrogan@chromium.org>
Reviewed-by: Daniel Libby <dlibby@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#890939}
diff --git a/css/css-flexbox/svg-no-natural-size-grandchild.html b/css/css-flexbox/svg-no-natural-size-grandchild.html
new file mode 100644
index 0000000..6f99654
--- /dev/null
+++ b/css/css-flexbox/svg-no-natural-size-grandchild.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1217941">
+<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
+<meta name="assert" content="The flex-item shouldn't have a zero max content size.">
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div style="display: flex; align-items: center; width: 100px; height: 100px; background: red;">
+  <div style="line-height: 0;">
+    <svg height="100%" width="100%" viewBox="0 0 1 1">
+      <rect height="100%" width="100%" fill="green"></rect>
+    </svg>
+  </div>
+</div>
+