Title: [251012] trunk
- Revision
- 251012
- Author
- [email protected]
- Date
- 2019-10-11 10:22:28 -0700 (Fri, 11 Oct 2019)
Log Message
REGRESSION: fast/events/touch/ios/long-press-on-image.html is failing
https://bugs.webkit.org/show_bug.cgi?id=202845
Source/WebKit:
Reviewed by Antoine Quint.
Update _contentsOfUserInterfaceItem so that it returns more information
on a context menu.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _contentsOfUserInterfaceItem:]):
LayoutTests:
<rdar://51717197>
Reviewed by Antoine Quint.
This test failed because images no longer pop up action sheets, but
instead use context menus.
We no longer need to test the actions in the context menu here, since
it is covered by the TestWebKitAPI/Tests/WebKitCocoa/ContextMenus test.
However, we can still use this test to ensure we are getting a
context menu on the correct element.
* fast/events/touch/ios/long-press-on-image-expected.txt:
* fast/events/touch/ios/long-press-on-image.html:
* platform/iphone-7/fast/events/touch/force-press-on-link.html: This
test currently fails and needs to be rewritten (rdar://problem/52699530),
but at least update it to use the new data from the Internal API.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (251011 => 251012)
--- trunk/LayoutTests/ChangeLog 2019-10-11 16:41:45 UTC (rev 251011)
+++ trunk/LayoutTests/ChangeLog 2019-10-11 17:22:28 UTC (rev 251012)
@@ -1,3 +1,26 @@
+2019-10-11 Dean Jackson <[email protected]>
+
+ REGRESSION: fast/events/touch/ios/long-press-on-image.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=202845
+ <rdar://51717197>
+
+ Reviewed by Antoine Quint.
+
+ This test failed because images no longer pop up action sheets, but
+ instead use context menus.
+
+ We no longer need to test the actions in the context menu here, since
+ it is covered by the TestWebKitAPI/Tests/WebKitCocoa/ContextMenus test.
+
+ However, we can still use this test to ensure we are getting a
+ context menu on the correct element.
+
+ * fast/events/touch/ios/long-press-on-image-expected.txt:
+ * fast/events/touch/ios/long-press-on-image.html:
+ * platform/iphone-7/fast/events/touch/force-press-on-link.html: This
+ test currently fails and needs to be rewritten (rdar://problem/52699530),
+ but at least update it to use the new data from the Internal API.
+
2019-10-11 Peng Liu <[email protected]>
Layout Test media/W3C/audio/events/event_progress.html is flaky
Modified: trunk/LayoutTests/fast/events/touch/ios/long-press-on-image-expected.txt (251011 => 251012)
--- trunk/LayoutTests/fast/events/touch/ios/long-press-on-image-expected.txt 2019-10-11 16:41:45 UTC (rev 251011)
+++ trunk/LayoutTests/fast/events/touch/ios/long-press-on-image-expected.txt 2019-10-11 17:22:28 UTC (rev 251012)
@@ -1,6 +1 @@
-Available Actions:
-Share…
-Add to Photos
-Copy
-Cancel
-PASS
+PASS: context menu triggered on image
Modified: trunk/LayoutTests/fast/events/touch/ios/long-press-on-image.html (251011 => 251012)
--- trunk/LayoutTests/fast/events/touch/ios/long-press-on-image.html 2019-10-11 16:41:45 UTC (rev 251011)
+++ trunk/LayoutTests/fast/events/touch/ios/long-press-on-image.html 2019-10-11 17:22:28 UTC (rev 251012)
@@ -14,7 +14,7 @@
return `
(function() {
uiController.longPressAtPoint(30, 20, function() {
- uiController.uiScriptComplete(JSON.stringify(uiController.contentsOfUserInterfaceItem('actionSheet')));
+ uiController.uiScriptComplete(JSON.stringify(uiController.contentsOfUserInterfaceItem('contextMenu')));
});
})();`
}
@@ -27,21 +27,12 @@
var target = document.getElementById('target');
if (testRunner.runUIScript) {
testRunner.runUIScript(getUIScript(), function(result) {
- var actionDictionary = JSON.parse(result);
- var actionStrings = actionDictionary.actionSheet;
+ var results = JSON.parse(result).contextMenu;
var output = '';
- if (actionStrings[0] == 'Share…' && actionStrings[1] == 'Add to Photos' && actionStrings[2] == 'Copy' && actionStrings[3] == 'Cancel') {
- output += 'Available Actions: <br>';
- output += actionStrings.join('<br>');
- output += '<br>';
- output += 'PASS';
- }
- else {
- output += 'Available Actions: <br>';
- output += actionStrings.join('<br>');
- output += '<br>';
- output += 'FAIL'
- }
+ if (results.imageURL.includes("dice.png") && results.isImage && !results.isLink)
+ output += 'PASS: context menu triggered on image';
+ else
+ output += 'FAIL: context menu was not triggered on image';
document.getElementById('target').innerHTML = output;
testRunner.notifyDone();
Modified: trunk/LayoutTests/platform/iphone-7/fast/events/touch/force-press-on-link.html (251011 => 251012)
--- trunk/LayoutTests/platform/iphone-7/fast/events/touch/force-press-on-link.html 2019-10-11 16:41:45 UTC (rev 251011)
+++ trunk/LayoutTests/platform/iphone-7/fast/events/touch/force-press-on-link.html 2019-10-11 17:22:28 UTC (rev 251012)
@@ -52,7 +52,7 @@
uiController.sendEventStream(JSON.stringify(eventStream), function() {});
uiController.didShowForcePressPreviewCallback = function() {
- uiController.uiScriptComplete(JSON.stringify(uiController.contentsOfUserInterfaceItem('linkPreviewPopoverContents')));
+ uiController.uiScriptComplete(JSON.stringify(uiController.contentsOfUserInterfaceItem('contextMenu')));
};
})();`
@@ -78,9 +78,8 @@
if (testRunner.runUIScript) {
testRunner.runUIScript(getUIScript(), function(result) {
- var uiContentsDictionary = JSON.parse(result);
- var pageURL = uiContentsDictionary.linkPreviewPopoverContents.pageURL;
- if (pageURL = 'http://localhost:54321')
+ var results = JSON.parse(result).contextMenu;
+ if (results.url == 'http://localhost:54321' && results.isLink)
output += 'PASS: correct page loaded in popover';
document.getElementById('target').innerHTML = output;
Modified: trunk/Source/WebKit/ChangeLog (251011 => 251012)
--- trunk/Source/WebKit/ChangeLog 2019-10-11 16:41:45 UTC (rev 251011)
+++ trunk/Source/WebKit/ChangeLog 2019-10-11 17:22:28 UTC (rev 251012)
@@ -1,3 +1,16 @@
+2019-10-11 Dean Jackson <[email protected]>
+
+ REGRESSION: fast/events/touch/ios/long-press-on-image.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=202845
+
+ Reviewed by Antoine Quint.
+
+ Update _contentsOfUserInterfaceItem so that it returns more information
+ on a context menu.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView _contentsOfUserInterfaceItem:]):
+
2019-10-11 Alex Christensen <[email protected]>
Use sendWithAsyncReply for cookie getting/clearing functions
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (251011 => 251012)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-10-11 16:41:45 UTC (rev 251011)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-10-11 17:22:28 UTC (rev 251012)
@@ -7895,12 +7895,22 @@
return @{ userInterfaceItem: [_actionSheetAssistant currentAvailableActionTitles] };
#if HAVE(LINK_PREVIEW)
- if ([userInterfaceItem isEqualToString:@"linkPreviewPopoverContents"]) {
+ if ([userInterfaceItem isEqualToString:@"contextMenu"]) {
if (self._shouldUseContextMenus)
- return @{ userInterfaceItem: @{ @"pageURL": WTF::userVisibleString(_positionInformation.url) } };
+ return @{ userInterfaceItem: @{
+ @"url": _positionInformation.url.isValid() ? WTF::userVisibleString(_positionInformation.url) : @"",
+ @"isLink": [NSNumber numberWithBool:_positionInformation.isLink],
+ @"isImage": [NSNumber numberWithBool:_positionInformation.isImage],
+ @"imageURL": _positionInformation.imageURL.isValid() ? WTF::userVisibleString(_positionInformation.imageURL) : @""
+ } };
NSString *url = "" previewData][UIPreviewDataLink];
- return @{ userInterfaceItem: @{ @"pageURL": url } };
+ return @{ userInterfaceItem: @{
+ @"url": url,
+ @"isLink": [NSNumber numberWithBool:_positionInformation.isLink],
+ @"isImage": [NSNumber numberWithBool:_positionInformation.isImage],
+ @"imageURL": _positionInformation.imageURL.isValid() ? WTF::userVisibleString(_positionInformation.imageURL) : @""
+ } };
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes