Consider all ancestors not just parentElement when disconnecting frames
https://bugs.webkit.org/show_bug.cgi?id=107769

Reviewed by Eric Seidel.

Source/WebCore:

Previous we only used the parentElement of the frame owner to decide if
we should disconnect the frame, but this means if you reparent a subtree
that contains multiple frames from inside an unload handler we'll disconnect
the subframes even though they're now in a different part of the document.

We can fix this by using containsIncludingShadowDOM, and also simplify the
code by removing ChildFrameDisconnector::Target.

Test: fast/frames/unload-reparent-sibling-frame.html

* dom/ContainerNodeAlgorithms.cpp:
* dom/ContainerNodeAlgorithms.h:
(ChildFrameDisconnector):
(ChildFrameDisconnector::Target): Removed.
(WebCore::ChildFrameDisconnector::collectFrameOwners):
(WebCore::ChildFrameDisconnector::disconnectCollectedFrameOwners):

LayoutTests:

Add a test for moving frames around inside unload handlers.

* fast/frames/unload-reparent-sibling-frame-expected.txt: Added.
* fast/frames/unload-reparent-sibling-frame.html: Added.


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