[@scope] Calculate full nesting context in ParseRuleForInsert
We ignored @scope entirely in ParseRuleForInsert, causing rules inserted
into @scope rules to parse incorrectly.
'CalculateNestingContext' is a separate function, because the same
functionality will be needed in other places (setSelectorText).
Fixed: 363019835
Change-Id: I49f2026fa8548ce4707f750f474b59350ab68fbe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5997373
Commit-Queue: Anders Hartvoll Ruud andruud@chromium.org
Reviewed-by: Steinar H Gunderson sesse@chromium.org
Cr-Commit-Position: refs/heads/main@{#1379655}