[LayoutNG] Skip BiDi reordering when not needed

When fragment-based BiDi reordering was implemented in
r524977 (CL:827043), we chose to run the reordering to ensure
more test coverage of the code.

As the code is now stabilized, change to run BiDi reordering
only when needed.

|ComputeInlinePositions()| can be optimized further by
computing positions as NGInlineLayoutAlgorithm adds children,
but it diverges RTL code further. We may consider it in
future if needed.

Bug: 636993
Change-Id: Ie7e2a365e50618678b4e08b176bf27e99a37cecf
Reviewed-on: https://chromium-review.googlesource.com/c/1306948
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604030}
2 files changed