[Webkit-unassigned] [Bug 62698] Support for Battery Status API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 7 01:23:42 PST 2012


--- Comment #45 from Kenneth Rohde Christiansen <kenneth at webkit.org>  2012-03-07 01:23:40 PST ---
(From update of attachment 130562)
View in context: https://bugs.webkit.org/attachment.cgi?id=130562&action=review

> LayoutTests/fast/dom/BatteryStatus/no-page-cache-expected.txt:1
> +Tests that pages that use BatteryStatus are not put in the page cache.

Really? That is pretty sad. Why not do the extra work to make it possible to have them in the cache. If any spec changes are needed for that (shouldn't be needed), I have contacts

> Source/WebCore/ChangeLog:6
> +        This API is implemented under the Navigator class.

If so, it would be really good if you made sure this works properly when suspending and resuming, like there is no reason to send updates if all browser windows subscribed are in the background, nor if the document is suspended for panning/scaling or any other kind of animation.

> Source/WebCore/ChangeLog:11
> +        There are four types of events: onchargingchange, onchargingtimechange, ondischargingtimechange, onlevelchange.
> +        All events are operated based on a callback mechanism.
> +        When battery event has raised, the event listener watching battery status has to be called.
> +        The battery status can be accessed using BatteryManager(navigator.webkitBattery).
> +        http://www.w3.org/TR/battery-status/

This changelog could be formatted a bit better to make it more readable

> Source/WebCore/Modules/battery/BatteryController.cpp:41
> +    for (size_t i = 0; i < m_listeners.size(); ++i)
> +        m_listeners[i]->batteryControllerDestroyed();

Why not use iterators?

> Source/WebKit/efl/ChangeLog:6
> +        Add BatteryClientEfl and DumpRenerTreeSupportEfl class implementation for the layout tests.

Spelling issue with Render*

> Tools/ChangeLog:6
> +        Add setMockBatteryStatus API to layoutTestController for testing the Battery Status API.

Why is this not in the internals object instead? This is not something anyone would implement with a public API anyway. And there is talk about moving more things to the internals object. Maybe you could talk to rniwa

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list