applyStyle method
Implementation
void applyStyle(CSSStyleDeclaration style) {
final applyHandle = PerformanceTracker.instance.beginSpan(
'styleRecalc', 'applyStyle', metadata: {'tagName': tagName});
final SelectorAncestorTokenSet? ancestorTokens =
DebugFlags.enableCssAncestryFastPath
? _elementRuleCollector.buildAncestorTokens(this)
: null;
final query_selector.SelectorEvaluator selectorEvaluator =
query_selector.SelectorEvaluator();
// Apply default style.
applyDefaultStyle(style);
// Init display from style directly cause renderStyle is not flushed yet.
renderStyle.initDisplay(style);
applyAttributeStyle(style);
_applySheetStyle(style,
ancestorTokens: ancestorTokens, evaluator: selectorEvaluator);
applyInlineStyle(style);
_applyPseudoStyle(style,
ancestorTokens: ancestorTokens, evaluator: selectorEvaluator);
applyHandle?.end();
}