If a blocking creature leaves the battlefield, is the attacker still blocked, or will it damage the opponent?
No 

The player takes no damage as the Dragon remains blocked. From the Comprehensive Rules for the Declare Blockers step:


  509.1h An attacking creature with one or more creatures declared as blockers for it becomes a blocked creature; one with no creatures declared as blockers for it becomes an unblocked creature. This remains unchanged until the creature is removed from combat, an effect says that it becomes blocked or unblocked, or the combat phase ends, whichever comes first. A creature remains blocked even if all the creatures blocking it are removed from combat.


An Exception is, when the attacking creature has trample. See the Comprehensive Rules for Keyword Abilities:


  702.19c If an attacking creature with trample is blocked, but there are no creatures blocking it when damage is assigned, all its damage
  is assigned to the player or planeswalker it's attacking.