Federer extended his quarterfinal streak at major tournaments to 28 with a 6-3, 6-2, 7-5 victory over Olympic gold medal doubles partner Stanislas Wawrinka.
"Twenty-eight quarterfinals in a row, that's great," Federer said. "But that's another opportunity for me to go one step further."
Shortly after Federer's match on Court Philippe Chatrier, Djokovic maintained his perfect season and stretched his overall winning streak to 43 matches by beating Richard Gasquet of France 6-4, 6-4, 6-2.
"I'm definitely playing the best tennis of my life," Djokovic said, "and I'm trying to stay focused on each game and we'll see how far I can go."
Federer and Djokovic could meet in the semifinals.
Also Sunday, Anastasia Pavlyuchenkova knocked out the highest seeded player remaining in the women's draw, beating No. 3 Vera Zvonareva 7-6 (4), 2-6, 6-2 to earn a spot in the quarterfinals. Defending champion Francesca Schiavone later advanced by defeating No. 10 Jelena Jankovic 6-3, 2-6, 6-4.
Federer, a 16-time major champion who completed a career Grand Slam at Roland Garros in 2009, improved on the record he shared with Jimmy Connors on Court Philippe Chatrier. The last time Federer failed to reach the quarterfinals at a major was at the 2004 French Open, when he was the top-seeded player but lost to Gustavo Kuerten in the third round.
Federer again dominated with his serve Sunday. He was broken once early in the third set, but broke back twice to remain one of four players to have won every match in straight sets.
"I was playing with the wind against me, and it was a bad game because all of a sudden there was more wind, and I had the feeling that I was playing against the wind and not against Stan," Federer said of the third set. "So in the end I made wrong decisions."
"In the third set I had a few openings, and if I had managed to serve a little better and hold on to my break, maybe anything could have happened," Wawrinka said.
Besides his record 16 major titles, Federer also set a record of 23 straight Grand Slam semifinal appearances. That run ended at last year's French Open, when he was beaten in the quarterfinals.
Federer set his quarterfinal streak in 28 consecutive Grand Slam tournaments, while Connors skipped some in his run.
Djokovic is 41-0 in 2011, including a pair of clay-court final wins over top-ranked Rafael Nadal. If he beats unseeded Fabio Fognini in the quarterfinals, he will match John McEnroe's record for the best start to the season.
"To beat him you need to produce the perfect match and not make any mistakes. You need to play like Nadal, hit the ball really strong, to make him run. But only a few guys can beat him at the moment," Gasquet said. "Even Nadal struggles to organize his game when he plays against him."
With three more wins, Djokovic will equal Guillermo Vilas' overall Open era record of 46 consecutive wins.
"Actually, I think I'm playing really well at this moment," said Djokovic, whose winning streak dates back to last year's Davis Cup final. "And this match today I think I even increased a level since the last match, which makes me even happier."
Fognini, the first Italian to reach the quarterfinals at Roland Garros since 1995, overcame a cramping left leg and five match points to defeat Albert Montanes of Spain 4-6, 6-4, 3-6, 6-3, 11-9.
The third-seeded Zvonareva followed No. 1 Caroline Wozniacki and No. 2 Kim Clijsters out of the tournament after losing to Pavlyuchenkova, at 19 the youngest player still in the tournament. Wozniacki lost in the third round and Clijsters in the second.
"I don't really want to comment on this, because, well, it's not of my business," Pavlyuchenkova said. "I'm just trying to do my thing, focusing on me. ... The rest, I don't really care."
It is only the third time that none of the top three seeded women has reached the quarterfinals at a Grand Slam tournament in the Open era, which began in 1968, and the first time at the French Open. It also happened at Wimbledon in 2008 -- when the top four were eliminated by the end of the fourth round -- and at the Australian Open in 1997.
Zvonareva reached the Wimbledon and U.S. Open finals last year and the Australian Open semifinals in January. She saved two match points in the final game against Pavlyuchenkova before hitting a forehand long on the third.
The fifth-seeded Schiavone reprised her postmatch ritual from 2010 after beating Jankovic, kneeling down and giving a kiss to the clay court.
Jankovic's loss means she will fall out of the top 10 in the WTA rankings released after the tournament ends. She's been there since February 2007, the longest active stay in the top 10.