示例#1
0
    protected override bool IsEligible( ISelector leftSelector, IHtmlElement element )
    {
      var restrict = leftSelector as ContainerRestrict;
      if ( restrict != null )
        return restrict.RestrictContainer.Nodes().Contains( element );

      return leftSelector.IsEligibleBuffered( element.Parent() );
    }
示例#2
0
        protected override bool IsEligible(ISelector leftSelector, IHtmlElement element)
        {
            var restrict = leftSelector as ContainerRestrict;

            if (restrict != null)
            {
                return(restrict.RestrictContainer.Nodes().Contains(element));
            }

            return(leftSelector.IsEligibleBuffered(element.Parent()));
        }
示例#3
0
        protected override bool IsEligible(ISelector leftSelector, IHtmlElement element)
        {
            var restrict = leftSelector as ContainerRestrict;

            if (restrict != null)
            {
                return(element.IsDescendantOf(restrict.RestrictContainer));
            }


            var parant = element.Parent();

            //如果父级元素符合左选择器,或者父级元素符合本选择器。
            return(leftSelector.IsEligibleBuffered(parant) || this.IsEligibleBuffered(parant));
        }
示例#4
0
        protected override bool IsEligible(ISelector leftSelector, IHtmlElement element)
        {
            var previous = element.PreviousElement();

            return(leftSelector.IsEligibleBuffered(previous) || this.IsEligibleBuffered(previous));
        }
示例#5
0
 protected override bool IsEligible(ISelector leftSelector, IHtmlElement element)
 {
     return(leftSelector.IsEligibleBuffered(element.PreviousElement()));
 }
        protected override bool IsEligible( ISelector leftSelector, IHtmlElement element )
        {
            var previous = element.PreviousElement();

              return leftSelector.IsEligibleBuffered( previous ) || this.IsEligibleBuffered( previous );
        }
 protected override bool IsEligible( ISelector leftSelector, IHtmlElement element )
 {
     return leftSelector.IsEligibleBuffered( element.PreviousElement() );
 }
        protected override bool IsEligible( ISelector leftSelector, IHtmlElement element )
        {
            var restrict = leftSelector as ContainerRestrict;
              if ( restrict != null )
            return element.IsDescendantOf( restrict.RestrictContainer );

              var parant = element.Parent();

              //如果父级元素符合左选择器,或者父级元素符合本选择器。
              return leftSelector.IsEligibleBuffered( parant ) || this.IsEligibleBuffered( parant );
        }