Title: [234299] branches/safari-606-branch/Source/WebCore
- Revision
- 234299
- Author
- [email protected]
- Date
- 2018-07-26 23:02:05 -0700 (Thu, 26 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 (234298 => 234299)
--- branches/safari-606-branch/Source/WebCore/ChangeLog 2018-07-27 06:02:02 UTC (rev 234298)
+++ branches/safari-606-branch/Source/WebCore/ChangeLog 2018-07-27 06:02:05 UTC (rev 234299)
@@ -1,5 +1,44 @@
2018-07-26 Babak Shafiei <[email protected]>
+ 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 <[email protected]>
+
+ 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-26 Babak Shafiei <[email protected]>
+
Cherry-pick r233936. rdar://problem/42354941
Unreviewed API Test fix; restored a line inadventantly removed in r233926.
Modified: branches/safari-606-branch/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm (234298 => 234299)
--- branches/safari-606-branch/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2018-07-27 06:02:02 UTC (rev 234298)
+++ branches/safari-606-branch/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm 2018-07-27 06:02:05 UTC (rev 234299)
@@ -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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes