code: function checkPositionAndRule( nodeA, nodeB, def, posBitFlags ) {
  		return ( nodeA.getPosition( nodeB ) | posBitFlags ) == posBitFlags &&
  			( !def.childRule || def.childRule( nodeA ) );
  	}
docs: Checks if position is a subset of posBitFlags and that nodeA fulfills style def rule.