Changeset 223444 in webkit


Ignore:
Timestamp:
Oct 16, 2017 4:03:28 PM (6 years ago)
Author:
timothy_horton@apple.com
Message:

Safari crashes after searching PDF (under [WKPDFView zoom:to:atPoint:kind:])
https://bugs.webkit.org/show_bug.cgi?id=178358
<rdar://problem/34676899>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView _didFindMatch:]):
UIPDFSelection can return a null rect as the selection's bounds.
We can't zoom to a null rect (and doing so results in CA throwing an
exception later).

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r223439 r223444  
     12017-10-16  Tim Horton  <timothy_horton@apple.com>
     2
     3        Safari crashes after searching PDF (under [WKPDFView zoom:to:atPoint:kind:])
     4        https://bugs.webkit.org/show_bug.cgi?id=178358
     5        <rdar://problem/34676899>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        * UIProcess/ios/WKPDFView.mm:
     10        (-[WKPDFView _didFindMatch:]):
     11        UIPDFSelection can return a null rect as the selection's bounds.
     12        We can't zoom to a null rect (and doing so results in CA throwing an
     13        exception later).
     14
    1152017-10-16  Alex Christensen  <achristensen@webkit.org>
    216
  • trunk/Source/WebKit/UIProcess/ios/WKPDFView.mm

    r220138 r223444  
    602602
    603603            CGRect zoomRect = [pageInfo.view convertRectFromPDFPageSpace:match.bounds];
     604            if (CGRectIsNull(zoomRect))
     605                return;
     606
    604607            [self zoom:pageInfo.view.get() to:zoomRect atPoint:CGPointZero kind:kUIPDFObjectKindText];
    605608
Note: See TracChangeset for help on using the changeset viewer.