css-shadow-parts: fix ::part() when element also has @exportparts #35258
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CL:3610986 rearranges the loop in StyleResolver::MatchPseudoPartRules
to include the ::part() matching element’s own tree scope, so we can
consider :host::part() rules, but it erroneously maps part names
through @exportparts before moving to the scope directly above. As a
result, we start searching for ::part() rules with our forwarded part
names when we should be searching for rules with our own part names.
This patch defers mapping part names through @exportparts until after
the scope directly above the ::part() matching element.
Fixed: 1347634
Change-Id: Ibe369d0f9324fa9f45112d35d921511513b2b59e
Reviewed-on: https://chromium-review.googlesource.com/3791264
WPT-Export-Revision: 2555d69b7e352e06d955a6fab334f94861ccd7e0