WebCore:
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jul 2006 10:33:17 +0000 (10:33 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jul 2006 10:33:17 +0000 (10:33 +0000)
commitceb4c10be717c22447aad49c0b75d961afabfaff
tree839d83d3266d55e8ef51bec293c07b6962111ea4
parentc9cb559e764d503deea229ddb4e33f13561c65ae
WebCore:

2006-07-12  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Maciej.

        <rdar://problem/4586665> REGRESSION: autorestore.apple.com: Crashes Safari in WebCore::Widget::client() const

        * bridge/mac/FrameMac.h:
        Add focusCallResultedInViewBeingCreated argument.

        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::nextKeyViewInFrame):
        If the call to focus() caused the node to get a native widget, set focusCallResultedInViewBeingCreated to true.

        (WebCore::FrameMac::nextKeyViewInFrameHierarchy):
        Don't reset the focus node if focusCallResultedInViewBeingCreated is true. Also, add magic to prevent setting
        a text field as the first responder if its field editor already is the current first responder.

        * page/FrameView.cpp:
        (WebCore::FrameView::handleMousePressEvent):
        In some cases, get the event target node again after dispatching the mouse event.

LayoutTests:

2006-07-12  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Maciej.

        <rdar://problem/4586665> REGRESSION: autorestore.apple.com: Crashes Safari in WebCore::Widget::client() const

        * fast/forms/input-type-change-in-onfocus-keyboard-expected.txt: Added.
        * fast/forms/input-type-change-in-onfocus-keyboard.html: Added.
        * fast/forms/input-type-change-in-onfocus-mouse-expected.txt: Added.
        * fast/forms/input-type-change-in-onfocus-mouse.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/input-type-change-in-onfocus-keyboard-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/input-type-change-in-onfocus-keyboard.html [new file with mode: 0644]
LayoutTests/fast/forms/input-type-change-in-onfocus-mouse-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/input-type-change-in-onfocus-mouse.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/bridge/mac/FrameMac.h
WebCore/bridge/mac/FrameMac.mm
WebCore/page/FrameView.cpp