mirror of
https://github.com/golang/go
synced 2024-11-25 11:57:58 -07:00
html: in foreign content, check for HTML integration points in breakout
elements. Pass tests10.dat, test 33: <!DOCTYPE html><svg><desc><svg><ul>a | <!DOCTYPE html> | <html> | <head> | <body> | <svg svg> | <svg desc> | <svg svg> | <ul> | "a" Also pass test 34: <!DOCTYPE html><p><svg><desc><p> R=andybalholm, dsymonds CC=golang-dev https://golang.org/cl/5536048
This commit is contained in:
parent
d4fe9c6a9d
commit
b4829c1de6
@ -1713,8 +1713,8 @@ func parseForeignContent(p *parser) bool {
|
|||||||
}
|
}
|
||||||
if breakout[p.tok.Data] {
|
if breakout[p.tok.Data] {
|
||||||
for i := len(p.oe) - 1; i >= 0; i-- {
|
for i := len(p.oe) - 1; i >= 0; i-- {
|
||||||
// TODO: HTML, MathML integration points.
|
// TODO: MathML integration points.
|
||||||
if p.oe[i].Namespace == "" {
|
if p.oe[i].Namespace == "" || htmlIntegrationPoint(p.oe[i]) {
|
||||||
p.oe = p.oe[:i+1]
|
p.oe = p.oe[:i+1]
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@ func TestParser(t *testing.T) {
|
|||||||
{"tests4.dat", -1},
|
{"tests4.dat", -1},
|
||||||
{"tests5.dat", -1},
|
{"tests5.dat", -1},
|
||||||
{"tests6.dat", -1},
|
{"tests6.dat", -1},
|
||||||
{"tests10.dat", 33},
|
{"tests10.dat", 35},
|
||||||
}
|
}
|
||||||
for _, tf := range testFiles {
|
for _, tf := range testFiles {
|
||||||
f, err := os.Open("testdata/webkit/" + tf.filename)
|
f, err := os.Open("testdata/webkit/" + tf.filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user