[Webkit-unassigned] [Bug 39588] Provide implementation of DeviceOrientationController and hook into DOMWindow

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 14 03:38:16 PDT 2010


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





--- Comment #22 from Steve Block <steveblock at google.com>  2010-07-14 03:38:16 PST ---
> WebCore/dom/DeviceOrientationController.cpp:58
>  +          m_client->startUpdating();
> Shouldn't you just ask the client whether it's been started?  At very least you
> should probably assert that it's not currently updating.
I don't think there's any need to ask the client. This code is the only place where the client is started, so if it's already been started it's due to a logic error in this code. If we're to add an assert, I think it's better to do so in DeviceOrientationClient::start(), rather than adding a new DeviceOrientationClient::isStarted().

> WebCore/dom/DeviceOrientationController.cpp:52
>  +          window->dispatchEvent(DeviceOrientationEvent::create(eventNames().deviceorientationEvent, m_client->lastOrientation()));
> Is this specced to be synchronous?  If so, I think we should consider changing
> it.  If so, you shouldn't do it this way.
Are you asking whether the DeviceOrientation API specs whether window.addEventListener() may invoke the event handler synchronously? Currently it doesn't say either way. Why do you think it's not good to invoke the event handler synchronously?

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