Title: [110604] trunk/Source/WebKit/qt
Revision
110604
Author
[email protected]
Date
2012-03-13 14:06:44 -0700 (Tue, 13 Mar 2012)

Log Message

Attempt to fix QtMinimal bot after r110595

Blind fix, unreviewed.

Patch by Benjamin Poulain <[email protected]> on 2012-03-13

* Api/qwebpage.cpp:
(QWebPagePrivate::QWebPagePrivate):
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::resetGeolocationMock):
(DumpRenderTreeSupportQt::setMockGeolocationPermission):
(DumpRenderTreeSupportQt::setMockGeolocationPosition):
(DumpRenderTreeSupportQt::setMockGeolocationError):
(DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests):
* WebCoreSupport/GeolocationPermissionClientQt.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/qt/Api/qwebpage.cpp (110603 => 110604)


--- trunk/Source/WebKit/qt/Api/qwebpage.cpp	2012-03-13 21:03:09 UTC (rev 110603)
+++ trunk/Source/WebKit/qt/Api/qwebpage.cpp	2012-03-13 21:06:44 UTC (rev 110604)
@@ -322,10 +322,12 @@
     pageClients.editorClient = new EditorClientQt(q);
     pageClients.dragClient = new DragClientQt(q);
     pageClients.inspectorClient = new InspectorClientQt(q);
+#if ENABLE(GEOLOCATION)
     if (useMock)
         pageClients.geolocationClient = new GeolocationClientMock;
     else
         pageClients.geolocationClient = new GeolocationClientQt(q);
+#endif
     page = new Page(pageClients);
 #if ENABLE(DEVICE_ORIENTATION)
     if (useMock)
@@ -346,8 +348,10 @@
     page->setGroupName("Default Group");
 
     // In case running in DumpRenderTree mode set the controller to mock provider.
+#if ENABLE(GEOLOCATION)
     if (QWebPagePrivate::drtRun)
         static_cast<GeolocationClientMock*>(pageClients.geolocationClient)->setController(page->geolocationController());
+#endif
     settings = new QWebSettings(page->settings());
 
     history.d = new QWebHistoryPrivate(static_cast<WebCore::BackForwardListImpl*>(page->backForwardList()));

Modified: trunk/Source/WebKit/qt/ChangeLog (110603 => 110604)


--- trunk/Source/WebKit/qt/ChangeLog	2012-03-13 21:03:09 UTC (rev 110603)
+++ trunk/Source/WebKit/qt/ChangeLog	2012-03-13 21:06:44 UTC (rev 110604)
@@ -1,3 +1,19 @@
+2012-03-13  Benjamin Poulain  <[email protected]>
+
+        Attempt to fix QtMinimal bot after r110595
+
+        Blind fix, unreviewed.
+
+        * Api/qwebpage.cpp:
+        (QWebPagePrivate::QWebPagePrivate):
+        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+        (DumpRenderTreeSupportQt::resetGeolocationMock):
+        (DumpRenderTreeSupportQt::setMockGeolocationPermission):
+        (DumpRenderTreeSupportQt::setMockGeolocationPosition):
+        (DumpRenderTreeSupportQt::setMockGeolocationError):
+        (DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests):
+        * WebCoreSupport/GeolocationPermissionClientQt.h:
+
 2012-03-13  Adam Barth  <[email protected]> && Benjamin Poulain  <[email protected]>
 
         Always enable ENABLE(CLIENT_BASED_GEOLOCATION)

Modified: trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp (110603 => 110604)


--- trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp	2012-03-13 21:03:09 UTC (rev 110603)
+++ trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp	2012-03-13 21:06:44 UTC (rev 110604)
@@ -105,11 +105,13 @@
 
 QMap<int, QWebScriptWorld*> m_worldMap;
 
+#if ENABLE(GEOLOCATION)
 GeolocationClientMock* toGeolocationClientMock(GeolocationClient* client)
 {
      ASSERT(QWebPagePrivate::drtRun);
      return static_cast<GeolocationClientMock*>(client);
 }
+#endif
 
 #if ENABLE(DEVICE_ORIENTATION)
 DeviceOrientationClientMock* toDeviceOrientationClientMock(DeviceOrientationClient* client)
@@ -836,27 +838,34 @@
 
 void DumpRenderTreeSupportQt::resetGeolocationMock(QWebPage* page)
 {
+#if ENABLE(GEOLOCATION)
     Page* corePage = QWebPagePrivate::core(page);
     GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client());
     mockClient->reset();
+#endif
 }
 
 void DumpRenderTreeSupportQt::setMockGeolocationPermission(QWebPage* page, bool allowed)
 {
+#if ENABLE(GEOLOCATION)
     Page* corePage = QWebPagePrivate::core(page);
     GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client());
     mockClient->setPermission(allowed);
+#endif
 }
 
 void DumpRenderTreeSupportQt::setMockGeolocationPosition(QWebPage* page, double latitude, double longitude, double accuracy)
 {
+#if ENABLE(GEOLOCATION)
     Page* corePage = QWebPagePrivate::core(page);
     GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client());
     mockClient->setPosition(GeolocationPosition::create(currentTime(), latitude, longitude, accuracy));
+#endif
 }
 
 void DumpRenderTreeSupportQt::setMockGeolocationError(QWebPage* page, int errorCode, const QString& message)
 {
+#if ENABLE(GEOLOCATION)
     Page* corePage = QWebPagePrivate::core(page);
 
     GeolocationError::ErrorCode code = GeolocationError::PositionUnavailable;
@@ -871,13 +880,18 @@
 
     GeolocationClientMock* mockClient = static_cast<GeolocationClientMock*>(corePage->geolocationController()->client());
     mockClient->setError(GeolocationError::create(code, message));
+#endif
 }
 
 int DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests(QWebPage* page)
 {
+#if ENABLE(GEOLOCATION)
     Page* corePage = QWebPagePrivate::core(page);
     GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client());
     return mockClient->numberOfPendingPermissionRequests();
+#else
+    return -1;
+#endif
 }
 
 bool DumpRenderTreeSupportQt::isTargetItem(const QWebHistoryItem& historyItem)

Modified: trunk/Source/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h (110603 => 110604)


--- trunk/Source/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h	2012-03-13 21:03:09 UTC (rev 110603)
+++ trunk/Source/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h	2012-03-13 21:06:44 UTC (rev 110604)
@@ -31,6 +31,8 @@
 #ifndef GeolocationPermissionClientQt_h
 #define GeolocationPermissionClientQt_h
 
+#if ENABLE(GEOLOCATION)
+
 #include "Geolocation.h"
 #include "qwebpage.h"
 
@@ -57,4 +59,6 @@
 
 }
 
+#endif // ENABLE(GEOLOCATION)
+
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to