Federer defuses Dimitrov to seal 300th slam win