2010-12-09 Abhishek Arya <inferno@chromium.org>
authorinferno@chromium.org <inferno@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Dec 2010 17:51:07 +0000 (17:51 +0000)
committerinferno@chromium.org <inferno@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Dec 2010 17:51:07 +0000 (17:51 +0000)
commitfd8e006ebdc2c7e9ce05bd16c7d970640bedbd3a
tree163e1777790d3d1c96f3e03d6ca7c7f9ae8fc916
parente5cbec63042ea149426949f09ed10b9202a1f3ce
2010-12-09  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Dimitri Glazkov.

        As part of r73559, I added the referenceNode check to validate whether the root
        node of the iterator matches the node which is getting moved to other document.
        referenceNode is initialized to root, however can get moved using previousNode
        and nextNode methods, so it is required to use root directly.
        https://bugs.webkit.org/show_bug.cgi?id=50764

        Test: fast/dom/node-iterator-reference-node-moved-crash.html

        * dom/Document.cpp:
        (WebCore::Document::moveNodeIteratorsToNewDocument): change referenceNode to root.
2010-12-09  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Dimitri Glazkov.

        Tests that we do not crash when we move the referenceNode using node iterator
        methods previousNode and nextNode.
        https://bugs.webkit.org/show_bug.cgi?id=50764

        * fast/dom/node-iterator-reference-node-moved-crash-expected.txt: Added.
        * fast/dom/node-iterator-reference-node-moved-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/node-iterator-reference-node-moved-crash-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/node-iterator-reference-node-moved-crash.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/dom/Document.cpp