Update dependencies
This commit is contained in:
parent
613d9fca6e
commit
71bfe92dae
25 changed files with 1452 additions and 1885 deletions
2
vendor/golang.org/x/net/html/node.go
generated
vendored
2
vendor/golang.org/x/net/html/node.go
generated
vendored
|
@ -177,7 +177,7 @@ func (s *nodeStack) index(n *Node) int {
|
|||
// contains returns whether a is within s.
|
||||
func (s *nodeStack) contains(a atom.Atom) bool {
|
||||
for _, n := range *s {
|
||||
if n.DataAtom == a {
|
||||
if n.DataAtom == a && n.Namespace == "" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
28
vendor/golang.org/x/net/html/parse.go
generated
vendored
28
vendor/golang.org/x/net/html/parse.go
generated
vendored
|
@ -1719,8 +1719,12 @@ func inSelectIM(p *parser) bool {
|
|||
}
|
||||
p.addElement()
|
||||
case a.Select:
|
||||
p.tok.Type = EndTagToken
|
||||
return false
|
||||
if p.popUntil(selectScope, a.Select) {
|
||||
p.resetInsertionMode()
|
||||
} else {
|
||||
// Ignore the token.
|
||||
return true
|
||||
}
|
||||
case a.Input, a.Keygen, a.Textarea:
|
||||
if p.elementInScope(selectScope, a.Select) {
|
||||
p.parseImpliedToken(EndTagToken, a.Select, a.Select.String())
|
||||
|
@ -1750,6 +1754,9 @@ func inSelectIM(p *parser) bool {
|
|||
case a.Select:
|
||||
if p.popUntil(selectScope, a.Select) {
|
||||
p.resetInsertionMode()
|
||||
} else {
|
||||
// Ignore the token.
|
||||
return true
|
||||
}
|
||||
case a.Template:
|
||||
return inHeadIM(p)
|
||||
|
@ -1775,13 +1782,22 @@ func inSelectInTableIM(p *parser) bool {
|
|||
case StartTagToken, EndTagToken:
|
||||
switch p.tok.DataAtom {
|
||||
case a.Caption, a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr, a.Td, a.Th:
|
||||
if p.tok.Type == StartTagToken || p.elementInScope(tableScope, p.tok.DataAtom) {
|
||||
p.parseImpliedToken(EndTagToken, a.Select, a.Select.String())
|
||||
return false
|
||||
} else {
|
||||
if p.tok.Type == EndTagToken && !p.elementInScope(tableScope, p.tok.DataAtom) {
|
||||
// Ignore the token.
|
||||
return true
|
||||
}
|
||||
// This is like p.popUntil(selectScope, a.Select), but it also
|
||||
// matches <math select>, not just <select>. Matching the MathML
|
||||
// tag is arguably incorrect (conceptually), but it mimics what
|
||||
// Chromium does.
|
||||
for i := len(p.oe) - 1; i >= 0; i-- {
|
||||
if n := p.oe[i]; n.DataAtom == a.Select {
|
||||
p.oe = p.oe[:i]
|
||||
break
|
||||
}
|
||||
}
|
||||
p.resetInsertionMode()
|
||||
return false
|
||||
}
|
||||
}
|
||||
return inSelectIM(p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue