w3c / geolocation

W3C Geolocation API
https://www.w3.org/TR/geolocation/
81 stars 56 forks source link

Only update position if document is showing #67

Closed marcoscaceres closed 3 years ago

marcoscaceres commented 3 years ago

Closes #48

The following tasks have been completed:

Implementation commitment:


Preview | Diff

marcoscaceres commented 3 years ago

Sent a patch to Gecko as part of https://bugzilla.mozilla.org/show_bug.cgi?id=1653549

marcoscaceres commented 3 years ago

I just realized that this is not enough... I'll update this and send again.

marcoscaceres commented 3 years ago

Ok, did a deep dive and did some more testing. This requires a fairly hefty rewrite of the spec.

Basically, we need to wire up visibility change listeners for when the methods are called. All the timing stuff is also affected, because the position request happens after the document becomes visible again.

marcoscaceres commented 3 years ago

will send again after rewrite...

reillyeon commented 3 years ago

All the timing stuff is also affected, because the position request happens after the document becomes visible again.

Just for the record, Chromium doesn't implement the timing requirements around permissions but I think that should qualify as a bug as the requirements make sense.

marcoscaceres commented 3 years ago

As part of exploring of adding this to Gecko, Edgar identified some inconsistency around how visibility is handled between Chrome and Safari... I'll report back once I have a better handle on what's going on.