Title: [224781] trunk/Source/WebKit
- Revision
- 224781
- Author
- [email protected]
- Date
- 2017-11-13 14:22:28 -0800 (Mon, 13 Nov 2017)
Log Message
Occasional MobileSafari crash under -[WKPDFView web_setMinimumSize:]
https://bugs.webkit.org/show_bug.cgi?id=179628
<rdar://problem/34773037>
Reviewed by Simon Fraser.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _computePageAndDocumentFrames]):
Similar to r223444, avoid propagating null CGRects into the view hierarchy.
In this case, the null rect comes from applying margins to a rect that is
smaller than the margins. We could check for that specifically, but a
more-general check for a null rect seems reasonable.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (224780 => 224781)
--- trunk/Source/WebKit/ChangeLog 2017-11-13 22:13:34 UTC (rev 224780)
+++ trunk/Source/WebKit/ChangeLog 2017-11-13 22:22:28 UTC (rev 224781)
@@ -1,5 +1,20 @@
2017-11-13 Tim Horton <[email protected]>
+ Occasional MobileSafari crash under -[WKPDFView web_setMinimumSize:]
+ https://bugs.webkit.org/show_bug.cgi?id=179628
+ <rdar://problem/34773037>
+
+ Reviewed by Simon Fraser.
+
+ * UIProcess/ios/WKPDFView.mm:
+ (-[WKPDFView _computePageAndDocumentFrames]):
+ Similar to r223444, avoid propagating null CGRects into the view hierarchy.
+ In this case, the null rect comes from applying margins to a rect that is
+ smaller than the margins. We could check for that specifically, but a
+ more-general check for a null rect seems reasonable.
+
+2017-11-13 Tim Horton <[email protected]>
+
Use the real mach type instead of reinterpret_casting in MachMessage
https://bugs.webkit.org/show_bug.cgi?id=179629
Modified: trunk/Source/WebKit/UIProcess/ios/WKPDFView.mm (224780 => 224781)
--- trunk/Source/WebKit/UIProcess/ios/WKPDFView.mm 2017-11-13 22:13:34 UTC (rev 224780)
+++ trunk/Source/WebKit/UIProcess/ios/WKPDFView.mm 2017-11-13 22:22:28 UTC (rev 224781)
@@ -411,6 +411,8 @@
CGSize pageSize = [page cropBoxAccountForRotation].size;
pageFrame.size.height = pageSize.height / pageSize.width * pageFrame.size.width;
CGRect pageFrameWithMarginApplied = CGRectInset(pageFrame, pdfPageMargin, pdfPageMargin);
+ if (CGRectIsNull(pageFrameWithMarginApplied))
+ pageFrameWithMarginApplied = CGRectZero;
PDFPageInfo pageInfo;
pageInfo.page = page;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes