Changeset 139252 in webkit


Ignore:
Timestamp:
Jan 9, 2013 4:18:15 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[chromium] Add a notification when a WebWidget's WebLayerTreeView is about to go away
https://bugs.webkit.org/show_bug.cgi?id=106495

Patch by James Robinson <jamesr@chromium.org> on 2013-01-09
Reviewed by Adrienne Walker.

The WebWidget / WebLayerTreeView ownership is in a slightly awkward place. I'm moving the ownership
of the WebLayerTreeView to the WebWidgetClient, but to stage things sanely the WebLayerTreeView's
client is sill owned by the WebWidget implementation. Thus to shut down cleanly we need an explicit
notification to the WebWidget that the WebLayerTreeView is going to go away.

This API can go away once the WebWidget implementation does not provide the WebLayerTreeViewClient,
which will take a bit more refactoring.

  • public/WebWidget.h:

(WebWidget):
(WebKit::WebWidget::willCloseLayerTreeView):

  • src/WebViewImpl.cpp:

(WebKit::WebViewImpl::willCloseLayerTreeView):
(WebKit):

  • src/WebViewImpl.h:

(WebViewImpl):

Location:
trunk/Source/WebKit/chromium
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r139246 r139252  
     12013-01-09  James Robinson  <jamesr@chromium.org>
     2
     3        [chromium] Add a notification when a WebWidget's WebLayerTreeView is about to go away
     4        https://bugs.webkit.org/show_bug.cgi?id=106495
     5
     6        Reviewed by Adrienne Walker.
     7
     8        The WebWidget / WebLayerTreeView ownership is in a slightly awkward place. I'm moving the ownership
     9        of the WebLayerTreeView to the WebWidgetClient, but to stage things sanely the WebLayerTreeView's
     10        client is sill owned by the WebWidget implementation. Thus to shut down cleanly we need an explicit
     11        notification to the WebWidget that the WebLayerTreeView is going to go away.
     12
     13        This API can go away once the WebWidget implementation does not provide the WebLayerTreeViewClient,
     14        which will take a bit more refactoring.
     15
     16        * public/WebWidget.h:
     17        (WebWidget):
     18        (WebKit::WebWidget::willCloseLayerTreeView):
     19        * src/WebViewImpl.cpp:
     20        (WebKit::WebViewImpl::willCloseLayerTreeView):
     21        (WebKit):
     22        * src/WebViewImpl.h:
     23        (WebViewImpl):
     24
    1252013-01-09  Mark Pilgrim  <pilgrim@chromium.org>
    226
  • trunk/Source/WebKit/chromium/public/WebWidget.h

    r139227 r139252  
    221221    virtual bool isAcceleratedCompositingActive() const { return false; }
    222222
     223    // The WebLayerTreeView initialized on this WebWidgetClient will be going away and
     224    // is no longer safe to access.
     225    virtual void willCloseLayerTreeView() { }
     226
    223227    // Calling WebWidgetClient::requestPointerLock() will result in one
    224228    // return call to didAcquirePointerLock() or didNotAcquirePointerLock().
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r139177 r139252  
    25152515}
    25162516
     2517void WebViewImpl::willCloseLayerTreeView()
     2518{
     2519    setIsAcceleratedCompositingActive(false);
     2520    m_layerTreeView = 0;
     2521}
     2522
    25172523void WebViewImpl::didAcquirePointerLock()
    25182524{
  • trunk/Source/WebKit/chromium/src/WebViewImpl.h

    r139177 r139252  
    177177    virtual void setTextDirection(WebTextDirection direction);
    178178    virtual bool isAcceleratedCompositingActive() const;
     179    virtual void willCloseLayerTreeView();
    179180    virtual void didAcquirePointerLock();
    180181    virtual void didNotAcquirePointerLock();
Note: See TracChangeset for help on using the changeset viewer.