Changeset 238614 in webkit


Ignore:
Timestamp:
Nov 28, 2018, 9:19:39 AM (6 years ago)
Author:
ap@apple.com
Message:

Modernize version checks for same site cookie support
https://bugs.webkit.org/show_bug.cgi?id=192054

Reviewed by Tim Horton.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::updateTaskWithFirstPartyForSameSiteCookies):

Also removed runtime checks, which are no longer relevant.

Source/WTF:

  • wtf/Platform.h:
Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r238567 r238614  
     12018-11-28  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Modernize version checks for same site cookie support
     4        https://bugs.webkit.org/show_bug.cgi?id=192054
     5
     6        Reviewed by Tim Horton.
     7
     8        * wtf/Platform.h:
     9
    1102018-11-27  Alexey Proskuryakov  <ap@apple.com>
    211
  • trunk/Source/WTF/wtf/Platform.h

    r238567 r238614  
    13811381#define HAVE_FOUNDATION_WITH_SAVE_COOKIES_WITH_COMPLETION_HANDLER 1
    13821382#endif
     1383
     1384/* FIXME: Should this be enabled for IOS_FAMILY, not just IOS? */
     1385#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || PLATFORM(IOS)
     1386#define HAVE_FOUNDATION_WITH_SAME_SITE_COOKIE_SUPPORT 1
     1387#endif
  • trunk/Source/WebCore/PAL/ChangeLog

    r238597 r238614  
     12018-11-28  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Modernize version checks for same site cookie support
     4        https://bugs.webkit.org/show_bug.cgi?id=192054
     5
     6        Reviewed by Tim Horton.
     7
     8        * pal/spi/cf/CFNetworkSPI.h:
     9
    1102018-11-27  Mark Lam  <mark.lam@apple.com>
    211
  • trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h

    r238567 r238614  
    207207@property (readwrite, copy) NSString *_pathToDownloadTaskFile;
    208208@property (copy) NSString *_storagePartitionIdentifier;
     209#if HAVE(FOUNDATION_WITH_SAME_SITE_COOKIE_SUPPORT)
    209210@property (nullable, readwrite, retain) NSURL *_siteForCookies;
    210211@property (readwrite) BOOL _isTopLevelNavigation;
     212#endif
    211213#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
    212214@property (nonatomic, assign) BOOL _preconnect;
  • trunk/Source/WebKit/ChangeLog

    r238597 r238614  
     12018-11-28  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Modernize version checks for same site cookie support
     4        https://bugs.webkit.org/show_bug.cgi?id=192054
     5
     6        Reviewed by Tim Horton.
     7
     8        * NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::updateTaskWithFirstPartyForSameSiteCookies):
     9        Also removed runtime checks, which are no longer relevant.
     10
    1112018-11-27  Mark Lam  <mark.lam@apple.com>
    212
  • trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm

    r237607 r238614  
    153153    if (request.isSameSiteUnspecified())
    154154        return;
    155 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000)
     155#if HAVE(FOUNDATION_WITH_SAME_SITE_COOKIE_SUPPORT)
    156156    static NSURL *emptyURL = [[NSURL alloc] initWithString:@""];
    157     if ([task respondsToSelector:@selector(set_siteForCookies:)])
    158         task._siteForCookies = request.isSameSite() ? task.currentRequest.URL : emptyURL;
    159     if ([task respondsToSelector:@selector(set_isTopLevelNavigation:)])
    160         task._isTopLevelNavigation = request.isTopSite();
     157    task._siteForCookies = request.isSameSite() ? task.currentRequest.URL : emptyURL;
     158    task._isTopLevelNavigation = request.isTopSite();
    161159#else
    162160    UNUSED_PARAM(task);
Note: See TracChangeset for help on using the changeset viewer.