Title: [290088] trunk/Source/WebCore
Revision
290088
Author
cdu...@apple.com
Date
2022-02-17 16:14:59 -0800 (Thu, 17 Feb 2022)

Log Message

Pass registrable domain to CoreLocation API
https://bugs.webkit.org/show_bug.cgi?id=236803
<rdar://88761413>

Reviewed by Darin Adler.

Pass registrable domain to CoreLocation API when the Geolocation API is used.
Note that the code is guarded on a CL_HAS_RADAR_88834301 define from CoreLocation
since the initWithWebsiteIdentifier is currently present in the SDK but not
functional.

* platform/cocoa/CoreLocationGeolocationProvider.mm:
(-[WebCLLocationManager initWithWebsiteIdentifier:client:]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (290087 => 290088)


--- trunk/Source/WebCore/ChangeLog	2022-02-18 00:09:11 UTC (rev 290087)
+++ trunk/Source/WebCore/ChangeLog	2022-02-18 00:14:59 UTC (rev 290088)
@@ -1,3 +1,19 @@
+2022-02-17  Chris Dumez  <cdu...@apple.com>
+
+        Pass registrable domain to CoreLocation API
+        https://bugs.webkit.org/show_bug.cgi?id=236803
+        <rdar://88761413>
+
+        Reviewed by Darin Adler.
+
+        Pass registrable domain to CoreLocation API when the Geolocation API is used.
+        Note that the code is guarded on a CL_HAS_RADAR_88834301 define from CoreLocation
+        since the initWithWebsiteIdentifier is currently present in the SDK but not
+        functional.
+
+        * platform/cocoa/CoreLocationGeolocationProvider.mm:
+        (-[WebCLLocationManager initWithWebsiteIdentifier:client:]):
+
 2022-02-17  Cameron McCormack  <hey...@apple.com>
 
         Always use ChildChange::Source::Parser when creating input element UA shadow tree contents

Modified: trunk/Source/WebCore/platform/cocoa/CoreLocationGeolocationProvider.mm (290087 => 290088)


--- trunk/Source/WebCore/platform/cocoa/CoreLocationGeolocationProvider.mm	2022-02-18 00:09:11 UTC (rev 290087)
+++ trunk/Source/WebCore/platform/cocoa/CoreLocationGeolocationProvider.mm	2022-02-18 00:14:59 UTC (rev 290088)
@@ -74,9 +74,14 @@
     if (!self)
         return nil;
 
-    // FIXME: Call initWithWebsiteIdentifier and pass the websiteIdentifier when HAVE(CORE_LOCATION_WEBSITE_IDENTIFIERS) and !websiteIdentifier.isEmpty() once <rdar://88834301> is fixed.
+#if USE(APPLE_INTERNAL_SDK) && HAVE(CORE_LOCATION_WEBSITE_IDENTIFIERS) && defined(CL_HAS_RADAR_88834301)
+    if (!websiteIdentifier.isEmpty())
+        _locationManager = adoptNS([allocCLLocationManagerInstance() initWithWebsiteIdentifier:websiteIdentifier]);
+#else
     UNUSED_PARAM(websiteIdentifier);
-    _locationManager = adoptNS([allocCLLocationManagerInstance() init]);
+#endif
+    if (!_locationManager)
+        _locationManager = adoptNS([allocCLLocationManagerInstance() init]);
     _client = &client;
     _websiteIdentifier = websiteIdentifier;
     [_locationManager setDelegate:self];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to