Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-07-05 Thread Robin Berjon
Hi, some belated additional thoughts on this thread. On Wed Jun 15 02:41:01 PDT 2011 Holger Freyther wrote: I am not participating in any W3C group so this might or might have been discussed but this specification seems to be over simplified, specially if you compare it what is provided by

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-18 Thread Ki-hong Kwon
The batterystatus can be unimportant for pages or apps. Or, detail info is needed more than this. But, before the spec is changed, I think there is no problem to support this. It is better to support to do not. Can you be sure that this will be not used? I think It is good to support to someone

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-17 Thread Anssi Kostiainen
Hi, On 16.6.2011, at 19.02, ext Darin Fisher wrote: On Thu, Jun 16, 2011 at 5:12 AM, Anssi Kostiainen anssi.kostiai...@nokia.com wrote: On 15.6.2011, at 21.29, ext Darin Fisher wrote: There should probably be a way to poll the current state. Much as you can poll the

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-17 Thread Darin Fisher
On Fri, Jun 17, 2011 at 4:11 AM, Anssi Kostiainen anssi.kostiai...@nokia.com wrote: Hi, On 16.6.2011, at 19.02, ext Darin Fisher wrote: On Thu, Jun 16, 2011 at 5:12 AM, Anssi Kostiainen anssi.kostiai...@nokia.com wrote: On 15.6.2011, at 21.29, ext Darin Fisher wrote: There

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-17 Thread Andrei Popescu
On Fri, Jun 17, 2011 at 4:21 PM, Darin Fisher da...@chromium.org wrote: On Fri, Jun 17, 2011 at 4:11 AM, Anssi Kostiainen anssi.kostiai...@nokia.com wrote: Hi, On 16.6.2011, at 19.02, ext Darin Fisher wrote: On Thu, Jun 16, 2011 at 5:12 AM, Anssi Kostiainen anssi.kostiai...@nokia.com

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-17 Thread Darin Fisher
On Fri, Jun 17, 2011 at 10:27 AM, Andrei Popescu andr...@google.com wrote: On Fri, Jun 17, 2011 at 4:21 PM, Darin Fisher da...@chromium.org wrote: On Fri, Jun 17, 2011 at 4:11 AM, Anssi Kostiainen anssi.kostiai...@nokia.com wrote: Hi, On 16.6.2011, at 19.02, ext Darin Fisher

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-17 Thread Greg Simon
We ran into this problem on webOS with orientation where we did not want to have the UI drawn wrong the first time and then (eventually) re-layed out and painted at the correct device orientation. It looked VERY sloppy and web-page-ish, not what we were trying to accomplish. Sure we could have

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-17 Thread Eric Seidel
My 2¢: I'm confused by who the client of this API would be. It seems that web sites don't really need to know my battery state. But web applications that are on mobile phone (like WebOS, or Apple's original vision for iPhone apps) would want battery state information, but would want *more*

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-17 Thread Darin Fisher
I think there are web app developers that would do things differently if they knew their user was running on battery power. An app might scale back its CPU usage, or run a timer at a lower frequency. Crazy idea: Maybe an advertising network could be nice and not show animated ads to such users?

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-17 Thread Eric Seidel
Given how many desktop applications do this, I think we're well off into the land of wishes and fairy tales. :) But it's also possible that libraries like jquery or Google's closure could do this... but again, I'm skeptical. Then again, if we don't expose information like this, they don't ever

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-16 Thread Anssi Kostiainen
Hi, On 15.6.2011, at 20.25, ext Greg Simon wrote: From what I can tell the spec offers no way for the web application to initialize any algorithm based on the battery/power state because there is no guarantee of minimum time when a new document is created and the first battery event

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-16 Thread Darin Fisher
On Thu, Jun 16, 2011 at 5:12 AM, Anssi Kostiainen anssi.kostiai...@nokia.com wrote: Hi, On 15.6.2011, at 20.25, ext Greg Simon wrote: From what I can tell the spec offers no way for the web application to initialize any algorithm based on the battery/power state because there is no

[webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread 권기홍
Hi webkit-dev! I wanted to let you know that I plan to add battery status event support to WebCore. The Battery Status Event is a new feature that is defined by W3C (http://www.w3.org/TR/battery-status http://www.w3.org/TR/battery-status/ ) This support will be behind the

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Holger Freyther
On 06/15/2011 10:21 AM, 권기홍 wrote: Hi webkit-dev! I wanted to let you know that I plan to add battery status event support to WebCore. The Battery Status Event is a new feature that is defined by W3C (http://www.w3.org/TR/battery-status http://www.w3.org/TR/battery-status/) I am

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Kihong Kwon
...@lists.webkit.org [mailto:webkit-dev- boun...@lists.webkit.org] On Behalf Of Holger Freyther Sent: Wednesday, June 15, 2011 6:41 PM To: webkit-dev@lists.webkit.org Subject: Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore On 06/15/2011 10:21 AM, 권기홍 wrote: Hi webkit-dev! I

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Ryosuke Niwa
2011/6/15 권기홍 kihong.k...@samsung.com I wanted to let you know that I plan to add battery status event support to WebCore. The Battery Status Event is a new feature that is defined by W3C ( http://www.w3.org/TR/battery-status) It seems like the working draft has a couple of TODOs now. Is

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Kihong Kwon
From: ryosuke.n...@gmail.com [mailto:ryosuke.n...@gmail.com] On Behalf Of Ryosuke Niwa 2011/6/15 권기홍 kihong.k...@samsung.com I wanted to let you know that I plan to add battery status event support to WebCore. The Battery Status Event is a new feature that is defined by W3C

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Anssi Kostiainen
Hi, On 15.6.2011, at 17.24, ext Ryosuke Niwa wrote: 2011/6/15 권기홍 kihong.k...@samsung.com I wanted to let you know that I plan to add battery status event support to WebCore. The Battery Status Event is a new feature that is defined by W3C (http://www.w3.org/TR/battery-status) It

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread laszlo.1.gombos
Hi, It seems like the working draft has a couple of TODOs now. Is the spec sufficiently stable? Are other browser vendors implementing this feature? We have interest implementing the battery-status spec for the QtWebKit (and share the common part of the implementation). What happens if

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Holger Freyther
On 06/15/2011 06:11 PM, laszlo.1.gom...@nokia.com wrote: Hi, The use-case for us is to enable content developers to implement rudimentary power management (e.g. to stop expensive operations on the page, perhaps save state). I'm not sure if this API is really meant for accurately

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Brett Wilson
On Wed, Jun 15, 2011 at 9:30 AM, Holger Freyther ze...@selfish.org wrote: On 06/15/2011 06:11 PM, laszlo.1.gom...@nokia.com wrote: Hi, The use-case for us is to enable content developers to implement rudimentary power management (e.g. to stop expensive operations on the page, perhaps

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Andrei Popescu
On Wed, Jun 15, 2011 at 5:58 PM, Brett Wilson bre...@chromium.org wrote: On Wed, Jun 15, 2011 at 9:30 AM, Holger Freyther ze...@selfish.org wrote: On 06/15/2011 06:11 PM, laszlo.1.gom...@nokia.com wrote: Hi, The use-case for us is to enable content developers to implement rudimentary

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Holger Freyther
On 06/15/2011 06:58 PM, Brett Wilson wrote: Why would a web page care about whether the battery is being charged when the device is plugged in? Hi, aeh, first of all my mind is playing tricks and I could swear that its battery is being charged was not in the isPlugged description so my

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Alexis Menard
On Wed, Jun 15, 2011 at 2:02 PM, Andrei Popescu andr...@google.com wrote: On Wed, Jun 15, 2011 at 5:58 PM, Brett Wilson bre...@chromium.org wrote: On Wed, Jun 15, 2011 at 9:30 AM, Holger Freyther ze...@selfish.org wrote: On 06/15/2011 06:11 PM, laszlo.1.gom...@nokia.com wrote: Hi, The

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Ryosuke Niwa
On Wed, Jun 15, 2011 at 10:02 AM, Andrei Popescu andr...@google.com wrote: Because it would know not to start doing things that drain the battery. For instance, powering up a 3G antenna to download your latest emails could be annoying to users if the battery level is too low. 3G takes quite a

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Andrei Popescu
On Wed, Jun 15, 2011 at 6:08 PM, Alexis Menard alexis.men...@openbossa.org wrote: On Wed, Jun 15, 2011 at 2:02 PM, Andrei Popescu andr...@google.com wrote: On Wed, Jun 15, 2011 at 5:58 PM, Brett Wilson bre...@chromium.org wrote: On Wed, Jun 15, 2011 at 9:30 AM, Holger Freyther ze...@selfish.org

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Greg Simon
From what I can tell the spec offers no way for the web application to initialize any algorithm based on the battery/power state because there is no guarantee of minimum time when a new document is created and the first battery event arrives. Ideally there would be a way to kick the UA into

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Darin Fisher
There should probably be a way to poll the current state. Much as you can poll the document.readyState and respond to progress events, it would seem to make sense to have a way to poll the battery state as well as respond to battery state change events. -Darin On Wed, Jun 15, 2011 at 10:25 AM,

Re: [webkit-dev] Adding ENABLE_BATTERY_STATUS to WebCore

2011-06-15 Thread Ryosuke Niwa
On Wed, Jun 15, 2011 at 11:29 AM, Darin Fisher da...@chromium.org wrote: There should probably be a way to poll the current state. Much as you can poll the document.readyState and respond to progress events, it would seem to make sense to have a way to poll the battery state as well as