Changeset 87768 in webkit


Ignore:
Timestamp:
May 31, 2011 6:48:53 PM (13 years ago)
Author:
jer.noble@apple.com
Message:

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

Reviewed by Darin Adler.

Flash of black at the end of full screen transition at apple.com product videos
https://bugs.webkit.org/show_bug.cgi?id=61756

Added two new entries to the WebCore exports list.

  • WebCore.exp.in:

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

Reviewed by Darin Adler.

Flash of black at the end of full screen transition at apple.com product videos
https://bugs.webkit.org/show_bug.cgi?id=61756

The @"WebKitLayerHostChanged" notification is causing the QTMovie to tear down its layer
(which is good) at the wrong time (which is bad). Send this notification only after
the dragImage snapshot is taken. This exposed another problem, that the snapshot has
a white background. Set the default background color and transparency for the view (making
sure to reset them afterwards) to transparent.

  • WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r87767 r87768  
     12011-05-31  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Flash of black at the end of full screen transition at apple.com product videos
     6        https://bugs.webkit.org/show_bug.cgi?id=61756
     7
     8        Added two new entries to the WebCore exports list.
     9
     10        * WebCore.exp.in:
     11
    1122011-05-31  Rafael Brandao  <rafael.lobo@openbossa.org>
    213
  • trunk/Source/WebCore/WebCore.exp.in

    r87756 r87768  
    931931__ZN7WebCore9FrameView14setNeedsLayoutEv
    932932__ZN7WebCore9FrameView14setTransparentEb
     933__ZNK7WebCore9FrameView13isTransparentEv
    933934__ZN7WebCore9FrameView15setMarginHeightEi
    934935__ZN7WebCore9FrameView16setPaintBehaviorEj
     
    938939__ZN7WebCore9FrameView21flushDeferredRepaintsEv
    939940__ZN7WebCore9FrameView22setBaseBackgroundColorERKNS_5ColorE
     941__ZNK7WebCore9FrameView19baseBackgroundColorEv
    940942__ZN7WebCore9FrameView23updateCanHaveScrollbarsEv
    941943__ZN7WebCore9FrameView24forceLayoutForPaginationERKNS_9FloatSizeEfNS_19AdjustViewSizeOrNotE
  • trunk/Source/WebKit2/ChangeLog

    r87760 r87768  
     12011-05-31  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        Flash of black at the end of full screen transition at apple.com product videos
     6        https://bugs.webkit.org/show_bug.cgi?id=61756
     7
     8        The @"WebKitLayerHostChanged" notification is causing the QTMovie to tear down its layer
     9        (which is good) at the wrong time (which is bad).  Send this notification only after
     10        the dragImage snapshot is taken.  This exposed another problem, that the snapshot has
     11        a white background.  Set the default background color and transparency for the view (making
     12        sure to reset them afterwards) to transparent.
     13
     14        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
     15        (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
     16
    1172011-03-30  Martin Robinson  <mrobinson@igalia.com>
    218
  • trunk/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm

    r87652 r87768  
    140140    if (!layer) {
    141141        m_page->send(Messages::WebFullScreenManagerProxy::ExitAcceleratedCompositingMode());
    142         [[NSNotificationCenter defaultCenter] postNotificationName:@"WebKitLayerHostChanged" object:m_rootLayer->platformLayer() userInfo:nil];
    143142
    144143        Frame* frame = m_element->document()->frame();
    145         DragImageRef dragImage = frame ? frame->nodeImage(m_element.get()) : 0;
    146 
    147         if (m_rootLayer) {
    148             [CATransaction begin];
    149             PlatformLayer* rootPlatformLayer = m_rootLayer->platformLayer();
    150             m_rootLayer->removeAllChildren();
    151             m_rootLayer->syncCompositingStateForThisLayerOnly();
    152             m_rootLayer = nullptr;
    153             [rootPlatformLayer setContents:dragImage.get()];
    154             [CATransaction commit];
     144        FrameView* view = frame ? frame->view() : 0;
     145        DragImageRef dragImage = 0;
     146        if (view) {
     147            Color savedBackgroundColor = view->baseBackgroundColor();
     148            bool savedIsTransparent = view->isTransparent();
     149            view->setBaseBackgroundColor(Color::transparent);
     150            view->setTransparent(true);
     151            dragImage = frame->nodeImage(m_element.get());
     152            view->setBaseBackgroundColor(savedBackgroundColor);
     153            view->setTransparent(savedIsTransparent);
    155154        }
     155
     156        [CATransaction begin];
     157        PlatformLayer* rootPlatformLayer = m_rootLayer->platformLayer();
     158        [[NSNotificationCenter defaultCenter] postNotificationName:@"WebKitLayerHostChanged" object:rootPlatformLayer userInfo:nil];
     159
     160        m_rootLayer->removeAllChildren();
     161        m_rootLayer->syncCompositingStateForThisLayerOnly();
     162        m_rootLayer = nullptr;
     163        [rootPlatformLayer setContents:dragImage.get()];
     164        [CATransaction commit];
    156165       
    157166        return;
Note: See TracChangeset for help on using the changeset viewer.