Top seed Djokovic made the last 16 for the seventh successive year by routing Bernard Tomic of Australia 6-3, 6- 3, 6-3 on the back of 15 aces and 38 winners.
The Serb then faced a different challenge as he walked off Centre Court when he was asked to autograph the prosthetic leg of a wheelchair-bound fan.
"The gentleman gave me his artificial leg...I want to be politically correct about it," smiled the 29-year-old Djokovic who next faces South Africa's Kevin Anderson.
Fourth seeded Sharapova made the last 16 with a 6-4, 6-3 win over Romania's Irina-Camelia Begu and goes on to tackle either Germany's 14th seed Andrea Petkovic or unseeded Zarina Diyas of Kazakhstan for a spot in the quarter-finals.
More From This Section
"What everyone at this stage of the tournament expects is to go further and expect more, better things from yourself. As the matches get tougher, you have to raise your level," said five-time Grand Slam winner Sharapova.
Kyrgios, who famously defeated Rafael Nadal in 2014 when he was ranked 144 in the world, avenged his quarter-final loss of 12 months ago to seventh seed Milos Raonic with a 5-7, 7-5, 7-6 (7/3), 6-3 victory.
"I lost my focus a bit towards the end of the first set, but I knew what my game plan was and I stuck to it. I toughed it out," Kyrgios said.
Kyrgios, seeded 26, faces another rematch in the fourth round against Gasquet after beating the Frenchman in a dramatic five-setter in the second round last year.
Gasquet, a 2007 semi-finalist and seeded 21, beat 11th seeded Grigor Dimitrov of Bulgaria for the fifth time in five meetings thanks to a 6-3, 6-4, 6-4 stroll.