コード例 #1
0
        public void StartSelectorName()
        {
            if (this.cssToken.selectorTail == this.cssToken.selectorList.Length)
            {
                InternalDebug.Assert(this.cssToken.selectorList.Length < this.maxSelectors);

                int newSize;

                if (this.maxSelectors / 2 > this.cssToken.selectorList.Length)
                {
                    newSize = this.cssToken.selectorList.Length * 2;
                }
                else
                {
                    newSize = this.maxSelectors;
                }

                CssToken.SelectorEntry[] newSelectors = new CssToken.SelectorEntry[newSize];

                Array.Copy(this.cssToken.selectorList, 0, newSelectors, 0, this.cssToken.selectorTail);

                this.cssToken.selectorList = newSelectors;
            }

            InternalDebug.Assert(this.state == BuildStateBeforeSelector ||
                                 this.state == BuildStateEndSelectorName ||
                                 this.state == BuildStateEndSelectorClass);

            this.cssToken.selectorList[this.cssToken.selectorTail].nameId = HtmlNameIndex.Unknown;
            this.cssToken.selectorList[this.cssToken.selectorTail].name.Initialize(this.cssToken.whole.tail, this.tailOffset);
            this.cssToken.selectorList[this.cssToken.selectorTail].className.Reset();

            this.state = BuildStateSelectorName;
        }
コード例 #2
0
        public void StartSelectorName()
        {
            if (cssToken.selectorTail == cssToken.selectorList.Length)
            {
                InternalDebug.Assert(cssToken.selectorList.Length < maxSelectors);

                int newSize;

                if (maxSelectors / 2 > cssToken.selectorList.Length)
                {
                    newSize = cssToken.selectorList.Length * 2;
                }
                else
                {
                    newSize = maxSelectors;
                }

                var newSelectors = new CssToken.SelectorEntry[newSize];

                Array.Copy(cssToken.selectorList, 0, newSelectors, 0, cssToken.selectorTail);

                cssToken.selectorList = newSelectors;
            }

            InternalDebug.Assert(state == BuildStateBeforeSelector ||
                                 state == BuildStateEndSelectorName ||
                                 state == BuildStateEndSelectorClass);

            cssToken.selectorList[cssToken.selectorTail].nameId = HtmlNameIndex.Unknown;
            cssToken.selectorList[cssToken.selectorTail].name.Initialize(cssToken.whole.tail, tailOffset);
            cssToken.selectorList[cssToken.selectorTail].className.Reset();

            state = BuildStateSelectorName;
        }
コード例 #3
0
 // Token: 0x0600129F RID: 4767 RVA: 0x0008442C File Offset: 0x0008262C
 public void StartSelectorName()
 {
     if (this.cssToken.SelectorTail == this.cssToken.SelectorList.Length)
     {
         int num;
         if (this.maxSelectors / 2 > this.cssToken.SelectorList.Length)
         {
             num = this.cssToken.SelectorList.Length * 2;
         }
         else
         {
             num = this.maxSelectors;
         }
         CssToken.SelectorEntry[] array = new CssToken.SelectorEntry[num];
         Array.Copy(this.cssToken.SelectorList, 0, array, 0, this.cssToken.SelectorTail);
         this.cssToken.SelectorList = array;
     }
     this.cssToken.SelectorList[this.cssToken.SelectorTail].NameId = HtmlNameIndex.Unknown;
     this.cssToken.SelectorList[this.cssToken.SelectorTail].Name.Initialize(this.cssToken.Whole.Tail, this.tailOffset);
     this.cssToken.SelectorList[this.cssToken.SelectorTail].ClassName.Reset();
     this.state = 24;
 }