/** * Check if the given Element matches this selector's dynamic properties. Note: the parser should * give all class */ public boolean matchesDynamic(Object e, AttributeResolver attRes, TreeResolver treeRes) { if (siblingSelector != null) { Object sib = siblingSelector.getAppropriateSibling(e, treeRes); if (sib == null) { return false; } if (!siblingSelector.matchesDynamic(sib, attRes, treeRes)) { return false; } } if (isPseudoClass(VISITED_PSEUDOCLASS)) { if (attRes == null || !attRes.isVisited(e)) { return false; } } if (isPseudoClass(ACTIVE_PSEUDOCLASS)) { if (attRes == null || !attRes.isActive(e)) { return false; } } if (isPseudoClass(HOVER_PSEUDOCLASS)) { if (attRes == null || !attRes.isHover(e)) { return false; } } if (isPseudoClass(FOCUS_PSEUDOCLASS)) { if (attRes == null || !attRes.isFocus(e)) { return false; } } return true; }