WebCore:
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Jun 2009 20:55:09 +0000 (20:55 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Jun 2009 20:55:09 +0000 (20:55 +0000)
commit81504d6cf500dead05b155aba7bc959880c48751
tree22eebbf649b7e10b282bd035a7455c6bb04883cf
parentad438ddecbc7825ac1eb4652d76ffb3ea88c95b2
WebCore:

2009-06-04  David Hyatt  <hyatt@apple.com>

        Reviewed by Sam Weinig.

        Move DOM window focus/blur out of SelectionController and into FocusController.  Make sure it
        fires on the focused frame when the page activation state changes also.  This is covered by an existing
        layout test (albeit badly).  I have modified the test to be correct.

        * editing/SelectionController.cpp:
        (WebCore::SelectionController::setFocused):
        * page/FocusController.cpp:
        (WebCore::FocusController::setFocusedFrame):
        (WebCore::FocusController::setActive):

WebKit/mac:

2009-06-04  David Hyatt  <hyatt@apple.com>

        Reviewed by Sam Weinig.

        Remove _updateFocusedStateForFrame, since it's actually not even necessary now that I made
        setFocusedFrame get called explicitly from become/ResignFirstResponder.  setFocusedFrame does
        the work of focusing the selection already.

        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::transitionToCommittedForNewPage):
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView becomeFirstResponder]):
        (-[WebHTMLView resignFirstResponder]):
        * WebView/WebView.mm:
        * WebView/WebViewInternal.h:

LayoutTests:

2009-06-04  David Hyatt  <hyatt@apple.com>

        Reviewed by Sam Weinig.

        Fix the Window focus test to not resign first responder, since that actually made the test
        incorrect.  An unfocused WebHTMLView's DOM window should not receive focus/blur events when the activation
        changes.

        Now the test just checks that a first responder WebHTMLView will actually fire focus/blur on the DOM window
        as the window gains/loses key.

        * fast/dom/Window/window-onFocus.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@44429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/window-onFocus.html
WebCore/ChangeLog
WebCore/editing/SelectionController.cpp
WebCore/page/FocusController.cpp
WebKit/mac/ChangeLog
WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/mac/WebView/WebHTMLView.mm
WebKit/mac/WebView/WebView.mm
WebKit/mac/WebView/WebViewInternal.h