[LayoutNG] Guard |FirstLineBoxTopLeft()| when layout is dirty

Following r659675 (crrev.com/c/1612219), this patch guards
|FirstLineBoxTopLeft()| from when the layout tree is dirty.

Normally, all calls are limited to only when layout is clean.
However, scroll anchoring reads fragment data from dirty tree
after r660998 (crrev.com/c/1615680).

Ideally, we'd like to guard |FirstInlineFragment()| instead.
This aligns the concept of r659675, but ~10 tests in AX and
scroll anchoring depends on reading dirty trees. This
indicates that there are cases where we want to read dirty
trees. What to do more for reading dirty tree is for future
investigations.

Bug: 964619, 963103, 964854
Change-Id: I7ed4f9aac554f27ab8c2848a6d0b09a1e070215e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1619512
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661318}
3 files changed