Djokovic had little trouble against his opponent, Serbian Davis Cup teammate Viktor Troicki, dismantling him 6-3, 6-1, 6-3. The world No. 1 broke his countryman's serve six times and controlled the match from start to finish.
Mayer was leading Gasquet 6-3, 2-1 when play was called for the day.
Third-seeded Federer, meanwhile, logged a 7-6 (7-1), 6-1, 4-6, 6-3 decision over Belgian Xavier Malisse in a 2-hour, 11-minute match that had a brief rain delay.
Federer was treated for an aching back while holding a 4-3 lead in the first set. He later said his back was OK.
It was the 850th win of the 30-year-old Swiss star's career and marked the 33rd straight time he has reached the quarters in a Grand Slam.
Federer's next foe will be the 26th seed, Russian veteran Mikhail Youzhny, who advanced with a hard-fought 6-3, 5-7, 6-4, 6-7 (5-7), 7-5 win over Uzbekistan's Denis Istomin.
Federer is trying for his first win in a major since the 2010 Australian Open.
The rain disrupted play frequently at during the men's fourth-round schedule Monday at the All England Lawn Tennis Club, causing five other men's fourth-round matches to be suspended or postponed.
In those match-ups, No. 4 seed Andy Murray was leading 16th-seeded Croat Marin Cilic 7-5, 3-1; and 10th-seeded American Mardy Fish was ahead of No. 5 seed Jo-Wilfried Tsonga of France 6-4, 1-1.
Washed out altogether were matches between seventh-seeded Spaniard David Ferrer and ninth-seeded Juan Martin del Potro of Argentina and 27th-seeded German Philipp Kohlschreiber and American qualifier Brian Baker.
Boston schools pull out free condoms over wrapping complaints
Ray Liotta sues skin care company over use of likeness