Reviewed by Darin.
<rdar://problem/
3805137> REGRESSION: Cannot search on pricetool.com
The problem here is that residual style handling can cause an
element associated with a misnested form to lose the association,
because it can become detached and then reattached in this
case. So we need to maintain the association.
* khtml/html/html_formimpl.h: Added list of dormant elements to form,
and dormant bit to generic form element.
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::~HTMLFormElementImpl): Clear m_form field for
dormant elements too.
(DOM::HTMLFormElementImpl::registerFormElement): Remove from dormant list
in addition to adding to main list.
(DOM::HTMLFormElementImpl::removeFormElement): Remove from both lists.
(DOM::HTMLFormElementImpl::makeFormElementDormant): New method, remove from
main list, add to dormant list.
(DOM::HTMLGenericFormElementImpl::HTMLGenericFormElementImpl): Initialize
dormant bit to false.
(DOM::HTMLGenericFormElementImpl::insertedIntoDocument): If the element is
dormant and has a form, re-register it and clear the dormant bit.
(DOM::HTMLGenericFormElementImpl::removedFromDocument): If the document has
a form, tell the form it is dormant and set the dormant bit.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7633
268f45cc-cd09-0410-ab3c-
d52691b4dbfc