Summary: | [HTMLTemplateElement] EOF should unwind the stack of template insertion modes iteratively | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Rafael Weinstein <rafaelw> | ||||||||
Component: | DOM | Assignee: | Rafael Weinstein <rafaelw> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | abarth, adamk, buildbot, dglazkov, eric, esprehn+autocc, ojan.autocc, rniwa, webkit.review.bot | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 103547 | ||||||||||
Attachments: |
|
Description
Rafael Weinstein
2013-03-08 17:41:03 PST
Created attachment 192317 [details]
Patch
Comment on attachment 192317 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192317&action=review > Source/WebCore/html/parser/HTMLTreeBuilder.cpp:977 > + processTemplateEndTag(token); Don't you want to process a fake template end tag instead of passing an EndOfFile token through to processTemplateEndTag? That seems like the usual thing to do in this situation... Comment on attachment 192317 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192317&action=review >> Source/WebCore/html/parser/HTMLTreeBuilder.cpp:977 >> + processTemplateEndTag(token); > > Don't you want to process a fake template end tag instead of passing an EndOfFile token through to processTemplateEndTag? That seems like the usual thing to do in this situation... That's what happens. The token is only used if there is a parseError. This isn't really helpful since our parserError(token) doesn't do anything. I realize this is confusing. processTemplateEndTag can be called with either a </template> or an EOF. It should be impossible to hit the parse error in the EOF case, but that doesn't help needing the token. Comment on attachment 192317 [details] Patch Attachment 192317 [details] did not pass chromium-ews (chromium-xvfb): Output: http://webkit-commit-queue.appspot.com/results/17017418 New failing tests: fast/dom/HTMLTemplateElement/innerHTML-inert.html fast/dom/HTMLTemplateElement/innerHTML.html Looks like you've got some failing tests to work through. Comment on attachment 192317 [details] Patch Attachment 192317 [details] did not pass mac-ews (mac): Output: http://webkit-commit-queue.appspot.com/results/17047655 New failing tests: editing/selection/selection-modify-crash.html Created attachment 192591 [details]
Patch
Fixed template.innerHTML case Created attachment 193023 [details]
Patch
PTAL. Note that the spec bug has been resolved here: https://www.w3.org/Bugs/Public/show_bug.cgi?id=20924 Comment on attachment 193023 [details]
Patch
ok
Comment on attachment 193023 [details] Patch Clearing flags on attachment: 193023 Committed r145772: <http://trac.webkit.org/changeset/145772> All reviewed patches have been landed. Closing bug. |