Changeset 234044 in webkit
- Timestamp:
- Jul 20, 2018 9:51:06 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r234017 r234044 1 2018-07-20 Jer Noble <jer.noble@apple.com> 2 3 REGRESSION(r233969): ASSERT in -[WebAVPlayerLayer setVideoGravity:] 4 https://bugs.webkit.org/show_bug.cgi?id=187814 5 <rdar://problem/42391869> 6 7 Reviewed by Eric Carlson. 8 9 After r233969 caused models to disassociate themselves from interfaces, it is now possible that an 10 VideoFullscreenInterfaceAVKit can have a nil model. We should null-check, not ASSERT, now that the 11 assertion no longer holds true. 12 13 * platform/ios/VideoFullscreenInterfaceAVKit.mm: 14 (-[WebAVPlayerLayer layoutSublayers]): 15 (-[WebAVPlayerLayer resolveBounds]): 16 (-[WebAVPlayerLayer setVideoGravity:]): 17 1 18 2018-07-19 Antoine Quint <graouts@apple.com> 2 19 -
trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm
r233930 r234044 290 290 sourceVideoFrame = smallestRectWithAspectRatioAroundRect(videoAspectRatio, self.modelVideoLayerFrame); 291 291 self.modelVideoLayerFrame = CGRectMake(0, 0, sourceVideoFrame.width(), sourceVideoFrame.height()); 292 ASSERT(_fullscreenInterface->videoFullscreenModel());293 _fullscreenInterface->videoFullscreenModel()->setVideoLayerFrame(self.modelVideoLayerFrame);292 if (auto* model = _fullscreenInterface->videoFullscreenModel()) 293 model->setVideoLayerFrame(self.modelVideoLayerFrame); 294 294 targetVideoFrame = smallestRectWithAspectRatioAroundRect(videoAspectRatio, self.bounds); 295 295 } else … … 326 326 if (!CGRectEqualToRect(self.modelVideoLayerFrame, [self bounds])) { 327 327 self.modelVideoLayerFrame = [self bounds]; 328 ASSERT(_fullscreenInterface->videoFullscreenModel());329 _fullscreenInterface->videoFullscreenModel()->setVideoLayerFrame(self.modelVideoLayerFrame);328 if (auto* model = _fullscreenInterface->videoFullscreenModel()) 329 model->setVideoLayerFrame(self.modelVideoLayerFrame); 330 330 } 331 331 [(UIView *)[_videoSublayer delegate] setTransform:CGAffineTransformIdentity]; … … 351 351 ASSERT_NOT_REACHED(); 352 352 353 ASSERT(_fullscreenInterface->videoFullscreenModel());354 _fullscreenInterface->videoFullscreenModel()->setVideoLayerGravity(gravity);353 if (auto* model = _fullscreenInterface->videoFullscreenModel()) 354 model->setVideoLayerGravity(gravity); 355 355 } 356 356
Note: See TracChangeset
for help on using the changeset viewer.