Federer beat Swiss compatriot Stanislas Wawrinka 6-3, 6-2, 7-5 while Djokovic made it 41 wins for the year and 43 in a row in total by brushing aside Richard Gasquet 6-4, 6-4, 6-2.
Both were somewhat upstaged by Djokovic's next opponent Fabio Fognini, though, after he saved five match points and defied injury to beat Albert Montanes 4-6, 6-4, 3-6, 6-3, 11-9.
Victory for Djokovic over the Italian would see him tie John McEnroe's record start to a season from 1984 of 42 straight wins, while he would also only be two away from Guillermo Vilas' all-time record of 46 victories.
"I was very happy with my game. I knew that Richard is a great player, but I played without any mistakes," said Djokovic.
Federer registered his ninth win from ten matches against Wawrinka, who also lost to his friend at the same stage at Roland Garros last year and in the quarter-finals of the Australian Open in January.
Wawrinka had fought back from two sets down to beat Jo-Wilfried Tsonga on Friday and he looked set to mount another comeback when he went a break up at the start of the third today, but Federer was having none of it.
The 29-year-old said: "I'm very happy with the way it went. I knew the danger coming into this match on clay. I still think it is his best surface, even though maybe it's been somewhat of a disappointing clay-court season for him."
Federer set his own record by reaching a 28th consecutive grand slam quarter-final, breaking the mark he jointly held with Jimmy Connors - although the American missed a number of Australian and French Opens.
With his win over Juan Martin Del Potro yesterday, Djokovic moved past Federer's best unbeaten run of 41 matches from 2006/07.
Italian Fognini looked down and out during his four-hour-and-22-minute match against Montanes, trailing by a break in the decider and then receiving treatment to his left leg in the 14th game when he was only two points from defeat.
However, Spaniard Montanes could not take advantage of two match points and he was then broken before Fognini served out a remarkable win.The match between home hope Gael Monfils and Spaniard David Ferrer was suspended because of darkness with Monfils leading 6-4, 2-6, 7-5, 0-2.
In the women's singles, Anastasia Pavlyuchenkova reached the quarter-finals of a grand slam for the first time at the French Open with a 7-6 (7/4), 2-6, 6-2 victory over third seed and fellow Russian Vera Zvonareva.
The 19-year-old, who at 15th in the rankings is officially the world's best teenager, fought back from breaks down in both the first and third sets.
Pavlyuchenkova will play defending champion Francesca Schiavone in the quarter-finals after the Italian came through a topsy-turvy encounter with Jelena Jankovic 6-3, 2-6, 6-4.
French 11th seed Marion Bartoli became the third player through to the quarter-finals when opponent Gisela Dulko retired early in the second set. The Argentinian received treatment to her left thigh early on and then again after Bartoli had won the opening set 7-5. But she played only one game of the second before calling it a day.
Also into the last eight is 13th seed Svetlana Kuznetsova of Russia who beat 28th seed Daniela Hantuchova of Slovakia 6-7 (6-8), 6-3, 6-2 in one of the day's final matches.