Title: [112592] trunk/Source/WebCore
Revision
112592
Author
[email protected]
Date
2012-03-29 15:45:49 -0700 (Thu, 29 Mar 2012)

Log Message

Get rid of Geolocation::positionChangedInternal(), use positionChanged() directly
https://bugs.webkit.org/show_bug.cgi?id=82543

Patch by Benjamin Poulain <[email protected]> on 2012-03-29
Reviewed by Andreas Kling.

After the change to client based geolocation, the method positionChangedInternal()
is called only by positionChanged(). This patch remove this extra indirection.

* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::positionChanged):
* Modules/geolocation/Geolocation.h:
(Geolocation):
* WebCore.order:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (112591 => 112592)


--- trunk/Source/WebCore/ChangeLog	2012-03-29 22:44:38 UTC (rev 112591)
+++ trunk/Source/WebCore/ChangeLog	2012-03-29 22:45:49 UTC (rev 112592)
@@ -1,3 +1,19 @@
+2012-03-29  Benjamin Poulain  <[email protected]>
+
+        Get rid of Geolocation::positionChangedInternal(), use positionChanged() directly
+        https://bugs.webkit.org/show_bug.cgi?id=82543
+
+        Reviewed by Andreas Kling.
+
+        After the change to client based geolocation, the method positionChangedInternal()
+        is called only by positionChanged(). This patch remove this extra indirection.
+
+        * Modules/geolocation/Geolocation.cpp:
+        (WebCore::Geolocation::positionChanged):
+        * Modules/geolocation/Geolocation.h:
+        (Geolocation):
+        * WebCore.order:
+
 2012-03-29  Joseph Pecoraro  <[email protected]>
 
         InputType attribute changed functions should happen after the attribute change

Modified: trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp (112591 => 112592)


--- trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp	2012-03-29 22:44:38 UTC (rev 112591)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp	2012-03-29 22:45:49 UTC (rev 112592)
@@ -617,25 +617,6 @@
     page->geolocationController()->requestPermission(this);
 }
 
-void Geolocation::positionChangedInternal()
-{
-    m_cachedPosition = lastPosition();
-
-    // Stop all currently running timers.
-    stopTimers();
-
-    if (!isAllowed()) {
-        // requestPermission() will ask the chrome for permission. This may be
-        // implemented synchronously or asynchronously. In both cases,
-        // makeSuccessCallbacks() will be called if permission is granted, so
-        // there's nothing more to do here.
-        requestPermission();
-        return;
-    }
-
-    makeSuccessCallbacks();
-}
-
 void Geolocation::makeSuccessCallbacks()
 {
     ASSERT(lastPosition());
@@ -661,7 +642,21 @@
 
 void Geolocation::positionChanged()
 {
-    positionChangedInternal();
+    m_cachedPosition = lastPosition();
+
+    // Stop all currently running timers.
+    stopTimers();
+
+    if (!isAllowed()) {
+        // requestPermission() will ask the chrome for permission. This may be
+        // implemented synchronously or asynchronously. In both cases,
+        // makeSuccessCallbacks() will be called if permission is granted, so
+        // there's nothing more to do here.
+        requestPermission();
+        return;
+    }
+
+    makeSuccessCallbacks();
 }
 
 void Geolocation::setError(GeolocationError* error)

Modified: trunk/Source/WebCore/Modules/geolocation/Geolocation.h (112591 => 112592)


--- trunk/Source/WebCore/Modules/geolocation/Geolocation.h	2012-03-29 22:44:38 UTC (rev 112591)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.h	2012-03-29 22:45:49 UTC (rev 112592)
@@ -141,7 +141,6 @@
     void cancelRequests(GeoNotifierVector&);
     void cancelAllRequests();
 
-    void positionChangedInternal();
     void makeSuccessCallbacks();
     void handleError(PositionError*);
 

Modified: trunk/Source/WebCore/WebCore.order (112591 => 112592)


--- trunk/Source/WebCore/WebCore.order	2012-03-29 22:44:38 UTC (rev 112591)
+++ trunk/Source/WebCore/WebCore.order	2012-03-29 22:45:49 UTC (rev 112592)
@@ -23579,7 +23579,6 @@
 __ZN3WTF12copyToVectorINS_6RefPtrIN7WebCore11GeolocationEEENS_7PtrHashIS4_EENS_10HashTraitsIS4_EENS_6VectorIS4_Lm0EEEEEvRKNS_7HashSetIT_T0_T1_EERT2_
 __ZN3WTF6VectorINS_6RefPtrIN7WebCore11GeolocationEEELm0EE14expandCapacityEm
 __ZN7WebCore11Geolocation15positionChangedEv
-__ZN7WebCore11Geolocation23positionChangedInternalEv
 __ZN7WebCore11Geolocation12lastPositionEv
 __ZN7WebCore21GeolocationController12lastPositionEv
 __ZN7WebCore11Geolocation21stopTimersForOneShotsEv
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to