If you consent, Firefox gathers informationFirefox gathers information about nearby wireless access points and your computer’s IP address. Then Firefox sends this information to the default geolocation service provider...
https://www.mozilla.org/en-US/firefox/geolocation/
Firefox knows the IP address, which is used to connect to the VPN provider. Many geolocation services, however, only look at the IP address they see from the server side.
By the way: With java installed, a website can read the local ip-address without asking for permission.
new Socket("http://example.com", 80)).getLocalAddress().getHostAddress()
example.com needs to be replaced with the name website to obey the same origin policy.