impl #650, CSS declaration observer #671
Merged
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.
CSS declaration observer
The Issue
There are browser APIs that can modify the value of CSS declaration by setting property and removing property. So we need to observe these changes and replay them.
The implementation
The CSS declaration observer was implemented in the general pattern and follow the latest design of @Juice10, e.g, using array index to handle nesting and store changes in virtual style when using a fragment.
Decisions
Two small designs do not fit well but can be improved in the following patches, without blocking this feature.
getNestedRule
not returnCSSGroupingRule
, but in this scenario, it can returnCSSStyleRule
.XXXRule
, so it's a little confusing to naming an operation to CSS rule.