Crash in Document::setFocusedNode if the frame of new focused node is detached in 'change' event handler
https://bugs.webkit.org/show_bug.cgi?id=112653

Reviewed by Dimitri Glazkov.

Source/WebCore:

Test: fast/frames/detach-frame-during-focus.html

* page/FocusController.cpp:
(WebCore::FocusController::setFocusedNode):
A oldDocument->setFocusedNode call might dispatch a 'change' event for
an old focused node, and an event handler code might detach the
newFocusedFrame. So we should check it. Without the check, the following
newDocument->setFocusedNode call would crash because of null
Frame::page().

LayoutTests:

* fast/frames/detach-frame-during-focus-expected.txt: Added.
* fast/frames/detach-frame-during-focus.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146393 268f45cc-cd09-0410-ab3c-d52691b4dbfc