[LayoutNG] Fix scrollWidth/scrollLeft when children are not inline

r590138 (CL:1215365) fixed scrollWidth when box is narrower
than the scrollbar width, but the apporach had two problems:

1. It does not fix if children are not inline, because
   LayoutNGMixin::AddOverflowFromChildren() computes overflow
   from fragments only when children are inline, but
   delegates to LayoutObject if otherwise.
2. scrollWidth was fixed, but scrollLeft is still incorrect
   in some cases. This causes LayoutObject to compute
   incorrect scrollWidth.

Instead of adjusting overflow, this patch adjusts inline
offset of fragments by clamping the scrollbar inline size to
the content box.

This method computes scrollWidth/scrollLeft same as legacy
regardless of children.

Bug: 635619
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I401b245400b7a3fb2717bdcb5cdaa8edd34d928e
Reviewed-on: https://chromium-review.googlesource.com/1217920
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590622}
5 files changed