[LayoutNG] Avoid Vector::push_back in AssociateItemsWithInlines

Profiling shows Vector::push_back from AssociateItemsWithInlines
consumes noticeable time, half of PrepareLayout at
cs.chromium.org.

This patch changes LayoutNGText to keep the range of
NGInlineItem instead of pointers to all items.

Both this patch and before this patch assumed items from a
LayoutObject is consecutive in NGInlineItem vector. A
preserved newline in bidi blocks breaks the assumption. This
patch fixes it along with DCHECK to ensure that.

Bug: 931206
Change-Id: I55e16c36fd62087c2acb35129401af288cf30dec
Reviewed-on: https://chromium-review.googlesource.com/c/1466545
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631319}
7 files changed