Closed
Bug 884921
Opened 11 years ago
Closed 11 years ago
Align navigator.geolocation with spec
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: bzbarsky, Assigned: ggp)
References
Details
(Keywords: dev-doc-complete, site-compat)
Attachments
(1 file, 1 obsolete file)
3.93 KB,
patch
|
dougt
:
review+
bzbarsky
:
feedback+
|
Details | Diff | Splinter Review |
Per spec, this never returns null, which is totally not what our implementation does when geo.enabled is not set....
Updated•11 years ago
|
Assignee: nobody → ggoncalves
Comment 1•11 years ago
|
||
Shouldn't that be solved by having the properties behind [PrefEnabled] when Navigator is converted to WebIDL?
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
Reporter | ||
Comment 2•11 years ago
|
||
I think so, yes; I'm just not willing to make that change as part of the navigator webidl conversion, since Doug thinks it's risky.
Assignee | ||
Comment 3•11 years ago
|
||
I'm not sure I understand the desired behavior here. Should navigator.geolocation never be null, but issue error events for all calls to getCurrentPosition/watchPosition when "geo.enabled" is false?
Reporter | ||
Comment 4•11 years ago
|
||
That's a good question. The options are either to do that or to have |"geolocation" in navigator| test false if geo.enabled is false and have navigator.geolocation be undefined. And also have the geolocation interface object disappear when the pref is not set, if we take this approach.
Assignee | ||
Comment 5•11 years ago
|
||
Here's my stab at the second option. This causes navigator.geolocation to be undefined when the pref is false on page load. However, if the pref is set to false after being true on page load, that doesn't cause navigator.geolocation to be undefined. Is that a problem? navigator.getGamepads seems to also behave like that. Feedback: bzbarsky@mit.edu
Assignee | ||
Comment 6•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #778687 -
Flags: feedback?(bzbarsky)
Assignee | ||
Updated•11 years ago
|
Attachment #778682 -
Attachment is obsolete: true
Reporter | ||
Comment 7•11 years ago
|
||
Comment on attachment 778687 [details] [diff] [review] navigator.geolocation should never be null. > Is that a problem? No. And looks like Geolocation is [NoInterfaceObject] (why?) so there is no need to condition its interface object on the pref.
Attachment #778687 -
Flags: feedback?(bzbarsky) → feedback+
Assignee | ||
Comment 8•11 years ago
|
||
Comment on attachment 778687 [details] [diff] [review] navigator.geolocation should never be null. Doug, I don't know what concerns you had regarding this bug, so please let me know if anything is missing. Seems to work on try: https://tbpl.mozilla.org/?tree=Try&rev=ed06767dda70
Attachment #778687 -
Flags: review?(doug.turner)
Updated•11 years ago
|
Attachment #778687 -
Flags: review?(doug.turner) → review+
Comment 9•11 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #7) > And looks like Geolocation is [NoInterfaceObject] (why?) so there is no need > to condition its interface object on the pref. It is likely a bug in the specification.
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 10•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b54402f21eb8
Flags: in-testsuite+
Keywords: checkin-needed
Comment 11•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b54402f21eb8
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Updated•11 years ago
|
Keywords: dev-doc-needed
Comment 12•11 years ago
|
||
https://developer.mozilla.org/en-US/docs/WebAPI/Using_geolocation https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/25/Site_Compatibility
Comment hidden (spam) |
Comment hidden (spam) |
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•