Bug 54689

Summary: HTML Fragment parsing bug in HTMLHtmlElement.
Product: WebKit Reporter: Michael Nordman <michaeln>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, aestes, michaeln
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   

Description Michael Nordman 2011-02-17 14:14:45 PST
Looks like the test for fragment'ness when a synthesized <html> element for an innerHtml fragment no longer functions properly in HTMLHtmlElement::insertedByParser().

void HTMLHtmlElement::insertedByParser()
{
    // When parsing a fragment, its dummy document has a null parser.
    if (!document()->parser() || !document()->parser()->documentWasLoadedAsPartOfNavigation())
        return;

That test no longer weeds out these elements so the method continues when it shouldn't. This has bad consequences for the appcache system.

See http://code.google.com/p/chromium/issues/detail?id=72986 for some history.
Comment 1 Andy Estes 2011-02-17 17:30:47 PST
Working on it. I actually think this will be fixed by the patch I'm uploading to https://bugs.webkit.org/show_bug.cgi?id=48719, which will not create an HTML element during fragment parsing.
Comment 2 Michael Nordman 2011-02-17 17:31:57 PST
Thank you!
Comment 3 Andy Estes 2011-03-03 15:03:28 PST
Michael, can you verify that this assertion is no longer hit in a build with r80231?
Comment 4 Andy Estes 2011-03-03 15:03:53 PST
Sorry, I had assertions on the mind. I meant to say bug.
Comment 5 Michael Nordman 2011-03-03 15:22:39 PST
Sure, when we roll this revision into view for chrome i'll take a look.
Comment 6 Michael Nordman 2011-03-14 14:35:45 PDT
Looks good to me. I'm no longer seeing multiple invocations of selectCache() for html fragments.
Comment 7 Andy Estes 2011-03-14 14:36:18 PDT
(In reply to comment #6)
> Looks good to me. I'm no longer seeing multiple invocations of selectCache() for html fragments.

Thanks for checking Michael!