Changeset 203792 in webkit


Ignore:
Timestamp:
Jul 27, 2016 2:10:23 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Fullscreen video zoom button does not work after rotating when aspect ratio matches display.
https://bugs.webkit.org/show_bug.cgi?id=160263
rdar://problem/27368872

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-07-27
Reviewed by Eric Carlson.

When video and display aspect ratio match, and rotating from landscape to protrait, the transform used in layout
will be Identity. This means checking the transform for identity is an insufficient test to see if the bounds
need to be resolved.

Instead, always attempt to resolve the bounds and do a more accurate test while doing so.

  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(-[WebAVPlayerLayer layoutSublayers]):
(-[WebAVPlayerLayer resolveBounds]):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r203789 r203792  
     12016-07-27  Jeremy Jones  <jeremyj@apple.com>
     2
     3        Fullscreen video zoom button does not work after rotating when aspect ratio matches display.
     4        https://bugs.webkit.org/show_bug.cgi?id=160263
     5        rdar://problem/27368872
     6
     7        Reviewed by Eric Carlson.
     8
     9        When video and display aspect ratio match, and rotating from landscape to protrait, the transform used in layout
     10        will be Identity. This means checking the transform for identity is an insufficient test to see if the bounds
     11        need to be resolved.
     12
     13        Instead, always attempt to resolve the bounds and do a more accurate test while doing so.
     14
     15        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
     16        (-[WebAVPlayerLayer layoutSublayers]):
     17        (-[WebAVPlayerLayer resolveBounds]):
     18
    1192016-07-27  Anders Carlsson  <andersca@apple.com>
    220
  • trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm

    r202871 r203792  
    270270        [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(resolveBounds) object:nil];
    271271
    272         if (!CGAffineTransformIsIdentity(transform))
    273             [self performSelector:@selector(resolveBounds) withObject:nil afterDelay:animationDuration + 0.1];
     272        [self performSelector:@selector(resolveBounds) withObject:nil afterDelay:animationDuration + 0.1];
    274273    });
    275274}
     
    282281   
    283282    if ([_videoSublayer superlayer] != self)
     283        return;
     284   
     285    if (CGRectEqualToRect(self.modelVideoLayerFrame, [self bounds]) && CGAffineTransformIsIdentity([(UIView *)[_videoSublayer delegate] transform]))
    284286        return;
    285287   
     
    288290    [CATransaction setDisableActions:YES];
    289291   
    290     self.modelVideoLayerFrame = [self bounds];
    291     ASSERT(_fullscreenInterface->model());
    292     _fullscreenInterface->model()->setVideoLayerFrame(self.modelVideoLayerFrame);
     292    if (!CGRectEqualToRect(self.modelVideoLayerFrame, [self bounds])) {
     293        self.modelVideoLayerFrame = [self bounds];
     294        ASSERT(_fullscreenInterface->model());
     295        _fullscreenInterface->model()->setVideoLayerFrame(self.modelVideoLayerFrame);
     296    }
    293297    [(UIView *)[_videoSublayer delegate] setTransform:CGAffineTransformIdentity];
    294298   
Note: See TracChangeset for help on using the changeset viewer.