[css-nesting] Traverse child rules of StyleRule in ReplaceRuleIfExists
Since the selector list of a StyleRule is stored in the bytes trailing
the object, we create a new StyleRule during setSelectorText,
and replace the old rule with the new rule. However, the traversal
ignored the child rules of StyleRule, causing invalidation problems.
Note: Adjusted nested-declarations-matching.html to actually test
CSSNestedDeclarations instead of '&'. There's still a bug related
to that.
Fixed: 361600667
Change-Id: I99dc2422e2d59088b293fb3e8728c05da9f1018c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5828606
Reviewed-by: Steinar H Gunderson sesse@chromium.org
Commit-Queue: Anders Hartvoll Ruud andruud@chromium.org
Cr-Commit-Position: refs/heads/main@{#1349780}