Changeset 188296 in webkit


Ignore:
Timestamp:
Aug 11, 2015, 2:26:08 PM (10 years ago)
Author:
matthew_hanson@apple.com
Message:

Merge r188285. rdar://problem/22206433

Location:
branches/safari-601.1.46-branch/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog

    r188235 r188296  
     12015-08-11  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r188285. rdar://problem/22206433
     4
     5    2015-08-11  Beth Dakin  <bdakin@apple.com>
     6
     7            REGRESSION (r188053): Sometimes unable to save an image from Google Search/
     8            imgur via long press
     9            https://bugs.webkit.org/show_bug.cgi?id=147896
     10
     11            Reviewed by Enrica Casucci.
     12
     13            http://trac.webkit.org/changeset/188053 added code to call cleanupSheet when
     14            the long press gesture is cancelled. However, the gesture will be called with
     15            the cancelled state when then user taps an item in the action sheet (such as
     16            “save image”), and sometimes the “cancel” comes in before the image has been
     17            saved. That is a problem because we need to avoid cleaning up the sheet until
     18            after the image is saved. Before that patch, we never cleaned up the sheet on
     19            cancel, so this patch goes back to that behavior. We also have to remove some
     20            assertions that assume that everything will be totally cleaned up when a new
     21            sheet is created, but that is not necessarily true due to interactions
     22            between the preview gesture and the long press gesture.
     23
     24            Remove assertions.
     25            * UIProcess/ios/WKActionSheetAssistant.mm:
     26            (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
     27            (-[WKActionSheetAssistant showImageSheet]):
     28            (-[WKActionSheetAssistant showLinkSheet]):
     29            (-[WKActionSheetAssistant showDataDetectorsSheet]):
     30
     31            Revert the part of Enrica’s patch that called cleanupSheet when the gesture
     32            is cancelled.
     33            * UIProcess/ios/WKContentViewInteraction.mm:
     34            (-[WKContentView _longPressRecognized:]):
     35
    1362015-08-10  Babak Shafiei  <bshafiei@apple.com>
    237
  • branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm

    r186734 r188296  
    207207- (void)_createSheetWithElementActions:(NSArray *)actions showLinkTitle:(BOOL)showLinkTitle
    208208{
    209     ASSERT(!_interactionSheet);
    210209    auto delegate = _delegate.get();
    211210    if (!delegate)
     
    264263- (void)showImageSheet
    265264{
    266     ASSERT(!_interactionSheet);
    267265    ASSERT(!_elementInfo);
    268266
     
    374372- (void)showLinkSheet
    375373{
    376     ASSERT(!_interactionSheet);
    377374    ASSERT(!_elementInfo);
    378375
     
    407404- (void)showDataDetectorsSheet
    408405{
    409     ASSERT(!_interactionSheet);
    410 
    411406    auto delegate = _delegate.get();
    412407    if (!delegate)
  • branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm

    r188197 r188296  
    10871087    _lastInteractionLocation = gestureRecognizer.startPoint;
    10881088
    1089     switch ([gestureRecognizer state]) {
    1090     case UIGestureRecognizerStateBegan:
    1091     {
     1089    if ([gestureRecognizer state] == UIGestureRecognizerStateBegan) {
    10921090        SEL action = [self _actionForLongPress];
    10931091        if (action) {
     
    10951093            [self _cancelLongPressGestureRecognizer];
    10961094        }
    1097     }
    1098         break;
    1099     case UIGestureRecognizerStateCancelled:
    1100         [_actionSheetAssistant cleanupSheet];
    1101         break;
    1102     default:
    1103         break;
    11041095    }
    11051096}
Note: See TracChangeset for help on using the changeset viewer.