JavaScriptCore:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Jan 2007 13:43:13 +0000 (13:43 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Jan 2007 13:43:13 +0000 (13:43 +0000)
commitfdd8282ef8d9e35f57d0f536807bf921b590a502
treefce8029b0563ceab1a377b947c71e63d0105c2fc
parent7e7b2569b55d40c3bfca9ef9709bc14e56c020c2
JavaScriptCore:

        Reviewed by Mark with help from Lars.

        - added new ListHashSet class, which combines a hashtable and a linked list to provide a set
        that keeps elements in inserted order

        This is to assist in fixing the following:
        <rdar://problem/4751164> REGRESSION: Safari places text on incorrect button when returning to a page via back [10541]
        http://bugs.webkit.org/show_bug.cgi?id=10541

        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * wtf/HashTable.h:
        (WTF::HashTable::find):
        (WTF::HashTable::contains):
        (WTF::::find):
        (WTF::::contains):
        * wtf/ListHashSet.h: Added.
        (WTF::ListHashSetNode::ListHashSetNode):
        (WTF::ListHashSetNodeHashFunctions::hash):
        (WTF::ListHashSetNodeHashFunctions::equal):
        (WTF::ListHashSetIterator::ListHashSetIterator):
        (WTF::ListHashSetIterator::get):
        (WTF::ListHashSetIterator::operator*):
        (WTF::ListHashSetIterator::operator->):
        (WTF::ListHashSetIterator::operator++):
        (WTF::ListHashSetIterator::operator--):
        (WTF::ListHashSetIterator::operator==):
        (WTF::ListHashSetIterator::operator!=):
        (WTF::ListHashSetIterator::operator const_iterator):
        (WTF::ListHashSetIterator::node):
        (WTF::ListHashSetConstIterator::ListHashSetConstIterator):
        (WTF::ListHashSetConstIterator::get):
        (WTF::ListHashSetConstIterator::operator*):
        (WTF::ListHashSetConstIterator::operator->):
        (WTF::ListHashSetConstIterator::operator++):
        (WTF::ListHashSetConstIterator::operator--):
        (WTF::ListHashSetConstIterator::operator==):
        (WTF::ListHashSetConstIterator::operator!=):
        (WTF::ListHashSetConstIterator::node):
        (WTF::ListHashSetTranslator::hash):
        (WTF::ListHashSetTranslator::equal):
        (WTF::ListHashSetTranslator::translate):
        (WTF::::ListHashSet):
        (WTF::::operator):
        (WTF::::~ListHashSet):
        (WTF::::size):
        (WTF::::capacity):
        (WTF::::isEmpty):
        (WTF::::begin):
        (WTF::::end):
        (WTF::::find):
        (WTF::::contains):
        (WTF::::add):
        (WTF::::remove):
        (WTF::::clear):
        (WTF::::unlinkAndDelete):
        (WTF::::appendNode):
        (WTF::::deleteAllNodes):
        (WTF::::makeIterator):
        (WTF::::makeConstIterator):
        (WTF::deleteAllValues):

WebCore:

        Reviewed by Mark.

        - fixed <rdar://problem/4751164> REGRESSION: Safari places text on incorrect button when returning to a page via back [10541]
        http://bugs.webkit.org/show_bug.cgi?id=10541

        * dom/Document.cpp:
        (WebCore::Document::formElementsState):
        * dom/Document.h:

        I couldn't figure out the back/forward support in the tests enough
        to make an automated test, but this maual test reproduces the
        problem 100% without this patch:

        * manual-tests/back.html: Added.
        * manual-tests/form-control-madness.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/wtf/HashTable.h
JavaScriptCore/wtf/ListHashSet.h [new file with mode: 0644]
WebCore/ChangeLog
WebCore/dom/Document.cpp
WebCore/dom/Document.h
WebCore/manual-tests/back.html [new file with mode: 0644]
WebCore/manual-tests/form-control-madness.html [new file with mode: 0644]