Changeset 185827 in webkit
- Timestamp:
- Jun 22, 2015, 7:32:48 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/WebKit2/ChangeLog ¶
r185825 r185827 1 2015-06-22 Antti Koivisto <antti@apple.com> 2 3 Crash replacing TabDocument in MobileSafari at WebKit: -[WKWebView(WKPrivate) _beginAnimatedResizeWithUpdates:] 4 https://bugs.webkit.org/show_bug.cgi?id=146201 5 6 Reviewed by Dan Bernstein. 7 8 * UIProcess/API/Cocoa/WKWebView.mm: 9 (-[WKWebView _beginAnimatedResizeWithUpdates:]): 10 11 No repro but if for some reason [_contentView bounds] width is zero we'll compute +Inf targetScale 12 and then NaN contentOffset.x. Verified in lldb that this gives the exact crash signature seen. 13 14 Fix by checking that [_contentView bounds] is not empty like is done with other inputs. 15 1 16 2015-06-22 Carlos Garcia Campos <cgarcia@igalia.com> 2 17 -
TabularUnified trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm ¶
r185799 r185827 2623 2623 UIEdgeInsets newObscuredInsets = _obscuredInsets; 2624 2624 CGRect futureUnobscuredRectInSelfCoordinates = UIEdgeInsetsInsetRect(newBounds, _obscuredInsets); 2625 CGRect contentViewBounds = [_contentView bounds]; 2625 2626 2626 2627 ASSERT_WITH_MESSAGE(!(_overridesMinimumLayoutSize && newMinimumLayoutSize.isEmpty()), "Clients controlling the layout size should maintain a valid layout size to minimize layouts."); 2627 if (CGRectIsEmpty(newBounds) || newMinimumLayoutSize.isEmpty() || CGRectIsEmpty(futureUnobscuredRectInSelfCoordinates) ) {2628 if (CGRectIsEmpty(newBounds) || newMinimumLayoutSize.isEmpty() || CGRectIsEmpty(futureUnobscuredRectInSelfCoordinates) || CGRectIsEmpty(contentViewBounds)) { 2628 2629 _dynamicViewportUpdateMode = DynamicViewportUpdateMode::NotResizing; 2629 2630 [self _frameOrBoundsChanged]; … … 2656 2657 [_resizeAnimationView addSubview:[_contentView unscaledView]]; 2657 2658 2658 CGSize contentSizeInContentViewCoordinates = [_contentView bounds].size;2659 CGSize contentSizeInContentViewCoordinates = contentViewBounds.size; 2659 2660 [_scrollView setMinimumZoomScale:std::min(newMinimumLayoutSize.width() / contentSizeInContentViewCoordinates.width, [_scrollView minimumZoomScale])]; 2660 2661 [_scrollView setMaximumZoomScale:std::max(newMinimumLayoutSize.width() / contentSizeInContentViewCoordinates.width, [_scrollView maximumZoomScale])];
Note:
See TracChangeset
for help on using the changeset viewer.