Commit 6c47dde7 authored by Ewann's avatar Ewann Committed by Commit Bot

[iOS][ContextMenus] Fixes ContentSuggestions preview

This CL fixes the dismissal animation of most visited tiles.
Most Visited tile appears blank for a moment switching from incognito to
normal tab after opening the link in a new incognito tab from context
menu because there was no preview configured.
To fix this, the view of the ContentSuggestionsViewController is used as
a preview.

see: https://drive.google.com/drive/folders/1EZFa-TvlJRsqVp6mwMBz0H7e6EZL0c7e?usp=sharing

Bug: 1117487
Change-Id: I1d80592e566c92cdd3b9846e74a4af53d697ee47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2526086Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Ewann Pellé <ewannpv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825349}
parent b12f3739
......@@ -495,6 +495,14 @@ NSString* const kContentSuggestionsMostVisitedAccessibilityIdentifierPrefix =
return cell;
}
- (UITargetedPreview*)collectionView:(UICollectionView*)collectionView
previewForDismissingContextMenuWithConfiguration:
(UIContextMenuConfiguration*)configuration API_AVAILABLE(ios(13.0)) {
UITargetedPreview* preview =
[[UITargetedPreview alloc] initWithView:self.view];
return preview;
}
- (UIContextMenuConfiguration*)collectionView:(UICollectionView*)collectionView
contextMenuConfigurationForItemAtIndexPath:(NSIndexPath*)indexPath
point:(CGPoint)point
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment