Commit 68e7363b authored by Andrew Balholm's avatar Andrew Balholm Committed by Nigel Tao

html: parse <nobr> elements

Pass tests3.dat, test 20:
<!doctype html><nobr><nobr><nobr>

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <nobr>
|     <nobr>
|     <nobr>

Also pass tests through test 22:
<!doctype html><html><body><p><table></table></body></html>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5438056
parent 4c113ffe
......@@ -679,6 +679,13 @@ func inBodyIM(p *parser) bool {
case "b", "big", "code", "em", "font", "i", "s", "small", "strike", "strong", "tt", "u":
p.reconstructActiveFormattingElements()
p.addFormattingElement(p.tok.Data, p.tok.Attr)
case "nobr":
p.reconstructActiveFormattingElements()
if p.elementInScope(defaultScopeStopTags, "nobr") {
p.inBodyEndTagFormatting("nobr")
p.reconstructActiveFormattingElements()
}
p.addFormattingElement(p.tok.Data, p.tok.Attr)
case "applet", "marquee", "object":
p.reconstructActiveFormattingElements()
p.addElement(p.tok.Data, p.tok.Attr)
......
......@@ -152,7 +152,7 @@ func TestParser(t *testing.T) {
{"doctype01.dat", -1},
{"tests1.dat", -1},
{"tests2.dat", -1},
{"tests3.dat", 20},
{"tests3.dat", 23},
}
for _, tf := range testFiles {
f, err := os.Open("testdata/webkit/" + tf.filename)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment