Title: [120224] trunk/Source
Revision
120224
Author
[email protected]
Date
2012-06-13 10:36:59 -0700 (Wed, 13 Jun 2012)

Log Message

Rename currentDeviceMotion to lastMotion in DeviceMotionClient
https://bugs.webkit.org/show_bug.cgi?id=88854

Patch by Amy Ousterhout <[email protected]> on 2012-06-13
Reviewed by Adam Barth.

Rename the function currentDeviceMotion to lastMotion in DeviceMotionClient.
This makes it consistent with the similar function lastOrientation in DeviceOrientationClient.

Source/WebCore:

Just a rename, so does not require any new tests.

* dom/DeviceMotionClient.h:
(DeviceMotionClient):
* dom/DeviceMotionController.cpp:
(WebCore::DeviceMotionController::timerFired):
(WebCore::DeviceMotionController::addListener):
* loader/EmptyClients.h:
(WebCore::EmptyDeviceMotionClient::lastMotion):
* platform/qt/DeviceMotionClientQt.cpp:
(WebCore::DeviceMotionClientQt::lastMotion):
* platform/qt/DeviceMotionClientQt.h:
(DeviceMotionClientQt):
* platform/qt/DeviceMotionProviderQt.h:
(WebCore::DeviceMotionProviderQt::lastMotion):

Source/WebKit/blackberry:

* WebCoreSupport/DeviceMotionClientBlackBerry.cpp:
(DeviceMotionClientBlackBerry::lastMotion):
(DeviceMotionClientBlackBerry::onMotion):
* WebCoreSupport/DeviceMotionClientBlackBerry.h:
(DeviceMotionClientBlackBerry):

Source/WebKit/efl:

* WebCoreSupport/DeviceMotionClientEfl.cpp:
(WebCore::DeviceMotionClientEfl::lastMotion):
* WebCoreSupport/DeviceMotionClientEfl.h:
(DeviceMotionClientEfl):

Source/WebKit/gtk:

* WebCoreSupport/DeviceMotionClientGtk.cpp:
(WebKit::DeviceMotionClientGtk::lastMotion):
* WebCoreSupport/DeviceMotionClientGtk.h:
(DeviceMotionClientGtk):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (120223 => 120224)


--- trunk/Source/WebCore/ChangeLog	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebCore/ChangeLog	2012-06-13 17:36:59 UTC (rev 120224)
@@ -1,3 +1,29 @@
+2012-06-13  Amy Ousterhout  <[email protected]>
+
+        Rename currentDeviceMotion to lastMotion in DeviceMotionClient
+        https://bugs.webkit.org/show_bug.cgi?id=88854
+
+        Reviewed by Adam Barth.
+
+        Rename the function currentDeviceMotion to lastMotion in DeviceMotionClient.
+        This makes it consistent with the similar function lastOrientation in DeviceOrientationClient.
+
+        Just a rename, so does not require any new tests.
+
+        * dom/DeviceMotionClient.h:
+        (DeviceMotionClient):
+        * dom/DeviceMotionController.cpp:
+        (WebCore::DeviceMotionController::timerFired):
+        (WebCore::DeviceMotionController::addListener):
+        * loader/EmptyClients.h:
+        (WebCore::EmptyDeviceMotionClient::lastMotion):
+        * platform/qt/DeviceMotionClientQt.cpp:
+        (WebCore::DeviceMotionClientQt::lastMotion):
+        * platform/qt/DeviceMotionClientQt.h:
+        (DeviceMotionClientQt):
+        * platform/qt/DeviceMotionProviderQt.h:
+        (WebCore::DeviceMotionProviderQt::lastMotion):
+
 2012-06-13  Vsevolod Vlasov  <[email protected]>
 
         Web Inspector: Breakpoint's _uiLocationRemoved() method is never called.

Modified: trunk/Source/WebCore/dom/DeviceMotionClient.h (120223 => 120224)


--- trunk/Source/WebCore/dom/DeviceMotionClient.h	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebCore/dom/DeviceMotionClient.h	2012-06-13 17:36:59 UTC (rev 120224)
@@ -38,7 +38,7 @@
     virtual void setController(DeviceMotionController*) = 0;
     virtual void startUpdating() = 0;
     virtual void stopUpdating() = 0;
-    virtual DeviceMotionData* currentDeviceMotion() const = 0;
+    virtual DeviceMotionData* lastMotion() const = 0;
     virtual void deviceMotionControllerDestroyed() = 0;
 };
 

Modified: trunk/Source/WebCore/dom/DeviceMotionController.cpp (120223 => 120224)


--- trunk/Source/WebCore/dom/DeviceMotionController.cpp	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebCore/dom/DeviceMotionController.cpp	2012-06-13 17:36:59 UTC (rev 120224)
@@ -53,10 +53,10 @@
 void DeviceMotionController::timerFired(Timer<DeviceMotionController>* timer)
 {
     ASSERT_UNUSED(timer, timer == &m_timer);
-    ASSERT(m_client->currentDeviceMotion());
+    ASSERT(m_client->lastMotion());
     m_timer.stop();
     
-    RefPtr<DeviceMotionData> deviceMotionData = m_client->currentDeviceMotion();
+    RefPtr<DeviceMotionData> deviceMotionData = m_client->lastMotion();
     RefPtr<DeviceMotionEvent> event = DeviceMotionEvent::create(eventNames().devicemotionEvent, deviceMotionData.get());
  
     Vector<RefPtr<DOMWindow> > listenersVector;
@@ -70,7 +70,7 @@
 {
     // If the client already has motion data,
     // immediately trigger an asynchronous response.
-    if (m_client->currentDeviceMotion()) {
+    if (m_client->lastMotion()) {
         m_newListeners.add(window);
         if (!m_timer.isActive())
             m_timer.startOneShot(0);

Modified: trunk/Source/WebCore/loader/EmptyClients.h (120223 => 120224)


--- trunk/Source/WebCore/loader/EmptyClients.h	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebCore/loader/EmptyClients.h	2012-06-13 17:36:59 UTC (rev 120224)
@@ -582,7 +582,7 @@
     virtual void setController(DeviceMotionController*) { }
     virtual void startUpdating() { }
     virtual void stopUpdating() { }
-    virtual DeviceMotionData* currentDeviceMotion() const { return 0; }
+    virtual DeviceMotionData* lastMotion() const { return 0; }
     virtual void deviceMotionControllerDestroyed() { }
 };
 

Modified: trunk/Source/WebCore/platform/qt/DeviceMotionClientQt.cpp (120223 => 120224)


--- trunk/Source/WebCore/platform/qt/DeviceMotionClientQt.cpp	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebCore/platform/qt/DeviceMotionClientQt.cpp	2012-06-13 17:36:59 UTC (rev 120224)
@@ -59,9 +59,9 @@
         m_provider->stop();
 }
 
-DeviceMotionData* DeviceMotionClientQt::currentDeviceMotion() const
+DeviceMotionData* DeviceMotionClientQt::lastMotion() const
 {
-    return m_provider->currentDeviceMotion();
+    return m_provider->lastMotion();
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/qt/DeviceMotionClientQt.h (120223 => 120224)


--- trunk/Source/WebCore/platform/qt/DeviceMotionClientQt.h	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebCore/platform/qt/DeviceMotionClientQt.h	2012-06-13 17:36:59 UTC (rev 120224)
@@ -43,7 +43,7 @@
     virtual void startUpdating();
     virtual void stopUpdating();
 
-    virtual DeviceMotionData* currentDeviceMotion() const;
+    virtual DeviceMotionData* lastMotion() const;
 
     virtual void setController(DeviceMotionController*);
 

Modified: trunk/Source/WebCore/platform/qt/DeviceMotionProviderQt.h (120223 => 120224)


--- trunk/Source/WebCore/platform/qt/DeviceMotionProviderQt.h	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebCore/platform/qt/DeviceMotionProviderQt.h	2012-06-13 17:36:59 UTC (rev 120224)
@@ -47,7 +47,7 @@
 
     void start();
     void stop();
-    DeviceMotionData* currentDeviceMotion() const { return m_motion.get(); }
+    DeviceMotionData* lastMotion() const { return m_motion.get(); }
 
 private:
     RefPtr<DeviceMotionData> m_motion;

Modified: trunk/Source/WebKit/blackberry/ChangeLog (120223 => 120224)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-06-13 17:36:59 UTC (rev 120224)
@@ -1,3 +1,19 @@
+2012-06-13  Amy Ousterhout  <[email protected]>
+
+        Rename currentDeviceMotion to lastMotion in DeviceMotionClient
+        https://bugs.webkit.org/show_bug.cgi?id=88854
+
+        Reviewed by Adam Barth.
+
+        Rename the function currentDeviceMotion to lastMotion in DeviceMotionClient.
+        This makes it consistent with the similar function lastOrientation in DeviceOrientationClient.
+
+        * WebCoreSupport/DeviceMotionClientBlackBerry.cpp:
+        (DeviceMotionClientBlackBerry::lastMotion):
+        (DeviceMotionClientBlackBerry::onMotion):
+        * WebCoreSupport/DeviceMotionClientBlackBerry.h:
+        (DeviceMotionClientBlackBerry):
+
 2012-06-13  Robin Cao  <[email protected]>
 
         [BlackBerry] Enable MEDIA_STREAM by default

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.cpp (120223 => 120224)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.cpp	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.cpp	2012-06-13 17:36:59 UTC (rev 120224)
@@ -64,7 +64,7 @@
         m_tracker->suspend();
 }
 
-DeviceMotionData* DeviceMotionClientBlackBerry::currentDeviceMotion() const
+DeviceMotionData* DeviceMotionClientBlackBerry::lastMotion() const
 {
     return m_currentMotion.get();
 }
@@ -81,5 +81,5 @@
     if (!m_controller)
         return;
 
-    m_controller->didChangeDeviceMotion(currentDeviceMotion());
+    m_controller->didChangeDeviceMotion(lastMotion());
 }

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.h (120223 => 120224)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.h	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/DeviceMotionClientBlackBerry.h	2012-06-13 17:36:59 UTC (rev 120224)
@@ -46,7 +46,7 @@
     virtual void setController(DeviceMotionController*);
     virtual void startUpdating();
     virtual void stopUpdating();
-    virtual DeviceMotionData* currentDeviceMotion() const;
+    virtual DeviceMotionData* lastMotion() const;
     virtual void deviceMotionControllerDestroyed();
     virtual void onMotion(const BlackBerry::Platform::DeviceMotionEvent*);
 

Modified: trunk/Source/WebKit/efl/ChangeLog (120223 => 120224)


--- trunk/Source/WebKit/efl/ChangeLog	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-06-13 17:36:59 UTC (rev 120224)
@@ -1,3 +1,18 @@
+2012-06-13  Amy Ousterhout  <[email protected]>
+
+        Rename currentDeviceMotion to lastMotion in DeviceMotionClient
+        https://bugs.webkit.org/show_bug.cgi?id=88854
+
+        Reviewed by Adam Barth.
+
+        Rename the function currentDeviceMotion to lastMotion in DeviceMotionClient.
+        This makes it consistent with the similar function lastOrientation in DeviceOrientationClient.
+
+        * WebCoreSupport/DeviceMotionClientEfl.cpp:
+        (WebCore::DeviceMotionClientEfl::lastMotion):
+        * WebCoreSupport/DeviceMotionClientEfl.h:
+        (DeviceMotionClientEfl):
+
 2012-06-12  Christophe Dumez  <[email protected]>
 
         [EFL] Enable SHADOW_DOM flag

Modified: trunk/Source/WebKit/efl/WebCoreSupport/DeviceMotionClientEfl.cpp (120223 => 120224)


--- trunk/Source/WebKit/efl/WebCoreSupport/DeviceMotionClientEfl.cpp	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebKit/efl/WebCoreSupport/DeviceMotionClientEfl.cpp	2012-06-13 17:36:59 UTC (rev 120224)
@@ -62,7 +62,7 @@
     notImplemented();
 }
 
-DeviceMotionData* DeviceMotionClientEfl::currentDeviceMotion() const
+DeviceMotionData* DeviceMotionClientEfl::lastMotion() const
 {
     notImplemented();
     return 0;

Modified: trunk/Source/WebKit/efl/WebCoreSupport/DeviceMotionClientEfl.h (120223 => 120224)


--- trunk/Source/WebKit/efl/WebCoreSupport/DeviceMotionClientEfl.h	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebKit/efl/WebCoreSupport/DeviceMotionClientEfl.h	2012-06-13 17:36:59 UTC (rev 120224)
@@ -33,7 +33,7 @@
     virtual void setController(DeviceMotionController*);
     virtual void startUpdating();
     virtual void stopUpdating();
-    virtual DeviceMotionData* currentDeviceMotion() const;
+    virtual DeviceMotionData* lastMotion() const;
     virtual void deviceMotionControllerDestroyed();
 
 private:

Modified: trunk/Source/WebKit/gtk/ChangeLog (120223 => 120224)


--- trunk/Source/WebKit/gtk/ChangeLog	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebKit/gtk/ChangeLog	2012-06-13 17:36:59 UTC (rev 120224)
@@ -1,3 +1,18 @@
+2012-06-13  Amy Ousterhout  <[email protected]>
+
+        Rename currentDeviceMotion to lastMotion in DeviceMotionClient
+        https://bugs.webkit.org/show_bug.cgi?id=88854
+
+        Reviewed by Adam Barth.
+
+        Rename the function currentDeviceMotion to lastMotion in DeviceMotionClient.
+        This makes it consistent with the similar function lastOrientation in DeviceOrientationClient.
+
+        * WebCoreSupport/DeviceMotionClientGtk.cpp:
+        (WebKit::DeviceMotionClientGtk::lastMotion):
+        * WebCoreSupport/DeviceMotionClientGtk.h:
+        (DeviceMotionClientGtk):
+
 2012-06-11  Kaustubh Atrawalkar  <[email protected]>
 
         [DRT] LTC:: counterValueForElementById() could be moved to Internals.

Modified: trunk/Source/WebKit/gtk/WebCoreSupport/DeviceMotionClientGtk.cpp (120223 => 120224)


--- trunk/Source/WebKit/gtk/WebCoreSupport/DeviceMotionClientGtk.cpp	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/DeviceMotionClientGtk.cpp	2012-06-13 17:36:59 UTC (rev 120224)
@@ -58,7 +58,7 @@
     notImplemented();
 }
 
-DeviceMotionData* DeviceMotionClientGtk::currentDeviceMotion() const
+DeviceMotionData* DeviceMotionClientGtk::lastMotion() const
 {
     notImplemented();
     return 0;

Modified: trunk/Source/WebKit/gtk/WebCoreSupport/DeviceMotionClientGtk.h (120223 => 120224)


--- trunk/Source/WebKit/gtk/WebCoreSupport/DeviceMotionClientGtk.h	2012-06-13 17:32:56 UTC (rev 120223)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/DeviceMotionClientGtk.h	2012-06-13 17:36:59 UTC (rev 120224)
@@ -34,7 +34,7 @@
     virtual void setController(WebCore::DeviceMotionController*);
     virtual void startUpdating();
     virtual void stopUpdating();
-    virtual WebCore::DeviceMotionData* currentDeviceMotion() const;
+    virtual WebCore::DeviceMotionData* lastMotion() const;
     virtual void deviceMotionControllerDestroyed();
 
 private:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to