WebCore:
Reviewed by Hyatt.
Fix for <rdar://problem/
5464998> REGRESSION (9A543): Using Sort
options takes you back to search screen on zappos.com
The current mechanism for preserving form elements across removes
did not work in the case where the input was moved by the parser to
be out of scope of the form. This fixes that problem by having the
parser keep track of the preserve boolean rather than the current
form element.
* dom/Tokenizer.h:
(WebCore::Tokenizer::isHTMLTokenizer): New function.
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::HTMLFormElement): Get rid of
m_preserveAcrossRemove.
* html/HTMLFormElement.h:
(WebCore::HTMLFormElement::isMalformed): Get rid of
m_preserveAcrossRemove.
* html/HTMLGenericFormElement.cpp:
(WebCore::HTMLGenericFormElement::removedFromTree): Ask the parser
if it is currently handling residual style rather than asking the
form if it wants to preserveAcrossRemove.
* html/HTMLParser.cpp:
(WebCore::HTMLParser::HTMLParser): New boolean to initialize.
(WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Set
m_handlingResidualStyleAcrossBlocks to true at the beginning and
false at the end.
* html/HTMLParser.h:
(WebCore::HTMLParser::isHandlingResidualStyleAcrossBlocks):
* html/HTMLTokenizer.h:
(WebCore::HTMLTokenizer::isHTMLTokenizer):
(WebCore::HTMLTokenizer::htmlParser):
LayoutTests:
Reviewed by Hyatt.
Test for <rdar://problem/
5464998> REGRESSION (9A543): Using Sort
options takes you back to search screen on zappos.com
* fast/forms/preserveFormDuringResidualStyle.html: Added.
* platform/mac/fast/forms/preserveFormDuringResidualStyle-expected.checksum: Added.
* platform/mac/fast/forms/preserveFormDuringResidualStyle-expected.png: Added.
* platform/mac/fast/forms/preserveFormDuringResidualStyle-expected.txt: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25521
268f45cc-cd09-0410-ab3c-
d52691b4dbfc