Changeset 63760 in webkit


Ignore:
Timestamp:
Jul 20, 2010 11:28:22 AM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-07-20 Adam Barth <abarth@webkit.org>

Reviewed by Darin Adler.

HTML5 tree builder should restore form state
https://bugs.webkit.org/show_bug.cgi?id=42644

We need to tell self-closing tags that we're done parsing their
children. This patch fixes the following LayoutTests when run with
--html5-treebuilder:

fast/forms/button-state-restore.html
fast/forms/state-restore-to-non-autocomplete-form.html
fast/forms/state-restore-to-non-edited-controls.html
fast/history/saves-state-after-fragment-nav.html
http/tests/navigation/restore-form-state-https.html

  • html/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r63759 r63760  
     12010-07-20  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        HTML5 tree builder should restore form state
     6        https://bugs.webkit.org/show_bug.cgi?id=42644
     7
     8        We need to tell self-closing tags that we're done parsing their
     9        children.  This patch fixes the following LayoutTests when run with
     10        --html5-treebuilder:
     11
     12          fast/forms/button-state-restore.html
     13          fast/forms/state-restore-to-non-autocomplete-form.html
     14          fast/forms/state-restore-to-non-edited-controls.html
     15          fast/history/saves-state-after-fragment-nav.html
     16          http/tests/navigation/restore-form-state-https.html
     17
     18        * html/HTMLConstructionSite.cpp:
     19        (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
     20
    1212010-07-20  Sheriff Bot  <webkit.review.bot@gmail.com>
    222
  • trunk/WebCore/html/HTMLConstructionSite.cpp

    r63393 r63760  
    234234{
    235235    ASSERT(token.type() == HTMLToken::StartTag);
    236     attachToCurrent(createHTMLElement(token));
     236    RefPtr<Element> element = attachToCurrent(createHTMLElement(token));
     237    // Normally HTMLElementStack is responsible for calling finishParsingChildren,
     238    // but self-closing elements are never in the element stack so the stack
     239    // doesn't get a chance to tell them that we're done parsing their children.
     240    element->finishParsingChildren();
    237241    // FIXME: Do we want to acknowledge the token's self-closing flag?
    238242    // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#acknowledge-self-closing-flag
Note: See TracChangeset for help on using the changeset viewer.