public sealed class StyleResolverTurns an element and a rule set into one ComputedStyle.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Four steps, in this order and no other. Collect the candidate rules from the bucketed index and keep the ones that match. Cascade them: for each property, the declaration with the highest CascadePrecedence wins. Inherit: fill anything the cascade did not settle, from the parent for a property that inherits. Substitute var(), which happens last because a custom property can itself be inherited and could not be resolved before inheritance had run.
Then intern, so that two elements that resolved to the same thing hold the same object — and, when the sharing cache can be trusted, skip all four steps for the second one.
Fields and properties (3)
public int SharingHitsHow many elements got a style from the sharing cache rather than the cascade.
public int CascadesHow many elements had to be cascaded.
public InheritedProperties InheritedWhich properties a child gets from its parent unasked.
Methods (4)
public StyleResolver(StyleRuleSet rules, InlineStyleStore inlineStyles, SelectorMatcher matcher, ComputedStyleCache interning)Creates a resolver.
public void BeginPass()Starts a restyle pass, forgetting what the last one shared.
public ComputedStyle Resolve(StyleTree tree, StyleNodeId element, ComputedStyle? parent = null, InlineStyleId? inline = null)Resolves an element's style, using the sharing cache where it is sound.
public ComputedStyle Cascade(StyleTree tree, StyleNodeId element, ComputedStyle? parent = null, InlineStyleId? inline = null)Resolves an element's style without consulting the sharing cache.
Used by (17)
- AnimationTestsVixen.Ui.Styling.Tests
- BridgeFixtureVixen.Ui.Tests
- CascadeFixtureVixen.Ui.Styling.Tests
- CascadeOrderTestsVixen.Ui.Styling.Tests
- CompactionTestsVixen.Ui.Styling.Tests
- ComputedStyleTestsVixen.Ui.Styling.Tests
- IncrementalRestyleOracleTestsVixen.Ui.Styling.Tests
- MultipleAnimationTestsVixen.Ui.Styling.Tests
- ShorthandExpansionTestsVixen.Ui.Styling.Tests
- StyleEngineVixen.Ui.Styling
- StyleSharingOracleTestsVixen.Ui.Styling.Tests
- StyleSheetLoadingTestsVixen.Ui.Styling.Tests
- StyleUpdaterVixen.Ui.Styling
- ThemeAndScannerTestsVixen.Ui.Styling.Utilities.Tests
- TransitionTestsVixen.Ui.Styling.Tests
- UtilityFixtureVixen.Ui.Styling.Utilities.Tests
- UtilityGenerationTestsVixen.Ui.Styling.Utilities.Tests