Only mark Elements with ChildNeedsReattachLayoutTree.

The ancestor chain is the flat tree ancestors chain. There is no need to
include the shadow roots. The layout tree rebuild root is never the
Document, always an element or text node.

This is done in preparation for flat tree style recalc.

Bug: 972752

Change-Id: I011ad734c02dfa8e09ebf068dd6424d77a4a6e22
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1727290
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682688}
8 files changed