LayoutTests:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jul 2007 22:35:50 +0000 (22:35 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jul 2007 22:35:50 +0000 (22:35 +0000)
commit2ab3f7b8ca3643997036851b2481ea4969fb4dff
treec78d054e6135fa0d7ac76ab06c9c744ce25df5ea
parent0180f44f0225bd95a1313f8d91a8249fc47ec5e9
LayoutTests:

        Reviewed by Oliver.

        - test case for <rdar://problem/5326303> REGRESSION: blur event fires upon navigating away from a page with focused element

        (Test mostly by Alice.)

        * fast/events/no-blur-on-page-leave-expected.txt: Added.
        * fast/events/no-blur-on-page-leave.html: Added.
        * fast/events/resources/no-blur-result.html: Added.

WebCore:

        Reviewed by Oliver.

        <rdar://problem/5326303> REGRESSION: blur event fires upon navigating away from a page with focused element

        The proximate cause was the recent change to keep focus on the
        WebHTMLView when switching views. But the reason this happend was
        that didCommitLoadForFrame got called at a time when the new view
        was in place, but the old document was still there. This was a
        longstanding problem with the delegate, and fixing it cleans it
        up.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::begin): Don't send dispatchWindowObjectAvailable if
        caller asked not to (this is to allow order of delegates to be the same).
        (WebCore::FrameLoader::transitionToCommitted): Don't emit didCommitLoadForFrame here.
        (WebCore::FrameLoader::receivedFirstData): Instead do it here, after calling begin(),
        so the new document is set up.
        * loader/FrameLoader.h: Add new optional parameter to begin().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/no-blur-on-page-leave-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/no-blur-on-page-leave.html [new file with mode: 0644]
LayoutTests/fast/events/resources/no-blur-result.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/loader/FrameLoader.cpp
WebCore/loader/FrameLoader.h