WebCore:
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Dec 2007 03:22:42 +0000 (03:22 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Dec 2007 03:22:42 +0000 (03:22 +0000)
commite083924924351f2e04d670ee043458aa9ed391c5
tree1e4eab817f0e43481202656a4ada958ccf3ee45d
parentfa547555118922508214085ca71fd35ea4067b96
WebCore:

        Reviewed by Oliver Hunt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=16603
          <rdar://problem/5664199> Crash when resizing text field

        Test: fast/layers/resize-layer-deletion-crash.html

        The event handler has only a weak reference to the layer that is
        currently in resize mode, so it is the layer's responsibility to let
        the event handler know if it has been destroyed while in that mode.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::resizeLayerDestroyed): Added. Resets
        m_resizeLayer to 0.
        * page/EventHandler.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::~RenderLayer): Added a call to
        EventHandler::resizeLayerDestroyed() if the layer is in resize mode.

LayoutTests:

        Reviewed by Oliver Hunt.

        - test for http://bugs.webkit.org/show_bug.cgi?id=16603
          <rdar://problem/5664199> Crash when resizing text field

        * fast/layers/resize-layer-deletion-crash-expected.txt: Added.
        * fast/layers/resize-layer-deletion-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/layers/resize-layer-deletion-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/layers/resize-layer-deletion-crash.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/page/EventHandler.cpp
WebCore/page/EventHandler.h
WebCore/rendering/RenderLayer.cpp