예제 #1
0
 public override void VisitSelectorSequence(CssSimpleSelectorSequence sequence)
 {
     sequence.TypeSelector.Apply(this);
     foreach (var selector in sequence.OtherSelectors)
     {
         selector.Apply(this);
     }
     sequence.PseudoElement?.ToString(_sb);
 }
예제 #2
0
 public virtual void VisitSelectorSequence(CssSimpleSelectorSequence sequence)
 {
     sequence.TypeSelector.Apply(this);
     foreach (var otherSelector in sequence.OtherSelectors)
     {
         otherSelector.Apply(this);
     }
     if (sequence.PseudoElement != null)
     {
         VisitPseudoElement(sequence.PseudoElement);
     }
 }
예제 #3
0
        public override void VisitSelectorSequence(CssSimpleSelectorSequence sequence)
        {
            var count = sequence.OtherSelectors.Length;
            var items = new ICssElementMatcher[1 + count];

            sequence.TypeSelector.Apply(this);
            if (ReferenceEquals(_matcher, Never))
            {
                return;
            }
            items[0] = _matcher;

            for (var i = 0; i < count; i++)
            {
                sequence.OtherSelectors[i].Apply(this);
                if (ReferenceEquals(_matcher, Never))
                {
                    return;
                }
                items[i + 1] = _matcher;
            }

            _matcher = new SequenceMatcher(items);
        }