[Webkit-unassigned] [Bug 93597] Add DeviceController to support DOMWindow device events

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 20 13:41:40 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=93597


Adam Barth <abarth at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #159363|review?, commit-queue?      |review-
               Flag|                            |




--- Comment #44 from Adam Barth <abarth at webkit.org>  2012-08-20 13:42:10 PST ---
(From update of attachment 159363)
View in context: https://bugs.webkit.org/attachment.cgi?id=159363&action=review

OK.  This is getting close.  Can we remove the PROXIMITY_EVENTS-specific code from this patch?  It doesn't seem like it actually does anything because nothing inherits from DeviceClient.

Rather than adding support for PROXIMITY_EVENTS in this patch, I'd prefer if we:
1) Landed this patch
2) Changed the existing device code to use this mechanism (probably one per patch)
3) Added support for device proximity

Is that a reasonable course of action?

> Source/WebCore/page/DeviceController.cpp:44
> +#if ENABLE(PROXIMITY_EVENTS)
> +    if (eventType == eventNames().webkitdeviceproximityEvent)
> +        return true;
> +#endif

Should we do the PROXIMITY_EVENTS specific work in the next patch?

> Source/WebCore/page/DeviceController.cpp:58
> +        listeners = new ListenersCountedSet();

This is a naked new.  Presumably we want adoptPtr here.

> Source/WebCore/page/DeviceController.cpp:77
> +        delete listeners;

Raw delete.  Let's use OwnPtr instead!

> Source/WebCore/page/DeviceController.cpp:87
> +    for (int i = 0; i < m_listeners.size(); ++i) {

int -> size_t ?

> Source/WebCore/page/DeviceController.cpp:116
> +        if (!listeners[i]->document()->activeDOMObjectsAreSuspended())

Is this the right semantics for suspended documents?  It's fine to just drop the events on the floor?

-- 
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