The seven-time champion achieved his double landmark by seeing off Steve Johnson of the United States 6-2, 6-3, 7-5 in the fourth round on Centre Court.
Federer, the third seed, next takes on Croatia's Marin Cilic for a place in the semifinals.
Cilic, the ninth seeded Croatian, progressed to his third Wimbledon quarterfinal when Japanese fifth seed Kei Nishikori pulled out of their last-16 clash with a rib injury in the second set.
Federer has a 6-1 record over Cilic but the big Croatian stunned the 17-time major champion in the US Open semifinals in 2014 on his way to his maiden Grand Slam title.
“He brushed me off the court in the US Open a few years ago and I hope to get him back,” said Federer who had former coach Stefan Edberg watching on from the player's box on Centre Court.
Johnson, the champion on grass at Nottingham this summer and playing in his first fourth round at a Slam, was comprehensively out-played in the first two sets.
He rallied to break the 34-year-old Federer in the fourth and sixth games of the third set but the former American college champion was reeled in on both occasions.
“Best of five matches are always tough,” added Federer, whose 14th appearance in a Wimbledon quarterfinal matches the mark of Jimmy Connors.
“I'm happy with how I played. It wasn't as easy as maybe it looked. Steve has picked up a lot of confidence in the last few weeks and he has a nice game for grass but I think I mixed it up well.”
Federer has reached the last eight without dropping a set, easing to four successive wins on Centre Court.
“I would never have thought I would win the first four rounds in straight sets. I now need to play my best tennis.”
Federer is the only Swiss left in the draw after Stan Wawrinka fell on Friday to Argentine Juan Martin Del Potro.
Wawrinka, a quarterfinalist in 2014 and 2015, fired 47 winners past Del Potro but was undone by 48 unforced errors.
It was an emotional win for Del Potro, who was number four in the world and a US Open champion in 2009 before four wrist surgeries — including three in the last two years — pushed him to the brink of quitting.
The world number 165, playing in his first Grand Slam tournament since the 2014 Australian Open, clinched a 3-6, 6-3, 7-6 (7/2), 6-3 victory over Wawrinka under the Centre Court roof.
Del Potro was a semifinalist on his last appearance at Wimbledon in 2013 where he lost a memorable five-setter against Novak Djokovic.
He goes on to face French 32nd seed Lucas Pouille for a spot in the last-16.
“I feel alive again. After sitting at home for two years, this feels like a second or third career,” added Del Potro.
Despite his defeat, the Swiss star said it was good for the sport to have the Argentine back in business.
“We are happy that he's back. He's a great guy off the court. He's amazing player on the court. He's big champion,” said Wawrinka.