WebKit Bugzilla
Attachment 372965 Details for
Bug 199243
: [iPadOS] Fix another crash in -[UIPreviewTarget initWithContainer:center:transform:] when generating a fallback targeted preview
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199243-20190626163159.patch (text/plain), 3.74 KB, created by
Wenson Hsieh
on 2019-06-26 16:31:59 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2019-06-26 16:31:59 PDT
Size:
3.74 KB
patch
obsolete
>Subversion Revision: 246826 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 35dfd3a541e43025f45ddf0278441b67e21a71df..a1b050a52b2c9207c48f83a9fb0993ad3e3d09b0 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,23 @@ >+2019-06-26 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iPadOS] Fix another crash in -[UIPreviewTarget initWithContainer:center:transform:] when generating a fallback targeted preview >+ https://bugs.webkit.org/show_bug.cgi?id=199243 >+ <rdar://problem/51554509> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Additionally make createFallbackTargetedPreview robust in the case where the content view is unparented, and >+ rename _ensureTargetedPreview to _createTargetedPreviewIfPossible, to reflect the fact that it may now return >+ nil. >+ >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (createTargetedPreview): >+ (createFallbackTargetedPreview): >+ (-[WKContentView _createTargetedPreviewIfPossible]): >+ (-[WKContentView contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]): >+ (-[WKContentView contextMenuInteraction:previewForDismissingMenuWithConfiguration:]): >+ (-[WKContentView _ensureTargetedPreview]): Deleted. >+ > 2019-06-26 Wenson Hsieh <wenson_hsieh@apple.com> > > [iPadOS] eddm.usps.com scrolls horizontally due to explicit width set in viewport meta tag >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index 06cce9cc3339853275271a351900c43e4f48ddbc..1779bb1d2035222b3a9eddd0920e0bc93011becb 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -7921,6 +7921,9 @@ static RetainPtr<UITargetedPreview> createTargetedPreview(UIImage *image, UIView > > static RetainPtr<UITargetedPreview> createFallbackTargetedPreview(UIView *rootView, UIView *containerView, const WebCore::FloatRect& frameInRootViewCoordinates) > { >+ if (!containerView.window) >+ return nil; >+ > auto parameters = adoptNS([[UIPreviewParameters alloc] init]); > UIView *snapshotView = [rootView resizableSnapshotViewFromRect:frameInRootViewCoordinates afterScreenUpdates:NO withCapInsets:UIEdgeInsetsZero]; > >@@ -7933,7 +7936,7 @@ static RetainPtr<UITargetedPreview> createFallbackTargetedPreview(UIView *rootVi > return adoptNS([[UITargetedPreview alloc] initWithView:snapshotView parameters:parameters.get() target:target.get()]); > } > >-- (UITargetedPreview *)_ensureTargetedPreview >+- (UITargetedPreview *)_createTargetedPreviewIfPossible > { > if (_contextMenuInteractionTargetedPreview) > return _contextMenuInteractionTargetedPreview.get(); >@@ -7960,7 +7963,7 @@ - (UITargetedPreview *)_ensureTargetedPreview > - (UITargetedPreview *)contextMenuInteraction:(UIContextMenuInteraction *)interaction previewForHighlightingMenuWithConfiguration:(UIContextMenuConfiguration *)configuration > { > [self _startSuppressingSelectionAssistantForReason:WebKit::InteractionIsHappening]; >- return [self _ensureTargetedPreview]; >+ return [self _createTargetedPreviewIfPossible]; > } > > - (void)contextMenuInteractionWillPresent:(UIContextMenuInteraction *)interaction >@@ -7981,7 +7984,7 @@ - (void)contextMenuInteractionWillPresent:(UIContextMenuInteraction *)interactio > > - (UITargetedPreview *)contextMenuInteraction:(UIContextMenuInteraction *)interaction previewForDismissingMenuWithConfiguration:(UIContextMenuConfiguration *)configuration > { >- return [self _ensureTargetedPreview]; >+ return [self _createTargetedPreviewIfPossible]; > } > > - (void)contextMenuInteraction:(UIContextMenuInteraction *)interaction willCommitWithAnimator:(id<UIContextMenuInteractionCommitAnimating>)animator
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199243
: 372965