He broke service for a 2-1 lead in the third set Friday only to hand it back in the next game, but a roar went up when Mannarino wasted a chance to put away a game point and Shapovalov jumped on the chance to break for a 5-4 lead.
Federer has won all seven career matches and taken all 16 sets against the 29-year-old Bautista Agut.
Federer broke serve for a 5-4 lead in the first set and broke again for 2-1 in the second en route to the victory in a little more than an hour.
“My game plan worked better against Bautista Agut than against Ferrer,” he said.
The 30-year-old Haase, back to 52nd in the world after battling injuries for much of his career, improved to 5-0 against 36th-ranked Schwartzman.