// This is for UXML inline sheet public void SetInlineContext(StyleSheet sheet, StyleRule rule, int ruleIndex) { m_Sheet = sheet; m_Properties = rule.properties; m_PropertyIDs = StyleSheetCache.GetPropertyIDs(sheet, ruleIndex); specificity = StyleValueExtensions.InlineSpecificity; LoadProperties(); }
// This is for UXML inline sheet public void SetInlineContext(StyleSheet sheet, StyleRule rule, int ruleIndex) { m_Sheet = sheet; m_Rule = rule; m_PropertyIDs = StyleSheetCache.GetPropertyIDs(sheet, ruleIndex); m_CurrentPropertyIndex = 0; specificity = StyleValueExtensions.InlineSpecificity; SetCurrentProperty(); }
public void SetContext(StyleSheet sheet, StyleComplexSelector selector, StyleVariableContext varContext) { m_Sheet = sheet; m_Properties = selector.rule.properties; m_PropertyIDs = StyleSheetCache.GetPropertyIDs(sheet, selector.ruleIndex); m_Resolver.variableContext = varContext; specificity = sheet.isUnityStyleSheet ? StyleValueExtensions.UnitySpecificity : selector.specificity; LoadProperties(); }