Title: [247360] trunk/Source/WebKit
- Revision
- 247360
- Author
- d...@apple.com
- Date
- 2019-07-11 13:11:47 -0700 (Thu, 11 Jul 2019)
Log Message
CrashTracer: Regression : MobileSafari at UIKit: -[CALayerAccessibility__UIKit__QuartzCore setBounds:]
https://bugs.webkit.org/show_bug.cgi?id=199720
<rdar://problem/51470469>
Reviewed by Tim Horton.
Speculative fix after confirming that this crash can occur when
a zero width/height view is used for a UITargetedPreview. We
already guarded against this in the default flow, but not in
the fallback path where we take a view snapshot.
* UIProcess/ios/WKContentViewInteraction.mm:
(createFallbackTargetedPreview): Return early if rectangles are empty.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (247359 => 247360)
--- trunk/Source/WebKit/ChangeLog 2019-07-11 19:39:23 UTC (rev 247359)
+++ trunk/Source/WebKit/ChangeLog 2019-07-11 20:11:47 UTC (rev 247360)
@@ -1,3 +1,19 @@
+2019-07-11 Dean Jackson <d...@apple.com>
+
+ CrashTracer: Regression : MobileSafari at UIKit: -[CALayerAccessibility__UIKit__QuartzCore setBounds:]
+ https://bugs.webkit.org/show_bug.cgi?id=199720
+ <rdar://problem/51470469>
+
+ Reviewed by Tim Horton.
+
+ Speculative fix after confirming that this crash can occur when
+ a zero width/height view is used for a UITargetedPreview. We
+ already guarded against this in the default flow, but not in
+ the fallback path where we take a view snapshot.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (createFallbackTargetedPreview): Return early if rectangles are empty.
+
2019-07-11 Alex Christensen <achristen...@webkit.org>
Use mobile UA on jsfiddle.net
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (247359 => 247360)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-07-11 19:39:23 UTC (rev 247359)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-07-11 20:11:47 UTC (rev 247360)
@@ -8009,10 +8009,17 @@
if (!containerView.window)
return nil;
+ if (frameInRootViewCoordinates.isEmpty())
+ return nil;
+
auto parameters = adoptNS([[UIPreviewParameters alloc] init]);
UIView *snapshotView = [rootView resizableSnapshotViewFromRect:frameInRootViewCoordinates afterScreenUpdates:NO withCapInsets:UIEdgeInsetsZero];
CGRect frameInContainerViewCoordinates = [rootView convertRect:frameInRootViewCoordinates toView:containerView];
+
+ if (CGRectIsEmpty(frameInContainerViewCoordinates))
+ return nil;
+
snapshotView.frame = frameInContainerViewCoordinates;
CGPoint centerInContainerViewCoordinates = CGPointMake(CGRectGetMidX(frameInContainerViewCoordinates), CGRectGetMidY(frameInContainerViewCoordinates));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes