REGRESSION(r160182): Fragment parser doesn't close a form element with a close tag
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Dec 2014 10:58:56 +0000 (10:58 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Dec 2014 10:58:56 +0000 (10:58 +0000)
commit6ab1f1a0ba0897722652cefc6c821d1b72398660
tree35094db0f56e5574e44e6757c8f92fb35226d839
parenta29fe42e12d6ff2d46df7f5902a99e7c1cb9cea4
REGRESSION(r160182): Fragment parser doesn't close a form element with a close tag
https://bugs.webkit.org/show_bug.cgi?id=139561

Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by us not setting the form pointer in insertHTMLFormElement.
Since we already avoid associating a form inside HTMLConstructionSite::createHTMLElement,
we didn't need this code at all.

Fixed the bug by partially reverting r160182.

Test: fast/dom/dom-parse-close-form.html

* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertHTMLFormElement):
(WebCore::HTMLConstructionSite::insideTemplateElement): Deleted.
* html/parser/HTMLConstructionSite.h:

LayoutTests:

Added a regression test.

* fast/dom/dom-parse-close-form-expected.txt: Added.
* fast/dom/dom-parse-close-form.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/dom-parse-close-form-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/dom-parse-close-form.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/parser/HTMLConstructionSite.cpp
Source/WebCore/html/parser/HTMLConstructionSite.h