Title: [233314] trunk/Source/WebKit
- Revision
- 233314
- Author
- [email protected]
- Date
- 2018-06-28 11:36:48 -0700 (Thu, 28 Jun 2018)
Log Message
Crash when _topConstraint is null in element fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=187075
Patch by Jeremy Jones <[email protected]> on 2018-06-28
Reviewed by Eric Carlson.
NSArray can't contain a null pointer, so check for null before creating an array from a pointer.
Use the recommended +deactivateConstraints: instead of -removeConstraints:.
* UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
(-[WKFullScreenViewController showUI]):
(-[WKFullScreenViewController hideUI]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (233313 => 233314)
--- trunk/Source/WebKit/ChangeLog 2018-06-28 17:35:34 UTC (rev 233313)
+++ trunk/Source/WebKit/ChangeLog 2018-06-28 18:36:48 UTC (rev 233314)
@@ -1,3 +1,17 @@
+2018-06-28 Jeremy Jones <[email protected]>
+
+ Crash when _topConstraint is null in element fullscreen.
+ https://bugs.webkit.org/show_bug.cgi?id=187075
+
+ Reviewed by Eric Carlson.
+
+ NSArray can't contain a null pointer, so check for null before creating an array from a pointer.
+ Use the recommended +deactivateConstraints: instead of -removeConstraints:.
+
+ * UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
+ (-[WKFullScreenViewController showUI]):
+ (-[WKFullScreenViewController hideUI]):
+
2018-06-28 Chris Dumez <[email protected]>
Split memory store logic out of WebResourceLoadStatisticsStore to clarify threading model
Modified: trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm (233313 => 233314)
--- trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm 2018-06-28 17:35:34 UTC (rev 233313)
+++ trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm 2018-06-28 18:36:48 UTC (rev 233314)
@@ -171,7 +171,8 @@
[_stackView setAlpha:1];
self.prefersStatusBarHidden = NO;
self.prefersHomeIndicatorAutoHidden = NO;
- [self.view removeConstraints:@[_topConstraint.get()]];
+ if (_topConstraint)
+ [NSLayoutConstraint deactivateConstraints:@[_topConstraint.get()]];
_topConstraint = [[_topGuide topAnchor] constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor];
[_topConstraint setActive:YES];
if (auto* manager = self._manager)
@@ -184,7 +185,8 @@
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(hideUI) object:nil];
[UIView animateWithDuration:showHideAnimationDuration animations:^{
- [self.view removeConstraints:@[_topConstraint.get()]];
+ if (_topConstraint)
+ [NSLayoutConstraint deactivateConstraints:@[_topConstraint.get()]];
_topConstraint = [[_topGuide topAnchor] constraintEqualToAnchor:self.view.topAnchor constant:self.view.safeAreaInsets.top];
[_topConstraint setActive:YES];
[_stackView setAlpha:0];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes