Reviewed by Eric Seidel.
Implement AfterAfterBodyMode
https://bugs.webkit.org/show_bug.cgi?id=41501
The AfterAfterBodyMode doesn't seem to be well-covered by the existing
HTML5lib tests, so I added a few more tests to cover it. It's somewhat
hard to observe. The only way I can figure out to observe it is where
the comment elements get attached to the DOM.
* html5lib/resources/webkit01.dat:
* html5lib/runner-expected-html5.txt:
* html5lib/runner-expected.txt:
* html5lib/webkit-resumer-expected.txt:
2010-07-02 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
Implement AfterAfterBodyMode
https://bugs.webkit.org/show_bug.cgi?id=41501
In implementing this mode, I noticed a bug in the character processing
of the AfterBodyMode, which I fixed by adding a break statement. Also,
to get one of the new tests to pass, I needed to implement one
notImplemented() in the InBody insertion mode. Yay for testing.
* html/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTag):
(WebCore::HTMLTreeBuilder::processEndTag):
(WebCore::HTMLTreeBuilder::processComment):
(WebCore::HTMLTreeBuilder::processCharacter):
(WebCore::HTMLTreeBuilder::processEndOfFile):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62375
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2010-07-02 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Implement AfterAfterBodyMode
+ https://bugs.webkit.org/show_bug.cgi?id=41501
+
+ The AfterAfterBodyMode doesn't seem to be well-covered by the existing
+ HTML5lib tests, so I added a few more tests to cover it. It's somewhat
+ hard to observe. The only way I can figure out to observe it is where
+ the comment elements get attached to the DOM.
+
+ * html5lib/resources/webkit01.dat:
+ * html5lib/runner-expected-html5.txt:
+ * html5lib/runner-expected.txt:
+ * html5lib/webkit-resumer-expected.txt:
+
2010-07-02 Yury Semikhatsky <yurys@chromium.org>
Unreviewed. Remove accidentally added expectations on Chromium Linux - they should be derived from Windows ones.
| <bdy>
| <br>
| foo="bar"
+
+#data
+<html><body></body></html><!-- Hi there -->
+#errors
+#document
+| <html>
+| <head>
+| <body>
+| <!-- Hi there -->
+
+#data
+<html><body></body></html>x<!-- Hi there -->
+#errors
+#document
+| <html>
+| <head>
+| <body>
+| "x"
+| <!-- Hi there -->
+
+#data
+<html><body></body></html>x<!-- Hi there --></html><!-- Again -->
+#errors
+#document
+| <html>
+| <head>
+| <body>
+| "x"
+| <!-- Hi there -->
+| <!-- Again -->
+
+#data
+<html><body></body></html>x<!-- Hi there --></body></html><!-- Again -->
+#errors
+#document
+| <html>
+| <head>
+| <body>
+| "x"
+| <!-- Hi there -->
+| <!-- Again -->
| <body>
| "X"
| "X"
-| "X"
Expected:
| <!DOCTYPE html>
| <html>
| <body>
| "X"
| "X"
-| "X"
Expected:
| <!DOCTYPE html>
| <html>
| <body>
| "X"
| " "
-| " "
Expected:
| <!DOCTYPE html>
| <html>
| <html>
| <head>
| <body>
+| <math>
+| <mi>
+| "foo"
+| <mi>
+| "bar"
+| <p>
+| "baz"
Expected:
| <!DOCTYPE html>
| <html>
| <html>
| <head>
| <body>
+| <svg>
+| <g>
+| "foo"
+| <g>
+| "bar"
+| <p>
+| "baz"
Expected:
| <!DOCTYPE html>
| <html>
resources/webkit01.dat:
17
-Test 17 of 23 in resources/webkit01.dat failed. Input:
+Test 17 of 27 in resources/webkit01.dat failed. Input:
<A>test< /A>
Got:
| <html>
17
20
22
+24
+26
+27
-Test 17 of 23 in resources/webkit01.dat failed. Input:
+Test 17 of 27 in resources/webkit01.dat failed. Input:
<A>test< /A>
Got:
| <html>
| <a>
| "test< /A>"
-Test 20 of 23 in resources/webkit01.dat failed. Input:
+Test 20 of 27 in resources/webkit01.dat failed. Input:
<body></br foo="bar"></body>
Got:
| <html>
| <body>
| <br>
-Test 22 of 23 in resources/webkit01.dat failed. Input:
+Test 22 of 27 in resources/webkit01.dat failed. Input:
<body></body></br foo="bar">
Got:
| <html>
| <head>
| <body>
| <br>
+
+Test 24 of 27 in resources/webkit01.dat failed. Input:
+<html><body></body></html><!-- Hi there -->
+Got:
+| <html>
+| <head>
+| <body>
+| <!-- Hi there -->
+Expected:
+| <html>
+| <head>
+| <body>
+| <!-- Hi there -->
+
+Test 26 of 27 in resources/webkit01.dat failed. Input:
+<html><body></body></html>x<!-- Hi there --></html><!-- Again -->
+Got:
+| <html>
+| <head>
+| <body>
+| "x"
+| <!-- Hi there -->
+| <!-- Again -->
+Expected:
+| <html>
+| <head>
+| <body>
+| "x"
+| <!-- Hi there -->
+| <!-- Again -->
+
+Test 27 of 27 in resources/webkit01.dat failed. Input:
+<html><body></body></html>x<!-- Hi there --></body></html><!-- Again -->
+Got:
+| <html>
+| <head>
+| <body>
+| "x"
+| <!-- Hi there -->
+| <!-- Again -->
+Expected:
+| <html>
+| <head>
+| <body>
+| "x"
+| <!-- Hi there -->
+| <!-- Again -->
resources/doctype01.dat: PASS
resources/scriptdata01.dat: PASS
724.25
725.26
726.27
+752.1
+753.2
+754.3
+755.4
+756.5
+757.6
+758.7
+759.8
+760.9
+761.10
+762.11
+763.12
+764.13
+765.14
+766.15
+767.16
+768.17
+769.18
+770.19
+771.20
+772.21
+773.22
+774.23
+775.24
+776.25
+777.26
+778.27
+779.28
+780.29
+781.30
+782.31
+783.32
+784.33
+785.34
+786.35
+787.36
+788.37
+789.38
+790.39
+791.40
+792.41
+793.42
+837.1
+838.2
+839.3
+840.4
+841.5
+842.6
+843.7
+844.8
+845.9
+846.10
+847.11
+848.12
+849.13
+850.14
+851.15
+852.16
+853.17
+854.18
+855.19
+856.20
+857.21
+858.22
+859.23
+860.24
+861.25
+862.26
+863.27
+864.28
+865.29
+866.30
+867.31
+868.32
+869.33
+870.34
+871.35
+872.36
+873.37
+874.38
+875.39
+876.40
+877.41
+878.42
+879.43
+880.44
+881.45
+882.46
+883.47
+884.48
+885.49
+886.50
+887.51
+888.52
+889.53
+890.54
+891.55
+892.56
+893.57
+894.58
+895.59
+896.60
+897.61
+898.62
+899.63
+900.64
+901.1
+902.2
+903.3
+904.4
+905.5
+906.6
+907.7
+908.8
+909.9
+910.10
+911.11
+912.12
+913.13
+914.14
+915.15
+916.16
+917.17
+918.18
+919.19
+920.20
+921.21
+922.22
+923.23
+924.24
+925.25
+926.26
+927.27
+928.28
+929.29
+930.30
+931.31
+932.32
+933.33
+934.34
+935.35
+936.36
+937.37
+938.38
+939.39
+940.40
+941.41
+942.42
+943.43
+944.44
+945.45
+946.46
+947.47
+948.48
+949.49
+950.50
+951.51
+952.52
+953.53
+954.54
+955.55
+956.56
+957.57
+958.58
+959.59
+960.60
+961.61
+962.62
+963.63
+964.64
+965.65
+966.66
+967.67
+968.68
+969.69
+970.70
+971.71
+2010-07-02 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Implement AfterAfterBodyMode
+ https://bugs.webkit.org/show_bug.cgi?id=41501
+
+ In implementing this mode, I noticed a bug in the character processing
+ of the AfterBodyMode, which I fixed by adding a break statement. Also,
+ to get one of the new tests to pass, I needed to implement one
+ notImplemented() in the InBody insertion mode. Yay for testing.
+
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processStartTag):
+ (WebCore::HTMLTreeBuilder::processEndTag):
+ (WebCore::HTMLTreeBuilder::processComment):
+ (WebCore::HTMLTreeBuilder::processCharacter):
+ (WebCore::HTMLTreeBuilder::processEndOfFile):
+
2010-07-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r62371.
insertElement(token);
break;
case AfterBodyMode:
- ASSERT(insertionMode() == AfterBodyMode);
+ case AfterAfterBodyMode:
+ ASSERT(insertionMode() == AfterBodyMode || insertionMode() == AfterAfterBodyMode);
if (token.name() == htmlTag) {
insertHTMLStartTagInBody(token);
return;
}
if (token.name() == htmlTag) {
if (processBodyEndTagForInBody(token))
- notImplemented(); // Re-process the curent token.
+ processEndTag(token);
return;
}
if (token.name() == addressTag || token.name() == articleTag || token.name() == asideTag || token.name() == blockquoteTag || token.name() == buttonTag || token.name() == centerTag || token.name() == "details" || token.name() == dirTag || token.name() == divTag || token.name() == dlTag || token.name() == fieldsetTag || token.name() == "figure" || token.name() == footerTag || token.name() == headerTag || token.name() == hgroupTag || token.name() == listingTag || token.name() == menuTag || token.name() == navTag || token.name() == olTag || token.name() == preTag || token.name() == sectionTag || token.name() == ulTag) {
m_insertionMode = AfterAfterBodyMode;
return;
}
+ // Fall through.
+ case AfterAfterBodyMode:
+ ASSERT(insertionMode() == AfterBodyMode || insertionMode() == AfterAfterBodyMode);
+ parseError(token);
m_insertionMode = InBodyMode;
processEndTag(token);
break;
void HTMLTreeBuilder::processComment(AtomicHTMLToken& token)
{
- if (m_insertionMode == InitialMode || m_insertionMode == BeforeHTMLMode) {
+ if (m_insertionMode == InitialMode || m_insertionMode == BeforeHTMLMode || m_insertionMode == AfterAfterBodyMode) {
insertCommentOnDocument(token);
return;
}
insertTextNode(token);
break;
case AfterBodyMode:
- ASSERT(insertionMode() == AfterBodyMode);
+ case AfterAfterBodyMode:
+ ASSERT(insertionMode() == AfterBodyMode || insertionMode() == AfterAfterBodyMode);
+ parseError(token);
m_insertionMode = InBodyMode;
processCharacter(token);
+ break;
case TextMode:
notImplemented();
insertTextNode(token);
notImplemented();
break;
case AfterBodyMode:
- ASSERT(insertionMode() == AfterBodyMode);
+ case AfterAfterBodyMode:
+ ASSERT(insertionMode() == AfterBodyMode || insertionMode() == AfterAfterBodyMode);
notImplemented();
break;
case InHeadNoscriptMode: