Changeset 249681 in webkit


Ignore:
Timestamp:
Sep 9, 2019 6:01:45 PM (5 years ago)
Author:
timothy_horton@apple.com
Message:

Clarify some macCatalyst feature flags
https://bugs.webkit.org/show_bug.cgi?id=201619
<rdar://problem/54615618>

Reviewed by Megan Gardner.

Source/WebKit:

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView _showShareSheet:inRect:completionHandler:]):
We prefer specific flags over platform checks.

Source/WTF:

  • wtf/Platform.h:

We prefer specific flags over platform checks.

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r249628 r249681  
     12019-09-09  Tim Horton  <timothy_horton@apple.com>
     2
     3        Clarify some macCatalyst feature flags
     4        https://bugs.webkit.org/show_bug.cgi?id=201619
     5        <rdar://problem/54615618>
     6
     7        Reviewed by Megan Gardner.
     8
     9        * wtf/Platform.h:
     10        We prefer specific flags over platform checks.
     11
    1122019-09-07  David Quesada  <david_quesada@apple.com>
    213
  • trunk/Source/WTF/wtf/Platform.h

    r249343 r249681  
    15561556#if PLATFORM(MACCATALYST)
    15571557#define ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING 1
     1558#define HAVE_HOVER_GESTURE_RECOGNIZER 1
    15581559#endif
    15591560
  • trunk/Source/WebKit/ChangeLog

    r249675 r249681  
     12019-09-09  Tim Horton  <timothy_horton@apple.com>
     2
     3        Clarify some macCatalyst feature flags
     4        https://bugs.webkit.org/show_bug.cgi?id=201619
     5        <rdar://problem/54615618>
     6
     7        Reviewed by Megan Gardner.
     8
     9        * UIProcess/ios/WKContentViewInteraction.h:
     10        * UIProcess/ios/WKContentViewInteraction.mm:
     11        (-[WKContentView setupInteraction]):
     12        (-[WKContentView cleanupInteraction]):
     13        (-[WKContentView _removeDefaultGestureRecognizers]):
     14        (-[WKContentView _addDefaultGestureRecognizers]):
     15        (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
     16        (-[WKContentView _showShareSheet:inRect:completionHandler:]):
     17        We prefer specific flags over platform checks.
     18
    1192019-09-09  Chris Dumez  <cdumez@apple.com>
    220
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h

    r249368 r249681  
    229229
    230230#if PLATFORM(MACCATALYST)
     231    RetainPtr<_UILookupGestureRecognizer> _lookupGestureRecognizer;
     232#endif
     233
     234#if HAVE(HOVER_GESTURE_RECOGNIZER)
    231235    RetainPtr<UIHoverGestureRecognizer> _hoverGestureRecognizer;
    232     RetainPtr<_UILookupGestureRecognizer> _lookupGestureRecognizer;
    233236    CGPoint _lastHoverLocation;
    234237#endif
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r249514 r249681  
    129129
    130130#if PLATFORM(MACCATALYST)
     131#import <UIKit/_UILookupGestureRecognizer.h>
     132#endif
     133
     134#if HAVE(HOVER_GESTURE_RECOGNIZER)
    131135#import "NativeWebMouseEvent.h"
    132136#import <UIKit/UIHoverGestureRecognizer.h>
    133 #import <UIKit/_UILookupGestureRecognizer.h>
    134137#endif
    135138
     
    718721    [self addGestureRecognizer:_touchEventGestureRecognizer.get()];
    719722
    720 #if PLATFORM(MACCATALYST)
     723#if HAVE(HOVER_GESTURE_RECOGNIZER)
    721724    _hoverGestureRecognizer = adoptNS([[UIHoverGestureRecognizer alloc] initWithTarget:self action:@selector(_hoverGestureRecognizerChanged:)]);
    722725    [_hoverGestureRecognizer setDelegate:self];
    723726    [self addGestureRecognizer:_hoverGestureRecognizer.get()];
    724    
     727#endif
     728
     729#if PLATFORM(MACCATALYST)   
    725730    _lookupGestureRecognizer = adoptNS([[_UILookupGestureRecognizer alloc] initWithTarget:self action:@selector(_lookupGestureRecognized:)]);
    726731    [_lookupGestureRecognizer setDelegate:self];
     
    868873    [self removeGestureRecognizer:_touchEventGestureRecognizer.get()];
    869874
    870 #if PLATFORM(MACCATALYST)
     875#if HAVE(HOVER_GESTURE_RECOGNIZER)
    871876    [_hoverGestureRecognizer setDelegate:nil];
    872877    [self removeGestureRecognizer:_hoverGestureRecognizer.get()];
    873    
     878#endif
     879
     880#if PLATFORM(MACCATALYST)   
    874881    [_lookupGestureRecognizer setDelegate:nil];
    875882    [self removeGestureRecognizer:_lookupGestureRecognizer.get()];
     
    979986    [self removeGestureRecognizer:_twoFingerSingleTapGestureRecognizer.get()];
    980987    [self removeGestureRecognizer:_stylusSingleTapGestureRecognizer.get()];
     988#if HAVE(HOVER_GESTURE_RECOGNIZER)
     989    [self removeGestureRecognizer:_hoverGestureRecognizer.get()];
     990#endif
    981991#if PLATFORM(MACCATALYST)
    982     [self removeGestureRecognizer:_hoverGestureRecognizer.get()];
    983992    [self removeGestureRecognizer:_lookupGestureRecognizer.get()];
    984993#endif
     
    9991008    [self addGestureRecognizer:_twoFingerSingleTapGestureRecognizer.get()];
    10001009    [self addGestureRecognizer:_stylusSingleTapGestureRecognizer.get()];
     1010#if HAVE(HOVER_GESTURE_RECOGNIZER)
     1011    [self addGestureRecognizer:_hoverGestureRecognizer.get()];
     1012#endif
    10011013#if PLATFORM(MACCATALYST)
    1002     [self addGestureRecognizer:_hoverGestureRecognizer.get()];
    10031014    [self addGestureRecognizer:_lookupGestureRecognizer.get()];
    10041015#endif
     
    18821893        return YES;
    18831894
     1895#if HAVE(HOVER_GESTURE_RECOGNIZER)
     1896    if ([gestureRecognizer isKindOfClass:[UIHoverGestureRecognizer class]] || [otherGestureRecognizer isKindOfClass:[UIHoverGestureRecognizer class]])
     1897        return YES;
     1898#endif
     1899
    18841900#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000
    18851901#if PLATFORM(MACCATALYST)
     
    18901906        return YES;
    18911907
    1892     if ([gestureRecognizer isKindOfClass:[UIHoverGestureRecognizer class]] || [otherGestureRecognizer isKindOfClass:[UIHoverGestureRecognizer class]])
    1893         return YES;
    1894    
    18951908    if (([gestureRecognizer isKindOfClass:[_UILookupGestureRecognizer class]] && [otherGestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]]) || ([otherGestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]] && [gestureRecognizer isKindOfClass:[_UILookupGestureRecognizer class]]))
    18961909        return YES;
    1897 
    18981910#endif
    18991911    if (isSamePair(gestureRecognizer, otherGestureRecognizer, _highlightLongPressGestureRecognizer.get(), _textSelectionAssistant.get().forcePressGesture))
     
    62276239    [_shareSheet setDelegate:self];
    62286240
    6229 #if PLATFORM(MACCATALYST)
     6241#if HAVE(HOVER_GESTURE_RECOGNIZER)
    62306242    if (!rect) {
    62316243        auto hoverLocationInWebView = [self convertPoint:_lastHoverLocation toView:_webView];
     
    75157527    _page->performDictionaryLookupAtLocation(WebCore::FloatPoint(locationInViewCoordinates));
    75167528}
    7517 
     7529#endif
     7530
     7531#if HAVE(HOVER_GESTURE_RECOGNIZER)
    75187532static WebEventFlags webEventFlagsForUIKeyModifierFlags(UIKeyModifierFlags flags)
    75197533{
Note: See TracChangeset for help on using the changeset viewer.