/// <summary> /// Always called after parsing is done (full or incremental) /// </summary> public override void UpdateCachedChildren() { _declarations.Clear(); _directives.Clear(); int childCount = Children.Count; for (int i = 0; i < childCount; i++) { ParseItem child = Children[i]; if (child is Declaration) { if (_declarations == _emptyDeclarations) { _declarations = new SortedRangeList <Declaration>(); } _declarations.Add((Declaration)child); } else if (child is AtDirective) { if (_directives == _emptyDirectives) { _directives = new SortedRangeList <AtDirective>(); } _directives.Add((AtDirective)child); } } base.UpdateCachedChildren(); // tell the stylesheet to update in case we have new CustomProperties StyleSheet?.UpdateCachedChildren(); }
public void SortedRangeListChangeStampTest() { SortedRangeList <TestRange> list = new SortedRangeList <TestRange>(); int stamp = list.ChangeStamp; list.ForceUpdateChangeStamp(); Assert.AreNotEqual(stamp, list.ChangeStamp); stamp = list.ChangeStamp; list.Clear(); Assert.AreEqual(stamp, list.ChangeStamp); list.Add(new TestRange(5, 1)); list.Add(new TestRange(6, 1)); Assert.AreNotEqual(stamp, list.ChangeStamp); stamp = list.ChangeStamp; list.IndexOf(list[0]); Assert.AreEqual(stamp, list.ChangeStamp); list.Remove(list[0]); Assert.AreNotEqual(stamp, list.ChangeStamp); stamp = list.ChangeStamp; list.Clear(); Assert.AreNotEqual(stamp, list.ChangeStamp); }
public SelectorErrorTag(SortedRangeList <Selector> range, string text) { _range = range; Flags = WESettings.Instance.Css.ValidationLocation.ToCssErrorFlags(); Text = text; }
public ImportDirective() { MediaQueries = new SortedRangeList <MediaQuery>(); FileNames = new SortedRangeList <ParseItem>(); }
public KeyFramesRuleSet() { Selectors = new SortedRangeList <KeyFramesSelector>(); }
public Selector() { Context = CssClassifierContextCache.FromTypeEnum(CssClassifierContextType.Selector); SimpleSelectors = new SortedRangeList <SimpleSelector>(); }
public SelectorErrorTag(SortedRangeList<Selector> range) { _range = range; Flags = WESettings.Instance.Css.ValidationLocation.ToCssErrorFlags(); }
internal UnknownDirectiveBlock() { RuleSets = new SortedRangeList <RuleSet>(); }
public SelectorErrorTag(SortedRangeList <Selector> range, string errorMessage) { _range = range; _errorMessage = errorMessage; Flags = GetLocation(); }
public KeyFramesBlock() { KeyFrames = new SortedRangeList <KeyFramesRuleSet>(); }
public MediaQuery() { Expressions = new SortedRangeList <MediaExpression>(); Context = CssClassifierContextCache.FromTypeEnum(CssClassifierContextType.MediaQuery); }
public StyleSheet() { RuleSets = new SortedRangeList <RuleSet>(); CustomProperties = new SortedRangeList <Declaration>(); }
public RuleBlock() { _declarations = _emptyDeclarations; _directives = _emptyDirectives; }
public SelectorErrorTag(SortedRangeList<Selector> range, string errorMessage) { _range = range; _errorMessage = errorMessage; Flags = GetLocation(); }
public RuleSet() { Selectors = new SortedRangeList <Selector>(); }
internal PageDirectiveBlock() { Margins = new SortedRangeList <MarginDirective>(); }
public MediaDirective() { MediaQueries = new SortedRangeList <MediaQuery>(); }