private bool MatchesNodeOrParentNode(ISelector selector, INode node) { bool result = selector.IsMatch(node); if (!result && node.Parent != null) { result = MatchesNodeOrParentNode(selector, node.Parent); } return(result); }
public void TestSelectorWithMultiplePseudoClasses() { string selectorStr = ".class:active:hover"; ISelector selector = Selector.Parse(selectorStr); UserNode node = new UserNode(string.Empty, new[] { "class" }); node.AddState(NodeStates.Active); node.AddState(NodeStates.Hover); Assert.IsTrue(selector.IsMatch(node)); }