2011-03-10 Emil A Eklund <eae@chromium.org>
Reviewed by Darin Adler.
Collection cache not reset when moving base node between documents
https://bugs.webkit.org/show_bug.cgi?id=55446
Add tests for accessing elements moved across documents using namedItem.
* fast/dom/HTMLFormElement/invalid-form-field-expected.txt: Added.
* fast/dom/HTMLFormElement/invalid-form-field.html: Added.
* fast/dom/HTMLFormElement/move-option-between-documents-expected.txt: Added.
* fast/dom/HTMLFormElement/move-option-between-documents.html: Added.
* fast/dom/collection-nameditem-move-between-documents-expected.txt: Added.
* fast/dom/collection-nameditem-move-between-documents.html: Added.
2011-03-10 Emil A Eklund <eae@chromium.org>
Reviewed by Darin Adler.
Collection cache not reset when moving base node between documents
https://bugs.webkit.org/show_bug.cgi?id=55446
Fix bug where HTMLCollection::resetCollectionInfo does not reset the
cache when the base node is moved to a different document by making sure
that the DOMVersion is updated and that it's unique across documents.
Tests: fast/dom/HTMLFormElement/invalid-form-field.html
fast/dom/HTMLFormElement/move-option-between-documents.html
fast/dom/collection-nameditem-move-between-documents.html
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore::Document::incDOMTreeVersion):
(WebCore::Document::domTreeVersion):
* dom/Node.cpp:
(WebCore::Node::setDocumentRecursively):
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::resetFormOwner):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::resetCollectionInfo):
* xml/XPathResult.h:
git-svn-id: svn://svn.chromium.org/blink/trunk@80797 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment