WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
111907
[HTMLTemplateElement] EOF should unwind the stack of template insertion modes iteratively
https://bugs.webkit.org/show_bug.cgi?id=111907
Summary
[HTMLTemplateElement] EOF should unwind the stack of template insertion modes...
Rafael Weinstein
Reported
2013-03-08 17:41:03 PST
The current implementation follows the previous spec language of unwinding all open templates immediately. The new language calls for other insertion modes to act as if a </template> had been seen, then reprocess the EOF (which is more consistent with existing parser mechanisms). There should be no observable difference between the two implementations, but we keep our parser inline with the spec, so this patch reflects the new spec language.
Attachments
Patch
(6.03 KB, patch)
2013-03-08 17:44 PST
,
Rafael Weinstein
no flags
Details
Formatted Diff
Diff
Patch
(6.52 KB, patch)
2013-03-11 16:41 PDT
,
Rafael Weinstein
no flags
Details
Formatted Diff
Diff
Patch
(5.10 KB, patch)
2013-03-13 16:37 PDT
,
Rafael Weinstein
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Rafael Weinstein
Comment 1
2013-03-08 17:44:18 PST
Created
attachment 192317
[details]
Patch
Adam Klein
Comment 2
2013-03-08 17:49:23 PST
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...
Rafael Weinstein
Comment 3
2013-03-08 17:59:17 PST
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.
WebKit Review Bot
Comment 4
2013-03-08 18:34:20 PST
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
Adam Barth
Comment 5
2013-03-08 19:35:31 PST
Looks like you've got some failing tests to work through.
Build Bot
Comment 6
2013-03-09 02:41:52 PST
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
Rafael Weinstein
Comment 7
2013-03-11 16:41:47 PDT
Created
attachment 192591
[details]
Patch
Rafael Weinstein
Comment 8
2013-03-11 16:41:59 PDT
Fixed template.innerHTML case
Rafael Weinstein
Comment 9
2013-03-13 16:37:15 PDT
Created
attachment 193023
[details]
Patch
Rafael Weinstein
Comment 10
2013-03-13 16:38:14 PDT
PTAL. Note that the spec bug has been resolved here:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20924
Adam Barth
Comment 11
2013-03-13 16:40:08 PDT
Comment on
attachment 193023
[details]
Patch ok
WebKit Review Bot
Comment 12
2013-03-13 17:05:45 PDT
Comment on
attachment 193023
[details]
Patch Clearing flags on attachment: 193023 Committed
r145772
: <
http://trac.webkit.org/changeset/145772
>
WebKit Review Bot
Comment 13
2013-03-13 17:05:50 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug