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-by: Anders Hartvoll Ruud <>
Commit-Queue: Rune Lillesveen <>
Cr-Commit-Position: refs/heads/master@{#682688}
8 files changed