Title: [260116] trunk/Source/WebKit
- Revision
- 260116
- Author
- [email protected]
- Date
- 2020-04-14 21:13:45 -0700 (Tue, 14 Apr 2020)
Log Message
File Upload Menus presented from odd locations.
https://bugs.webkit.org/show_bug.cgi?id=210523
<rdar://problem/60390846>
Use the existing context menu targeted preview code to ensure that the
file menus are presented in a good location.
Reviewed by Wenson Hsieh.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (260115 => 260116)
--- trunk/Source/WebKit/ChangeLog 2020-04-15 03:10:11 UTC (rev 260115)
+++ trunk/Source/WebKit/ChangeLog 2020-04-15 04:13:45 UTC (rev 260116)
@@ -1,3 +1,18 @@
+2020-04-14 Megan Gardner <[email protected]>
+
+ File Upload Menus presented from odd locations.
+ https://bugs.webkit.org/show_bug.cgi?id=210523
+ <rdar://problem/60390846>
+
+ Use the existing context menu targeted preview code to ensure that the
+ file menus are presented in a good location.
+
+ Reviewed by Wenson Hsieh.
+
+ * UIProcess/ios/WKContentViewInteraction.h:
+ * UIProcess/ios/forms/WKFileUploadPanel.mm:
+ (-[WKFileUploadPanel contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
+
2020-04-14 David Kilzer <[email protected]>
dictionaryValueOfType() in WebCoreArgumentCodersMac.mm can be replaced with dynamic_cf_cast<>()
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (260115 => 260116)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2020-04-15 03:10:11 UTC (rev 260115)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2020-04-15 04:13:45 UTC (rev 260116)
@@ -610,6 +610,7 @@
#else
@interface WKContentView (WKInteractionPreview) <UIPreviewItemDelegate>
#endif
+- (UITargetedPreview *)_createTargetedContextMenuHintPreviewIfPossible;
- (void)_registerPreview;
- (void)_unregisterPreview;
@end
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (260115 => 260116)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-04-15 03:10:11 UTC (rev 260115)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-04-15 04:13:45 UTC (rev 260116)
@@ -9264,6 +9264,9 @@
// and removing the hint container view will cause the animation to break.
if (strongSelf->_contextMenuElementInfo)
return;
+ // We are also using this container for the file upload panel
+ if (strongSelf->_fileUploadPanel)
+ return;
[std::exchange(strongSelf->_contextMenuHintContainerView, nil) removeFromSuperview];
}];
}
Modified: trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm (260115 => 260116)
--- trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm 2020-04-15 03:10:11 UTC (rev 260115)
+++ trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm 2020-04-15 04:13:45 UTC (rev 260116)
@@ -410,11 +410,7 @@
- (UITargetedPreview *)contextMenuInteraction:(UIContextMenuInteraction *)interaction previewForHighlightingMenuWithConfiguration:(UIContextMenuConfiguration *)configuration
{
- RetainPtr<UIPreviewParameters> unusedPreviewParameters = adoptNS([[UIPreviewParameters alloc] init]);
- RetainPtr<UIPreviewTarget> previewTarget = adoptNS([[UIPreviewTarget alloc] initWithContainer:_view.getAutoreleased() center:CGPointMake(_interactionPoint.x, _interactionPoint.y)]);
- RetainPtr<UITargetedPreview> preview = adoptNS([[UITargetedPreview alloc] initWithView:_view.getAutoreleased() parameters:unusedPreviewParameters.get() target:previewTarget.get()]);
-
- return preview.autorelease();
+ return [_view _createTargetedContextMenuHintPreviewIfPossible];
}
- (_UIContextMenuStyle *)_contextMenuInteraction:(UIContextMenuInteraction *)interaction styleForMenuWithConfiguration:(UIContextMenuConfiguration *)configuration
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes