[LayoutNG] Make nowrap in NGLineBreaker simpler

This patch changes NGLineBreaker not to call
ShapingLineBreaker when nowrap or pre.

The start and end of nowrap is not needed to reshape, and it
improves nowrap blink_perf tests by 2-3%. loading.desktop
seems to improve by 1-3% (it's a bit noisy.)

In doing so, this patch adds a few DCHECK, which discovered
a few issues. This patch also fixes them.
1. Fixes where lines may wrap after leading spaces in nowrap.
2. Fixes where |Rewind()| fails to update the |current_style_|
   and its derived members such as |auto_wrap_|.

Bug: 636993
Change-Id: I19bdf1af1287aaebaa30ef00fe4b5d98189650ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1501233
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637754}
2 files changed