⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 98393 in webkit


Ignore:
Timestamp:
Oct 25, 2011, 2:10:12 PM (15 years ago)
Author:
commit-queue@webkit.org
Message:

Fix teardown in Web*LayerImpl, and add tests for Web*Layer
https://bugs.webkit.org/show_bug.cgi?id=70431

Patch by Antoine Labour <piman@chromium.org> on 2011-10-25
Reviewed by James Robinson.

  • src/WebContentLayerImpl.cpp:

(WebKit::WebContentLayerImpl::~WebContentLayerImpl):

  • src/WebExternalTextureLayerImpl.cpp:

(WebKit::WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl):

  • src/WebLayerImpl.cpp:

(WebKit::WebLayerImpl::~WebLayerImpl):

Location:
trunk/Source
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h

    r98360 r98393  
    9797    virtual IntSize contentBounds() const { return bounds(); }
    9898
    99     void setMasksToBounds(bool masksToBounds) { m_masksToBounds = masksToBounds; }
     99    void setMasksToBounds(bool masksToBounds) { m_masksToBounds = masksToBounds; setNeedsCommit(); }
    100100    bool masksToBounds() const { return m_masksToBounds; }
    101101
     
    103103    const String& name() const { return m_name; }
    104104
    105     void setMaskLayer(LayerChromium* maskLayer) { m_maskLayer = maskLayer; }
     105    void setMaskLayer(LayerChromium* maskLayer) { m_maskLayer = maskLayer; setNeedsCommit(); }
    106106    LayerChromium* maskLayer() const { return m_maskLayer.get(); }
    107107
  • trunk/Source/WebKit/chromium/ChangeLog

    r98388 r98393  
     12011-10-25  Antoine Labour  <piman@chromium.org>
     2
     3        Fix teardown in Web*LayerImpl, and add tests for Web*Layer
     4        https://bugs.webkit.org/show_bug.cgi?id=70431
     5
     6        Reviewed by James Robinson.
     7
     8        * src/WebContentLayerImpl.cpp:
     9        (WebKit::WebContentLayerImpl::~WebContentLayerImpl):
     10        * src/WebExternalTextureLayerImpl.cpp:
     11        (WebKit::WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl):
     12        * src/WebLayerImpl.cpp:
     13        (WebKit::WebLayerImpl::~WebLayerImpl):
     14
    1152011-10-25  Adam Barth  <abarth@webkit.org>
    216
  • trunk/Source/WebKit/chromium/WebKit.gypi

    r98347 r98393  
    8282            'tests/WebCompositorImplTest.cpp',
    8383            'tests/WebFrameTest.cpp',
     84            'tests/WebLayerTest.cpp',
    8485            'tests/WebURLRequestTest.cpp',
    8586            'tests/WebViewTest.cpp',
  • trunk/Source/WebKit/chromium/src/WebContentLayerImpl.cpp

    r96990 r98393  
    5555WebContentLayerImpl::~WebContentLayerImpl()
    5656{
     57    setDelegate(0);
    5758}
    5859
     
    6061{
    6162    m_drawsContent = drawsContent;
     63    setNeedsCommit();
    6264}
    6365
  • trunk/Source/WebKit/chromium/src/WebExternalTextureLayerImpl.cpp

    r97550 r98393  
    4949WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl()
    5050{
     51    setDelegate(0);
    5152}
    5253
  • trunk/Source/WebKit/chromium/src/WebLayerImpl.cpp

    r96990 r98393  
    4444WebLayerImpl::~WebLayerImpl()
    4545{
     46    setDelegate(0);
    4647}
    4748
  • trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp

    r96450 r98393  
    620620    EXPECT_CALL(initialDelegate, notifySyncRequired()).Times(0); // old delegate should not be used when setDelegate gives a new delegate.
    621621    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setDelegate(&mockDelegate));
    622     EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setMasksToBounds(true));
    623622    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setName("Test Layer"));
    624     EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setMaskLayer(dummyLayer.get()));
    625623    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setVisibleLayerRect(IntRect(0, 0, 40, 50)));
    626624    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setScrollPosition(IntPoint(10, 10)));
     
    643641    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 1, testLayer->setAnchorPointZ(0.7f));
    644642    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 1, testLayer->setBackgroundColor(Color(0.4f, 0.4f, 0.4f)));
     643    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 1, testLayer->setMasksToBounds(true));
     644    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 1, testLayer->setMaskLayer(dummyLayer.get()));
    645645    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 1, testLayer->setOpacity(0.5f));
    646646    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 1, testLayer->setOpaque(false));
Note: See TracChangeset for help on using the changeset viewer.