[@scope] Add parent @scope rules as implicit scope triggers
We keep a list of "implicit scope triggers" on Element, which represents
which implicit StyleScope objects will be activated inside that element.
This triggers are added from StyleScopes seen on the RuleSet, but we
currently only consider StyleScopes that directly hold on to at least
one style rule. This means any implicit parent @scope rules without
any style rules of their own won't be considered.
Fixed by traversing the StyleScope chain during
ForEachImplicitScopeTrigger.
Fixed: 364913801
Change-Id: I451767efbf939747d21d12275c8ef91fadc9f54b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6031030
Commit-Queue: Anders Hartvoll Ruud andruud@chromium.org
Reviewed-by: Rune Lillesveen futhark@chromium.org
Cr-Commit-Position: refs/heads/main@{#1384321}