2011-05-04 Simon Fraser <simon.fraser@apple.com>
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 May 2011 20:08:11 +0000 (20:08 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 May 2011 20:08:11 +0000 (20:08 +0000)
commit3668f55fe7fc7efd63c8a7bf58a520559566a7b3
tree458899dc187a2921f7fd385fc6f4704109a07d49
parent72236b51cc32bb23ef5cfd3aa2df5a50ff77de5a
2011-05-04  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Anders Carlsson.

        WebKit2 flashes if entering and exiting compositing rapidly
        https://bugs.webkit.org/show_bug.cgi?id=60198

        If a page enters then immediately leaves compositing mode, the
        DrawingAreaImpl would send a message to the UI process that it
        had entered compositing even after all the layers had been torn
        down. Fix this by never sending the 'enter' message if we're
        waiting for the 'exit' timer to fire.

        Also fix an assertion in the UI process caused by sending mismatched
        'enter' and 'leave' messages by keeping track of which messages
        we've sent.

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::DrawingAreaImpl):
        (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModeSoon):
        * WebProcess/WebPage/DrawingAreaImpl.h:
        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModePending):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/toggle-compositing-expected.txt [new file with mode: 0644]
LayoutTests/compositing/toggle-compositing.html [new file with mode: 0644]
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h