Title: [234047] branches/safari-606-branch/Source/WebCore
- Revision
- 234047
- Author
- bshaf...@apple.com
- Date
- 2018-07-20 10:01:30 -0700 (Fri, 20 Jul 2018)
Log Message
Cherry-pick r234044. rdar://problem/42433225
REGRESSION(r233969): ASSERT in -[WebAVPlayerLayer setVideoGravity:]
https://bugs.webkit.org/show_bug.cgi?id=187814
<rdar://problem/42391869>
Reviewed by Eric Carlson.
After r233969 caused models to disassociate themselves from interfaces, it is now possible that an
VideoFullscreenInterfaceAVKit can have a nil model. We should null-check, not ASSERT, now that the
assertion no longer holds true.
* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerLayer layoutSublayers]):
(-[WebAVPlayerLayer resolveBounds]):
(-[WebAVPlayerLayer setVideoGravity:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-606-branch/Source/WebCore/ChangeLog (234046 => 234047)
--- branches/safari-606-branch/Source/WebCore/ChangeLog 2018-07-20 17:01:26 UTC (rev 234046)
+++ branches/safari-606-branch/Source/WebCore/ChangeLog 2018-07-20 17:01:30 UTC (rev 234047)
@@ -1,5 +1,44 @@
2018-07-20 Babak Shafiei <bshaf...@apple.com>
+ Cherry-pick r234044. rdar://problem/42433225
+
+ REGRESSION(r233969): ASSERT in -[WebAVPlayerLayer setVideoGravity:]
+ https://bugs.webkit.org/show_bug.cgi?id=187814
+ <rdar://problem/42391869>
+
+ Reviewed by Eric Carlson.
+
+ After r233969 caused models to disassociate themselves from interfaces, it is now possible that an
+ VideoFullscreenInterfaceAVKit can have a nil model. We should null-check, not ASSERT, now that the
+ assertion no longer holds true.
+
+ * platform/ios/VideoFullscreenInterfaceAVKit.mm:
+ (-[WebAVPlayerLayer layoutSublayers]):
+ (-[WebAVPlayerLayer resolveBounds]):
+ (-[WebAVPlayerLayer setVideoGravity:]):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2018-07-20 Jer Noble <jer.no...@apple.com>
+
+ REGRESSION(r233969): ASSERT in -[WebAVPlayerLayer setVideoGravity:]
+ https://bugs.webkit.org/show_bug.cgi?id=187814
+ <rdar://problem/42391869>
+
+ Reviewed by Eric Carlson.
+
+ After r233969 caused models to disassociate themselves from interfaces, it is now possible that an
+ VideoFullscreenInterfaceAVKit can have a nil model. We should null-check, not ASSERT, now that the
+ assertion no longer holds true.
+
+ * platform/ios/VideoFullscreenInterfaceAVKit.mm:
+ (-[WebAVPlayerLayer layoutSublayers]):
+ (-[WebAVPlayerLayer resolveBounds]):
+ (-[WebAVPlayerLayer setVideoGravity:]):
+
+2018-07-20 Babak Shafiei <bshaf...@apple.com>
+
Cherry-pick r234002. rdar://problem/42432954
REGRESSION(r233926): media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html is a TIMEOUT failure
Modified: branches/safari-606-branch/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm (234046 => 234047)
--- branches/safari-606-branch/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2018-07-20 17:01:26 UTC (rev 234046)
+++ branches/safari-606-branch/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2018-07-20 17:01:30 UTC (rev 234047)
@@ -289,8 +289,8 @@
} else if ([getAVLayerVideoGravityResizeAspectFill() isEqualToString:self.videoGravity]) {
sourceVideoFrame = smallestRectWithAspectRatioAroundRect(videoAspectRatio, self.modelVideoLayerFrame);
self.modelVideoLayerFrame = CGRectMake(0, 0, sourceVideoFrame.width(), sourceVideoFrame.height());
- ASSERT(_fullscreenInterface->videoFullscreenModel());
- _fullscreenInterface->videoFullscreenModel()->setVideoLayerFrame(self.modelVideoLayerFrame);
+ if (auto* model = _fullscreenInterface->videoFullscreenModel())
+ model->setVideoLayerFrame(self.modelVideoLayerFrame);
targetVideoFrame = smallestRectWithAspectRatioAroundRect(videoAspectRatio, self.bounds);
} else
ASSERT_NOT_REACHED();
@@ -325,8 +325,8 @@
if (!CGRectEqualToRect(self.modelVideoLayerFrame, [self bounds])) {
self.modelVideoLayerFrame = [self bounds];
- ASSERT(_fullscreenInterface->videoFullscreenModel());
- _fullscreenInterface->videoFullscreenModel()->setVideoLayerFrame(self.modelVideoLayerFrame);
+ if (auto* model = _fullscreenInterface->videoFullscreenModel())
+ model->setVideoLayerFrame(self.modelVideoLayerFrame);
}
[(UIView *)[_videoSublayer delegate] setTransform:CGAffineTransformIdentity];
@@ -350,8 +350,8 @@
else
ASSERT_NOT_REACHED();
- ASSERT(_fullscreenInterface->videoFullscreenModel());
- _fullscreenInterface->videoFullscreenModel()->setVideoLayerGravity(gravity);
+ if (auto* model = _fullscreenInterface->videoFullscreenModel())
+ model->setVideoLayerGravity(gravity);
}
- (NSString *)videoGravity
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes