Ensure that removing an iframe from the DOM tree disconnects its Frame.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Feb 2014 03:52:02 +0000 (03:52 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Feb 2014 03:52:02 +0000 (03:52 +0000)
commit0d6bbb16f474d1b30cc18abf814f4701b3dc597e
tree4c005ed4d9eb4b8bdbf465bff15e46e4ca627124
parent3a253477dfe813150e35d08a3129b0a16612463a
Ensure that removing an iframe from the DOM tree disconnects its Frame.
<https://webkit.org/b/128889>
<rdar://problem/15671221>

Merged from Blink (patch by Adam Klein):
https://src.chromium.org/viewvc/blink?revision=156174&view=revision

Source/WebCore:

SubframeLoadingDisabler wasn't catching the case when an <iframe> was,
in its unload handler, removed and re-added to the same parent.
Fix this by using a count of SubframeLoadingDisablers that are on the
stack for a given root, rather than a simple boolean.

Test: fast/frames/reattach-in-unload.html

* html/HTMLFrameOwnerElement.h:
(WebCore::SubframeLoadingDisabler::disabledSubtreeRoots):

LayoutTests:

* fast/frames/reattach-in-unload-expected.txt: Added.
* fast/frames/reattach-in-unload.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/frames/reattach-in-unload-expected.txt [new file with mode: 0644]
LayoutTests/fast/frames/reattach-in-unload.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLFrameOwnerElement.h