WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 123786
120136
[WK2] Add didChangeEnableHighAccuracy callback to WK2 geolocation API
https://bugs.webkit.org/show_bug.cgi?id=120136
Summary
[WK2] Add didChangeEnableHighAccuracy callback to WK2 geolocation API
Hugo Parente Lima
Reported
2013-08-21 13:49:05 PDT
This GeolocationProvider callback is needed if the application want to use e.g. a low power method of acquiring geopositon when the web author don't need high accuracy. This API was added to Nix, I'm upstreaming it just in case you guys have interest and/or feel this is useful.
Attachments
Patch
(15.67 KB, patch)
2013-08-21 14:24 PDT
,
Hugo Parente Lima
benjamin
: review-
webkit-ews
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Hugo Parente Lima
Comment 1
2013-08-21 14:24:32 PDT
Created
attachment 209304
[details]
Patch
Early Warning System Bot
Comment 2
2013-08-21 14:30:23 PDT
Comment on
attachment 209304
[details]
Patch
Attachment 209304
[details]
did not pass qt-wk2-ews (qt-wk2): Output:
http://webkit-queues.appspot.com/results/1516860
Build Bot
Comment 3
2013-08-21 14:57:15 PDT
Comment on
attachment 209304
[details]
Patch
Attachment 209304
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/1528200
Build Bot
Comment 4
2013-08-21 15:05:10 PDT
Comment on
attachment 209304
[details]
Patch
Attachment 209304
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/1516862
Hugo Parente Lima
Comment 5
2013-08-21 15:20:38 PDT
I can fix the Qt-wk2 and maybe the mac build errors if some wk2-owner show interest about land this patch, if there's no interest anyone feel free to mark the bug as WONTFIX. Thanks.
Benjamin Poulain
Comment 6
2013-08-22 00:11:21 PDT
(In reply to
comment #5
)
> I can fix the Qt-wk2 and maybe the mac build errors if some wk2-owner show interest about land this patch, if there's no interest anyone feel free to mark the bug as WONTFIX.
I am interested in this, this seems great. The WebKit1 code for EnableHighAccuracy is quite wrong. I need to go through the code again to remember the problems and see if this patch avoids them. Please give me a couple of days before I check this, maybe the weekend. If I did not review by Monday, feel free to nag me on IRC. Do not land if another reviewer r+.
Hugo Parente Lima
Comment 7
2013-08-22 06:28:18 PDT
(In reply to
comment #6
)
> (In reply to
comment #5
) > > I can fix the Qt-wk2 and maybe the mac build errors if some wk2-owner show interest about land this patch, if there's no interest anyone feel free to mark the bug as WONTFIX. > > I am interested in this, this seems great. > > The WebKit1 code for EnableHighAccuracy is quite wrong. I need to go through the code again to remember the problems and see if this patch avoids them.
One problem I noticed is that setEnableHighAccuracy is called before startUpdating(), so the first update will not consider the highaccuracy setting.
> Please give me a couple of days before I check this, maybe the weekend. If I did not review by Monday, feel free to nag me on IRC. > Do not land if another reviewer r+.
No problem, I'm not in a hurry :-)
Hugo Parente Lima
Comment 8
2013-08-22 06:40:33 PDT
(In reply to
comment #7
)
> (In reply to
comment #6
) > One problem I noticed is that setEnableHighAccuracy is called before startUpdating(), so the first update will not consider the highaccuracy setting.
Oops, I was wrong, they are called in the right order, sorry for the noise.
Benjamin Poulain
Comment 9
2013-08-27 17:47:30 PDT
Comment on
attachment 209304
[details]
Patch I finally spent the time to read this. The patch is not correct. WebGeolocationClient is per page. WebGeolocationManager is a WebProcess concept. WebGeolocationManagerProxy is WebContext concept. You cannot just mix everything. When the message go to a more general concept, you need to keep track of the details of the smaller scope. For example: - Take a process Alpha with the page A and B. Page A ask for HighAccuracy=true, page B ask for HighAccuracy=false. With your patch, the last one wins. What should happen is HighAccuracy should be kept to true because one of the two live Geolocation object is in that mode. - Take a UIProcess Beta with two web processes A and B. Same reasoning as above. etc.
Hugo Parente Lima
Comment 10
2013-08-28 09:38:12 PDT
(In reply to
comment #9
)
> (From update of
attachment 209304
[details]
) > I finally spent the time to read this. The patch is not correct. > > WebGeolocationClient is per page. WebGeolocationManager is a WebProcess concept. WebGeolocationManagerProxy is WebContext concept. > You cannot just mix everything. When the message go to a more general concept, you need to keep track of the details of the smaller scope. > > For example: > - Take a process Alpha with the page A and B. Page A ask for HighAccuracy=true, page B ask for HighAccuracy=false. With your patch, the last one wins. What should happen is HighAccuracy should be kept to true because one of the two live Geolocation object is in that mode. > - Take a UIProcess Beta with two web processes A and B. Same reasoning as above. > etc.
Got it, with the current patch the application still can solve this issue, but I think is better to solve it somehow on WebKit2 UIProcess level.
Benjamin Poulain
Comment 11
2013-08-28 15:35:28 PDT
(In reply to
comment #10
)
> Got it, with the current patch the application still can solve this issue, but I think is better to solve it somehow on WebKit2 UIProcess level.
I am not sure to follow you here. How can the application solve the issues?
Hugo Parente Lima
Comment 12
2013-08-28 15:54:58 PDT
(In reply to
comment #11
)
> (In reply to
comment #10
) > > Got it, with the current patch the application still can solve this issue, but I think is better to solve it somehow on WebKit2 UIProcess level. > > I am not sure to follow you here. How can the application solve the issues?
It knows about all start/stop geolocations requests and about all enable/disable high accuracy from all pages, so it have all the information to not turn off the high accuracy when it can't because there are some page using high accuracy. But I think the application shouldn't worry about this logic.
Benjamin Poulain
Comment 13
2013-08-28 16:20:44 PDT
(In reply to
comment #12
)
> It knows about all start/stop geolocations requests and about all enable/disable high accuracy from all pages, so it have all the information to not turn off the high accuracy when it can't because there are some page using high accuracy. But I think the application shouldn't worry about this logic.
That is simply not possible. The informations about the Geolocation objects never leaves the WebProcess. The best you can do is never go back from high accuracy until you stop updating geolocation. That would terribly bad for battery on mobile devices.
Hugo Parente Lima
Comment 14
2013-08-28 16:27:55 PDT
(In reply to
comment #13
)
> That is simply not possible. The informations about the Geolocation objects never leaves the WebProcess.
Doesn't Webcore call stopUpdate when a Geolocation object requesting positions is destroyed? Better to have this conversation on IRC btw.
> The best you can do is never go back from high accuracy until you stop updating geolocation. That would terribly bad for battery on mobile devices.
Benjamin Poulain
Comment 15
2013-11-04 21:08:46 PST
I will add this on
https://bugs.webkit.org/show_bug.cgi?id=123786
. *** This bug has been marked as a duplicate of
bug 123786
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug