예제 #1
0
        // 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();
        }
예제 #3
0
        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();
        }