Beispiel #1
0
        private bool SetInlineCursor(StyleCursor inlineValue, StyleCursor sharedValue)
        {
            var styleCursor = new StyleCursor();

            if (TryGetInlineCursor(ref styleCursor))
            {
                if (styleCursor.value == inlineValue.value && styleCursor.keyword == inlineValue.keyword)
                {
                    return(false);
                }
            }
            else if (inlineValue.keyword == StyleKeyword.Null)
            {
                return(false);
            }

            styleCursor.value   = inlineValue.value;
            styleCursor.keyword = inlineValue.keyword;

            SetInlineCursor(styleCursor);

            if (styleCursor.keyword == StyleKeyword.Null)
            {
                styleCursor.keyword = sharedValue.keyword;
                styleCursor.value   = sharedValue.value;
            }

            ve.computedStyle.ApplyStyleCursor(styleCursor);
            return(true);
        }
        private bool SetInlineCursor(StyleCursor inlineValue, StyleCursor sharedValue)
        {
            var styleCursor = new StyleCursor();

            if (TryGetInlineCursor(ref styleCursor))
            {
                if (styleCursor.value == inlineValue.value && styleCursor.keyword == inlineValue.keyword)
                {
                    return(false);
                }
            }

            styleCursor.value   = inlineValue.value;
            styleCursor.keyword = inlineValue.keyword;

            SetInlineCursor(styleCursor);

            int specificity = StyleValueExtensions.InlineSpecificity;

            if (styleCursor.keyword == StyleKeyword.Null)
            {
                specificity         = sharedValue.specificity;
                styleCursor.keyword = sharedValue.keyword;
                styleCursor.value   = sharedValue.value;
            }

            ve.specifiedStyle.ApplyStyleCursor(styleCursor, specificity);
            return(true);
        }
 public bool TryGetInlineCursor(ref StyleCursor value)
 {
     if (m_HasInlineCursor)
     {
         value = m_InlineCursor;
         return(true);
     }
     return(false);
 }
        public override bool Equals(object obj)
        {
            bool flag = !(obj is StyleCursor);
            bool result;

            if (flag)
            {
                result = false;
            }
            else
            {
                StyleCursor lhs = (StyleCursor)obj;
                result = (lhs == this);
            }
            return(result);
        }
 public void SetInlineCursor(StyleCursor value)
 {
     m_InlineCursor    = value;
     m_HasInlineCursor = true;
 }
Beispiel #6
0
 public bool Equals(StyleCursor other)
 {
     return(other == this);
 }
 public StyleCursor(StyleKeyword keyword)
 {
     this = new StyleCursor(default(Cursor), keyword);
 }
 public StyleCursor(Cursor v)
 {
     this = new StyleCursor(v, StyleKeyword.Undefined);
 }
Beispiel #9
0
 public void ApplyStyleCursor(StyleCursor sc)
 {
     nonInheritedData.cursor = sc;
 }