[LayoutNG] Move paint invalidations to layout

This patch moves paint invalidations from NGPaintFragment
creation to layout code. Style and layout knows what were
really changed, and should be smarter to invalidate.

This patch matches paint invalidations for inline boxes to
legacy in most cases.
1. Text boxes will always be FullPaintInvalidation.
   There maybe cases where legacy can skip it, as it does so
   when InlineTextBox is moved. This is to be investigated in
   future caching code.
2. Inline boxes (LayoutInline) is FullPaintInvalidation if it
   produces box fragments (DisplayItemClient). Otherwise NG
   does no paint invalidation.
   Legacy does |CheckForPaintInvalidation| even when it's
   culled, but this doesn't seem necessary.

This patch avoids paint invalidations on position changes
for the test case in crbug.com/950373.

Bug: 950373
Change-Id: I0b80a527ef4243e5a5eb5dc59a2fd9d52a913c39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1574982
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653059}
15 files changed