Changeset 86486 in webkit


Ignore:
Timestamp:
May 14, 2011 9:17:18 AM (13 years ago)
Author:
jer.noble@apple.com
Message:

2011-05-14 Jer Noble <jer.noble@apple.com>

Reviewed by Simon Fraser.

Flashing window frame and graphical glitches after exiting full screen mode.
https://bugs.webkit.org/show_bug.cgi?id=60825

A layer-backed WebView throws an exception when moved from a layer-backed parent view
to a non-layer-backed one, so make the WebView a child of the content view, instead of
the animation view. There is an unrelated fix in beganExitFullScreen, which was calling
finishedExitFullScreenAnimation: instead of finishedEnterFullScreenAnimation: when
notifications come out of order.

  • UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Add the _webView

to the full screen window's content view, instead of the _animationView.

(-[WKFullScreenWindowController beganExitFullScreenAnimation]): Call

finishedEnterFullScreenAnimation: instead of finishedExitFullScreenAnimation:.

(-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Add the

_layerHostingView to the contentView, instead of the animationView.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r86482 r86486  
     12011-05-14  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Flashing window frame and graphical glitches after exiting full screen mode.
     6        https://bugs.webkit.org/show_bug.cgi?id=60825
     7
     8        A layer-backed WebView throws an exception when moved from a layer-backed parent view
     9        to a non-layer-backed one, so make the WebView a child of the content view, instead of
     10        the animation view.  There is an unrelated fix in beganExitFullScreen, which was calling
     11        finishedExitFullScreenAnimation: instead of finishedEnterFullScreenAnimation: when
     12        notifications come out of order.
     13
     14        * UIProcess/mac/WKFullScreenWindowController.mm:
     15        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Add the _webView
     16            to the full screen window's content view, instead of the _animationView.
     17        (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Call
     18            finishedEnterFullScreenAnimation: instead of finishedExitFullScreenAnimation:.
     19        (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Add the
     20            _layerHostingView to the contentView, instead of the animationView.
     21
    1222011-05-14  Csaba Osztrogonác  <ossy@webkit.org>
    223
  • trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm

    r86186 r86486  
    252252       
    253253        // Then insert the WebView into the full screen window
    254         NSView* animationView = [[self _fullScreenWindow] animationView];
    255         [animationView addSubview:_webView positioned:NSWindowBelow relativeTo:_layerHostingView.get()];
    256         [_webView setFrame:[animationView bounds]];
     254        NSView* contentView = [[self _fullScreenWindow] contentView];
     255        [contentView addSubview:_webView positioned:NSWindowBelow relativeTo:_layerHostingView.get()];
     256        [_webView setFrame:[contentView bounds]];
    257257
    258258        [CATransaction begin];
     
    299299
    300300    if (_isEnteringFullScreen)
    301         [self finishedExitFullScreenAnimation:NO];
     301        [self finishedEnterFullScreenAnimation:NO];
    302302
    303303    [self _updateMenuAndDockForFullScreen];   
     
    368368    [CATransaction setDisableActions:YES];
    369369    WKFullScreenWindow* window = [self _fullScreenWindow];
    370     [[window animationView] addSubview:_layerHostingView.get()];
     370    [[window contentView] addSubview:_layerHostingView.get() positioned:NSWindowAbove relativeTo:[window animationView]];
    371371   
    372372    // Create a root layer that will back the NSView.
Note: See TracChangeset for help on using the changeset viewer.