Bug 41608 - DeviceOrientation should be renamed to DeviceOrientationController
Summary: DeviceOrientation should be renamed to DeviceOrientationController
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Blocks: 41607
  Show dependency treegraph
Reported: 2010-07-05 05:15 PDT by Steve Block
Modified: 2010-07-07 02:52 PDT (History)
3 users (show)

See Also:

Patch (23.69 KB, patch)
2010-07-05 07:39 PDT, Steve Block
no flags Details | Formatted Diff | Diff
Patch (23.70 KB, patch)
2010-07-05 08:18 PDT, Steve Block
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Block 2010-07-05 05:15:35 PDT
This is consistent with other controllers, eg Geolocation, and will allow the name DeviceOrientation to be used to represent a set of device orientation data. This will be cleaner than passing around the 3 bools and 3 doubles required to represent the optional properties of the DeviceOrientationEvent.
Comment 1 Steve Block 2010-07-05 07:39:11 PDT
Created attachment 60532 [details]
Comment 2 Hans Wennborg 2010-07-05 08:14:13 PDT
This sounds good to me. Only found one issue:

In WebCore/page/Page.h:
> -        DeviceOrientation* deviceOrientation() const { return m_deviceOrientation.get(); }
> +        DeviceOrientationController* deviceOrientationController() const { return m_deviceOrientation.get(); }
I guess this should return m_deviceOrientationController.get()?
Comment 3 Steve Block 2010-07-05 08:18:13 PDT
Created attachment 60539 [details]
Comment 4 Adam Barth 2010-07-07 02:46:35 PDT
Comment on attachment 60539 [details]

 +      // FIXME: Add methods to start and stop the service.
This patch will make more sense once we do this FIXME.

It's not really controlling the DeviceOrientation, is it?  That would be kind of awesome.  Instead, it's controlling the DeviceOrientation service, right?  I guess the GeolocationController isn't controlling the geolocation either.  I guess brevity is a virtue here and DeviceOrientationServiceController is too long...

Anyway, not 100% cheesed about the name.
Comment 5 Steve Block 2010-07-07 02:52:52 PDT
Committed r62646: <http://trac.webkit.org/changeset/62646>