[layoutng] Use cached size for ComputeInlineSizeForFragment

When we are sized to shrink-to-fit, we can use the cached preferred
logical width when we have one; this patch implements that.

It also changes ComputeInlineSizeForFragment to take a Node, which
simplifies several callers.

While writing this CL, I discovered a missing check for
IsParallelWritingMode in ComputeMinAndMaxContentContribution; that
change is conceptually unrelated to this CL but without it 20 tests
fail.

Bug: 591099
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Id793856d86b12bd46fd7e1bab42541520c7ea031
Reviewed-on: https://chromium-review.googlesource.com/1128195
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574793}
11 files changed