Changeset 251012 in webkit
- Timestamp:
- Oct 11, 2019, 10:22:28 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/events/touch/ios/long-press-on-image-expected.txt (modified) (1 diff)
-
LayoutTests/fast/events/touch/ios/long-press-on-image.html (modified) (2 diffs)
-
LayoutTests/platform/iphone-7/fast/events/touch/force-press-on-link.html (modified) (2 diffs)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r251009 r251012 1 2019-10-11 Dean Jackson <dino@apple.com> 2 3 REGRESSION: fast/events/touch/ios/long-press-on-image.html is failing 4 https://bugs.webkit.org/show_bug.cgi?id=202845 5 <rdar://51717197> 6 7 Reviewed by Antoine Quint. 8 9 This test failed because images no longer pop up action sheets, but 10 instead use context menus. 11 12 We no longer need to test the actions in the context menu here, since 13 it is covered by the TestWebKitAPI/Tests/WebKitCocoa/ContextMenus test. 14 15 However, we can still use this test to ensure we are getting a 16 context menu on the correct element. 17 18 * fast/events/touch/ios/long-press-on-image-expected.txt: 19 * fast/events/touch/ios/long-press-on-image.html: 20 * platform/iphone-7/fast/events/touch/force-press-on-link.html: This 21 test currently fails and needs to be rewritten (rdar://problem/52699530), 22 but at least update it to use the new data from the Internal API. 23 1 24 2019-10-11 Peng Liu <peng.liu6@apple.com> 2 25 -
trunk/LayoutTests/fast/events/touch/ios/long-press-on-image-expected.txt
r244482 r251012 1 Available Actions: 2 Share… 3 Add to Photos 4 Copy 5 Cancel 6 PASS 1 PASS: context menu triggered on image -
trunk/LayoutTests/fast/events/touch/ios/long-press-on-image.html
r244482 r251012 15 15 (function() { 16 16 uiController.longPressAtPoint(30, 20, function() { 17 uiController.uiScriptComplete(JSON.stringify(uiController.contentsOfUserInterfaceItem(' actionSheet')));17 uiController.uiScriptComplete(JSON.stringify(uiController.contentsOfUserInterfaceItem('contextMenu'))); 18 18 }); 19 19 })();` … … 28 28 if (testRunner.runUIScript) { 29 29 testRunner.runUIScript(getUIScript(), function(result) { 30 var actionDictionary = JSON.parse(result); 31 var actionStrings = actionDictionary.actionSheet; 30 var results = JSON.parse(result).contextMenu; 32 31 var output = ''; 33 if (actionStrings[0] == 'Share…' && actionStrings[1] == 'Add to Photos' && actionStrings[2] == 'Copy' && actionStrings[3] == 'Cancel') { 34 output += 'Available Actions: <br>'; 35 output += actionStrings.join('<br>'); 36 output += '<br>'; 37 output += 'PASS'; 38 } 39 else { 40 output += 'Available Actions: <br>'; 41 output += actionStrings.join('<br>'); 42 output += '<br>'; 43 output += 'FAIL' 44 } 32 if (results.imageURL.includes("dice.png") && results.isImage && !results.isLink) 33 output += 'PASS: context menu triggered on image'; 34 else 35 output += 'FAIL: context menu was not triggered on image'; 45 36 46 37 document.getElementById('target').innerHTML = output; -
trunk/LayoutTests/platform/iphone-7/fast/events/touch/force-press-on-link.html
r240150 r251012 53 53 54 54 uiController.didShowForcePressPreviewCallback = function() { 55 uiController.uiScriptComplete(JSON.stringify(uiController.contentsOfUserInterfaceItem(' linkPreviewPopoverContents')));55 uiController.uiScriptComplete(JSON.stringify(uiController.contentsOfUserInterfaceItem('contextMenu'))); 56 56 }; 57 57 … … 79 79 if (testRunner.runUIScript) { 80 80 testRunner.runUIScript(getUIScript(), function(result) { 81 var uiContentsDictionary = JSON.parse(result); 82 var pageURL = uiContentsDictionary.linkPreviewPopoverContents.pageURL; 83 if (pageURL = 'http://localhost:54321') 81 var results = JSON.parse(result).contextMenu; 82 if (results.url == 'http://localhost:54321' && results.isLink) 84 83 output += 'PASS: correct page loaded in popover'; 85 84 document.getElementById('target').innerHTML = output; -
trunk/Source/WebKit/ChangeLog
r251011 r251012 1 2019-10-11 Dean Jackson <dino@apple.com> 2 3 REGRESSION: fast/events/touch/ios/long-press-on-image.html is failing 4 https://bugs.webkit.org/show_bug.cgi?id=202845 5 6 Reviewed by Antoine Quint. 7 8 Update _contentsOfUserInterfaceItem so that it returns more information 9 on a context menu. 10 11 * UIProcess/ios/WKContentViewInteraction.mm: 12 (-[WKContentView _contentsOfUserInterfaceItem:]): 13 1 14 2019-10-11 Alex Christensen <achristensen@webkit.org> 2 15 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r250876 r251012 7896 7896 7897 7897 #if HAVE(LINK_PREVIEW) 7898 if ([userInterfaceItem isEqualToString:@" linkPreviewPopoverContents"]) {7898 if ([userInterfaceItem isEqualToString:@"contextMenu"]) { 7899 7899 if (self._shouldUseContextMenus) 7900 return @{ userInterfaceItem: @{ @"pageURL": WTF::userVisibleString(_positionInformation.url) } }; 7900 return @{ userInterfaceItem: @{ 7901 @"url": _positionInformation.url.isValid() ? WTF::userVisibleString(_positionInformation.url) : @"", 7902 @"isLink": [NSNumber numberWithBool:_positionInformation.isLink], 7903 @"isImage": [NSNumber numberWithBool:_positionInformation.isImage], 7904 @"imageURL": _positionInformation.imageURL.isValid() ? WTF::userVisibleString(_positionInformation.imageURL) : @"" 7905 } }; 7901 7906 7902 7907 NSString *url = [_previewItemController previewData][UIPreviewDataLink]; 7903 return @{ userInterfaceItem: @{ @"pageURL": url } }; 7908 return @{ userInterfaceItem: @{ 7909 @"url": url, 7910 @"isLink": [NSNumber numberWithBool:_positionInformation.isLink], 7911 @"isImage": [NSNumber numberWithBool:_positionInformation.isImage], 7912 @"imageURL": _positionInformation.imageURL.isValid() ? WTF::userVisibleString(_positionInformation.imageURL) : @"" 7913 } }; 7904 7914 } 7905 7915 #endif
Note:
See TracChangeset
for help on using the changeset viewer.