Bug 108377 - [HTMLTemplateElement] prevent the parser from removing nodes from the content when the foster agency is processing formatting elements
Summary: [HTMLTemplateElement] prevent the parser from removing nodes from the content...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rafael Weinstein
URL:
Keywords:
Depends on:
Blocks: 103547
  Show dependency treegraph
 
Reported: 2013-01-30 14:05 PST by Rafael Weinstein
Modified: 2013-01-30 15:13 PST (History)
5 users (show)

See Also:


Attachments
Patch (5.48 KB, patch)
2013-01-30 14:11 PST, Rafael Weinstein
no flags Details | Formatted Diff | Diff
Patch (6.96 KB, patch)
2013-01-30 14:31 PST, Rafael Weinstein
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Weinstein 2013-01-30 14:05:52 PST
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20829
Comment 1 Rafael Weinstein 2013-01-30 14:11:05 PST
Created attachment 185562 [details]
Patch
Comment 2 Adam Klein 2013-01-30 14:29:12 PST
Comment on attachment 185562 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=185562&action=review

> Source/WebCore/html/parser/HTMLTreeBuilder.cpp:1592
> +            if (commonAncestor->hasTagName(templateTag))

Wouldn't it be nice if we could just do this check inside parserAppendChild? We probably don't want to do this for performance reasons, but we could at least add an ASSERT that the parser never appends directly to <template>. Sort of weird to have an assertion about HTML parsing behavior in ContainerNode.cpp, but then parserAppendChild is effectively part of the HTML parser anyway.
Comment 3 Rafael Weinstein 2013-01-30 14:30:35 PST
Comment on attachment 185562 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=185562&action=review

>> Source/WebCore/html/parser/HTMLTreeBuilder.cpp:1592
>> +            if (commonAncestor->hasTagName(templateTag))
> 
> Wouldn't it be nice if we could just do this check inside parserAppendChild? We probably don't want to do this for performance reasons, but we could at least add an ASSERT that the parser never appends directly to <template>. Sort of weird to have an assertion about HTML parsing behavior in ContainerNode.cpp, but then parserAppendChild is effectively part of the HTML parser anyway.

done
Comment 4 Rafael Weinstein 2013-01-30 14:31:35 PST
Created attachment 185576 [details]
Patch
Comment 5 Adam Barth 2013-01-30 14:34:21 PST
Comment on attachment 185576 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=185576&action=review

> LayoutTests/html5lib/resources/template.dat:946
> +<body><template><i><menu>Foo</i>

Not really related to this patch, but do you have commit rights to the html5lib codesite project?
Comment 6 Rafael Weinstein 2013-01-30 14:36:38 PST
no. that'd be nice =-).
Comment 7 WebKit Review Bot 2013-01-30 15:13:25 PST
Comment on attachment 185576 [details]
Patch

Clearing flags on attachment: 185576

Committed r141327: <http://trac.webkit.org/changeset/141327>
Comment 8 WebKit Review Bot 2013-01-30 15:13:28 PST
All reviewed patches have been landed.  Closing bug.