Skip to content

Commit

Permalink
html: remove special procedure for <template> in frameset im
Browse files Browse the repository at this point in the history
See more details: https://bugs.chromium.org/p/chromium/issues/detail?id=829668

Updates golang/go#23071

Change-Id: Ib9c963269f814c3f21d3784754729df57dcc8f90
Reviewed-on: https://go-review.googlesource.com/123776
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
  • Loading branch information
namusyaka authored and tmm1 committed Sep 12, 2022
1 parent b1cc14a commit f5f9e2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
13 changes: 1 addition & 12 deletions html/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -1071,13 +1071,7 @@ func inBodyIM(p *parser) bool {
p.acknowledgeSelfClosingTag()
}
return true
case a.Frame:
// TODO: remove this divergence from the HTML5 spec.
if p.oe.contains(a.Template) {
p.addElement()
return true
}
case a.Caption, a.Col, a.Colgroup, a.Head, a.Tbody, a.Td, a.Tfoot, a.Th, a.Thead, a.Tr:
case a.Caption, a.Col, a.Colgroup, a.Frame, a.Head, a.Tbody, a.Td, a.Tfoot, a.Th, a.Thead, a.Tr:
// Ignore the token.
default:
p.reconstructActiveFormattingElements()
Expand Down Expand Up @@ -1925,11 +1919,6 @@ func inFramesetIM(p *parser) bool {
p.acknowledgeSelfClosingTag()
case a.Noframes:
return inHeadIM(p)
case a.Template:
// TODO: remove this divergence from the HTML5 spec.
//
// See https://bugs.chromium.org/p/chromium/issues/detail?id=829668
return inTemplateIM(p)
}
case EndTagToken:
switch p.tok.DataAtom {
Expand Down
8 changes: 1 addition & 7 deletions html/testdata/webkit/template.dat
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,7 @@
| <html>
| <head>
| <frameset>
| <template>
| content
| <frame>
| <frame>

#data
<template><frame></frame></frameset><frame></frame></template>
Expand All @@ -489,8 +487,6 @@
| <head>
| <template>
| content
| <frame>
| <frame>
| <body>

#data
Expand Down Expand Up @@ -823,8 +819,6 @@
| <head>
| <template>
| content
| <frame>
| <frame>
| <body>

#data
Expand Down

0 comments on commit f5f9e2a

Please sign in to comment.