Changeset 247360 in webkit


Ignore:
Timestamp:
Jul 11, 2019 1:11:47 PM (5 years ago)
Author:
dino@apple.com
Message:

CrashTracer: Regression : MobileSafari at UIKit: -[CALayerAccessibilityUIKitQuartzCore 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.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r247357 r247360  
     12019-07-11  Dean Jackson  <dino@apple.com>
     2
     3        CrashTracer: Regression : MobileSafari at UIKit: -[CALayerAccessibility__UIKit__QuartzCore setBounds:]
     4        https://bugs.webkit.org/show_bug.cgi?id=199720
     5        <rdar://problem/51470469>
     6
     7        Reviewed by Tim Horton.
     8
     9        Speculative fix after confirming that this crash can occur when
     10        a zero width/height view is used for a UITargetedPreview. We
     11        already guarded against this in the default flow, but not in
     12        the fallback path where we take a view snapshot.
     13
     14        * UIProcess/ios/WKContentViewInteraction.mm:
     15        (createFallbackTargetedPreview): Return early if rectangles are empty.
     16
    1172019-07-11  Alex Christensen  <achristensen@webkit.org>
    218
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r247355 r247360  
    80108010        return nil;
    80118011
     8012    if (frameInRootViewCoordinates.isEmpty())
     8013        return nil;
     8014
    80128015    auto parameters = adoptNS([[UIPreviewParameters alloc] init]);
    80138016    UIView *snapshotView = [rootView resizableSnapshotViewFromRect:frameInRootViewCoordinates afterScreenUpdates:NO withCapInsets:UIEdgeInsetsZero];
    80148017
    80158018    CGRect frameInContainerViewCoordinates = [rootView convertRect:frameInRootViewCoordinates toView:containerView];
     8019
     8020    if (CGRectIsEmpty(frameInContainerViewCoordinates))
     8021        return nil;
     8022
    80168023    snapshotView.frame = frameInContainerViewCoordinates;
    80178024
Note: See TracChangeset for help on using the changeset viewer.