Changeset 173946 in webkit


Ignore:
Timestamp:
Sep 24, 2014 9:30:56 PM (10 years ago)
Author:
dbates@webkit.org
Message:

[iOS] Another iOS build fix; workaround for CoreLocation
https://bugs.webkit.org/show_bug.cgi?id=137104
<rdar://problem/18450785>

Rubber-stamped by Benjamin Poulain.

Workaround CoreLocation issue by adding a default statement in -[WebGeolocationCoreLocationProvider requestGeolocationAuthorization]
and -[WebGeolocationCoreLocationProvider locationManager:didChangeAuthorizationStatus:].
We'll remove these default statements once we have the fix for <rdar://problem/18448331>.

  • Misc/WebGeolocationCoreLocationProvider.mm:

(-[WebGeolocationCoreLocationProvider requestGeolocationAuthorization]):
(-[WebGeolocationCoreLocationProvider locationManager:didChangeAuthorizationStatus:]):

Location:
trunk/Source/WebKit/ios
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ios/ChangeLog

    r173940 r173946  
     12014-09-24  Daniel Bates  <dabates@apple.com>
     2
     3        [iOS] Another iOS build fix; workaround for CoreLocation
     4        https://bugs.webkit.org/show_bug.cgi?id=137104
     5        <rdar://problem/18450785>
     6
     7        Rubber-stamped by Benjamin Poulain.
     8
     9        Workaround CoreLocation issue by adding a default statement in -[WebGeolocationCoreLocationProvider requestGeolocationAuthorization]
     10        and -[WebGeolocationCoreLocationProvider locationManager:didChangeAuthorizationStatus:].
     11        We'll remove these default statements once we have the fix for <rdar://problem/18448331>.
     12
     13        * Misc/WebGeolocationCoreLocationProvider.mm:
     14        (-[WebGeolocationCoreLocationProvider requestGeolocationAuthorization]):
     15        (-[WebGeolocationCoreLocationProvider locationManager:didChangeAuthorizationStatus:]):
     16
    1172014-09-24  Daniel Bates  <dabates@apple.com>
    218
  • trunk/Source/WebKit/ios/Misc/WebGeolocationCoreLocationProvider.mm

    r173940 r173946  
    102102    }
    103103
    104     switch ([getCLLocationManagerClass() authorizationStatus]) {
     104    CLAuthorizationStatus authorizationStatus = [getCLLocationManagerClass() authorizationStatus];
     105    switch (authorizationStatus) {
    105106    case kCLAuthorizationStatusNotDetermined: {
    106107        if (!_isWaitingForAuthorization) {
     
    110111        break;
    111112    }
    112 #pragma clang diagnostic push
    113 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    114     case kCLAuthorizationStatusAuthorized:
    115 #pragma clang diagnostic pop
    116113    case kCLAuthorizationStatusAuthorizedAlways:
    117114    case kCLAuthorizationStatusAuthorizedWhenInUse: {
     
    123120        [_positionListener geolocationAuthorizationDenied];
    124121        break;
     122    default: // FIXME: Remove this default statement once we have the fix for <rdar://problem/18448331>.
     123#pragma clang diagnostic push
     124#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     125        if (authorizationStatus == kCLAuthorizationStatusAuthorized) {
     126            [_positionListener geolocationAuthorizationGranted];
     127            break;
     128        }
     129        ASSERT_NOT_REACHED();
     130        break;
     131#pragma clang diagnostic pop
    125132    }
    126133}
     
    163170            [_positionListener geolocationAuthorizationDenied];
    164171            break;
    165 #pragma clang diagnostic push
    166 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    167         case kCLAuthorizationStatusAuthorized:
    168 #pragma clang diagnostic pop
    169172        case kCLAuthorizationStatusAuthorizedAlways:
    170173        case kCLAuthorizationStatusAuthorizedWhenInUse:
     
    172175            [_positionListener geolocationAuthorizationGranted];
    173176            break;
     177        default: // FIXME: Remove this default statement once we have the fix for <rdar://problem/18448331>.
     178#pragma clang diagnostic push
     179#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     180            if (status == kCLAuthorizationStatusAuthorized) {
     181                _isWaitingForAuthorization = NO;
     182                [_positionListener geolocationAuthorizationGranted];
     183                break;
     184            }
     185            ASSERT_NOT_REACHED();
     186            break;
     187#pragma clang diagnostic pop
    174188        }
    175189    } else {
Note: See TracChangeset for help on using the changeset viewer.