Merge to 74: Only connected shadow roots can be active tree scopes.

Stylesheet collection will be ensured, active scope added, and active
style will be marked dirty on ShadowRootInsertedIntoDocument(). Skip on
adopted stylesheets changes.

Added DCHECK to make sure we don't mark disconnected tree scopes dirty.

Bug: 942553
Change-Id: I71b991dbeec540e69f85a1fef3961f3b9efaa1e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1532104
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#642746}(cherry picked from commit 9f0af35b7a8f4664f712c7cbd815e78833589eaa)
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1535008
Cr-Commit-Position: refs/branch-heads/3729@{#363}
Cr-Branched-From: d4a8972e30b604f090aeda5dfff68386ae656267-refs/heads/master@{#638880}
2 files changed