Six-time Australian Open champion Novak Djokovic continued his comeback from six months out with an injured right elbow with a 6-2, 6-3, 6-3 win over No. 21 Albert Ramos-Vinolas to move into the fourth round for a sixth consecutive major.
"I obviously have to be more humble this time with my expectations because I haven't played for six months," the 14th-seeded Djokovic said.
Djokovic took a medical timeout in the second set to have his back and legs massaged but appeared to show little ill effects for the rest of the match.
"It was OK. Nothing major," Djokovic said. "I knew I wanted to use the medical timeout because I needed it, but at the same time, I knew it was nothing major that can potentially raise the question mark on whether I can continue playing."
Djokovic will next face Hyeon Chung, who took out a Zverev for the second time this week. Chung beat fourth-seeded Alexander Zverev 5-7, 7-6 (3), 2-6, 6-3, 6-0 six days after a win over No. 32 Mischa Zverev in the first round.
Another unexpected loss at a major had the highly touted Zverev admitting he may have a problem.
"Definitely not physical, so ... I have some figuring out to do, what happens to me in deciding moments in Grand Slam," he said. "It happened at Wimbledon. It happened in New York. It happened here."
The 20-year-old Zverev has five titles on the elite tour, but his fourth-round exit at Wimbledon last year remains his best run at a major.
Gasquet has failed to take a set off Federer in their past 10 matches. They first played each other in 2005.
Defending champion Federer has now reached the fourth round for the 16th time in 19 trips to Melbourne Park. Along the way, he has won five of his 19 Grand Slam singles titles.
Fifth-seeded Dominic Thiem beat Adrian Mannarino 6-4, 6-2, 7-5 to set up a fourth-round match against Tennys Sandgren, who continued his career-best run by beating Maximilian Marterer 5-7, 6-3, 7-5, 7-6 (5).
Information from The Associated Press was used in this report.