Title: [223444] trunk/Source/WebKit
- Revision
- 223444
- Author
- timothy_hor...@apple.com
- Date
- 2017-10-16 16:03:28 -0700 (Mon, 16 Oct 2017)
Log 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).
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (223443 => 223444)
--- trunk/Source/WebKit/ChangeLog 2017-10-16 22:40:34 UTC (rev 223443)
+++ trunk/Source/WebKit/ChangeLog 2017-10-16 23:03:28 UTC (rev 223444)
@@ -1,3 +1,17 @@
+2017-10-16 Tim Horton <timothy_hor...@apple.com>
+
+ 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).
+
2017-10-16 Alex Christensen <achristen...@webkit.org>
Add a _WKThumbnailView initializer with a WKWebView
Modified: trunk/Source/WebKit/UIProcess/ios/WKPDFView.mm (223443 => 223444)
--- trunk/Source/WebKit/UIProcess/ios/WKPDFView.mm 2017-10-16 22:40:34 UTC (rev 223443)
+++ trunk/Source/WebKit/UIProcess/ios/WKPDFView.mm 2017-10-16 23:03:28 UTC (rev 223444)
@@ -601,6 +601,9 @@
_currentFindSelection = match;
CGRect zoomRect = [pageInfo.view convertRectFromPDFPageSpace:match.bounds];
+ if (CGRectIsNull(zoomRect))
+ return;
+
[self zoom:pageInfo.view.get() to:zoomRect atPoint:CGPointZero kind:kUIPDFObjectKindText];
return;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes