2010-07-02 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Jul 2010 06:32:15 +0000 (06:32 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Jul 2010 06:32:15 +0000 (06:32 +0000)
        Reviewed by Eric Seidel.

        Special handling of <rp> and <rt> tags
        https://bugs.webkit.org/show_bug.cgi?id=41557

        There didn't seem to be test coverage of these cases in the suite, so I
        added a couple tests.

        * 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.

        Special handling of <rp> and <rt> tags
        https://bugs.webkit.org/show_bug.cgi?id=41557

        So sayeth the spec.

        * html/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::processStartTag):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62436 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/html5lib/resources/webkit01.dat
LayoutTests/html5lib/runner-expected-html5.txt
LayoutTests/html5lib/runner-expected.txt
LayoutTests/html5lib/webkit-resumer-expected.txt
WebCore/ChangeLog
WebCore/html/HTMLTreeBuilder.cpp

index 413cc38..bef8cfe 100644 (file)
@@ -2,6 +2,21 @@
 
         Reviewed by Eric Seidel.
 
+        Special handling of <rp> and <rt> tags
+        https://bugs.webkit.org/show_bug.cgi?id=41557
+
+        There didn't seem to be test coverage of these cases in the suite, so I
+        added a couple tests.
+
+        * 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 special optgroup processing
         https://bugs.webkit.org/show_bug.cgi?id=41556
 
index a69f909..36c7907 100644 (file)
@@ -309,3 +309,27 @@ console.log("FOO<span>BAR</span>BAZ");
 |     "x"
 |     <!--  Hi there  -->
 | <!--  Again  -->
+
+#data
+<html><body><ruby><div><rp>xx</rp></div></ruby></body></html>
+#errors
+#document
+| <html>
+|   <head>
+|   <body>
+|     <ruby>
+|       <div>
+|       <rp>
+|         "xx"
+
+#data
+<html><body><ruby><div><rt>xx</rt></div></ruby></body></html>
+#errors
+#document
+| <html>
+|   <head>
+|   <body>
+|     <ruby>
+|       <div>
+|       <rt>
+|         "xx"
index 9a28827..3fe36ab 100644 (file)
@@ -5509,7 +5509,7 @@ Expected:
 resources/webkit01.dat:
 17
 
-Test 17 of 27 in resources/webkit01.dat failed. Input:
+Test 17 of 29 in resources/webkit01.dat failed. Input:
 <A>test< /A>
 Got:
 | <html>
index 47ba85a..30197ed 100644 (file)
@@ -4692,8 +4692,10 @@ resources/webkit01.dat:
 24
 26
 27
+28
+29
 
-Test 17 of 27 in resources/webkit01.dat failed. Input:
+Test 17 of 29 in resources/webkit01.dat failed. Input:
 <A>test< /A>
 Got:
 | <html>
@@ -4709,7 +4711,7 @@ Expected:
 |     <a>
 |       "test< /A>"
 
-Test 20 of 27 in resources/webkit01.dat failed. Input:
+Test 20 of 29 in resources/webkit01.dat failed. Input:
 <body></br foo="bar"></body>
 Got:
 | <html>
@@ -4723,7 +4725,7 @@ Expected:
 |   <body>
 |     <br>
 
-Test 22 of 27 in resources/webkit01.dat failed. Input:
+Test 22 of 29 in resources/webkit01.dat failed. Input:
 <body></body></br foo="bar">
 Got:
 | <html>
@@ -4737,7 +4739,7 @@ Expected:
 |   <body>
 |     <br>
 
-Test 24 of 27 in resources/webkit01.dat failed. Input:
+Test 24 of 29 in resources/webkit01.dat failed. Input:
 <html><body></body></html><!-- Hi there -->
 Got:
 | <html>
@@ -4750,7 +4752,7 @@ Expected:
 |   <body>
 | <!--  Hi there  -->
 
-Test 26 of 27 in resources/webkit01.dat failed. Input:
+Test 26 of 29 in resources/webkit01.dat failed. Input:
 <html><body></body></html>x<!-- Hi there --></html><!-- Again -->
 Got:
 | <html>
@@ -4767,7 +4769,7 @@ Expected:
 |     <!--  Hi there  -->
 | <!--  Again  -->
 
-Test 27 of 27 in resources/webkit01.dat failed. Input:
+Test 27 of 29 in resources/webkit01.dat failed. Input:
 <html><body></body></html>x<!-- Hi there --></body></html><!-- Again -->
 Got:
 | <html>
@@ -4783,6 +4785,44 @@ Expected:
 |     "x"
 |     <!--  Hi there  -->
 | <!--  Again  -->
+
+Test 28 of 29 in resources/webkit01.dat failed. Input:
+<html><body><ruby><div><rp>xx</rp></div></ruby></body></html>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <ruby>
+|       <div>
+|         <rp>
+|           "xx"
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <ruby>
+|       <div>
+|       <rp>
+|         "xx"
+
+Test 29 of 29 in resources/webkit01.dat failed. Input:
+<html><body><ruby><div><rt>xx</rt></div></ruby></body></html>
+Got:
+| <html>
+|   <head>
+|   <body>
+|     <ruby>
+|       <div>
+|         <rt>
+|           "xx"
+Expected:
+| <html>
+|   <head>
+|   <body>
+|     <ruby>
+|       <div>
+|       <rt>
+|         "xx"
 resources/doctype01.dat: PASS
 
 resources/scriptdata01.dat: PASS
index 930c070..4c1089b 100644 (file)
@@ -399,3 +399,123 @@ resources/webkit01.dat:
 969.69
 970.70
 971.71
+972.1
+973.2
+974.3
+975.4
+976.5
+977.6
+978.7
+979.8
+980.9
+981.10
+982.11
+983.12
+984.13
+985.14
+986.15
+987.16
+988.17
+989.18
+990.19
+991.20
+992.21
+993.22
+994.23
+995.24
+996.25
+997.26
+998.27
+999.28
+1000.29
+1001.30
+1002.31
+1003.32
+1004.33
+1005.34
+1006.35
+1007.36
+1008.37
+1009.38
+1010.39
+1011.40
+1012.41
+1013.42
+1014.43
+1015.44
+1016.45
+1017.46
+1018.47
+1019.48
+1020.49
+1021.50
+1022.51
+1023.52
+1024.53
+1025.54
+1026.55
+1027.56
+1028.57
+1029.58
+1030.59
+1031.60
+1032.1
+1033.2
+1034.3
+1035.4
+1036.5
+1037.6
+1038.7
+1039.8
+1040.9
+1041.10
+1042.11
+1043.12
+1044.13
+1045.14
+1046.15
+1047.16
+1048.17
+1049.18
+1050.19
+1051.20
+1052.21
+1053.22
+1054.23
+1055.24
+1056.25
+1057.26
+1058.27
+1059.28
+1060.29
+1061.30
+1062.31
+1063.32
+1064.33
+1065.34
+1066.35
+1067.36
+1068.37
+1069.38
+1070.39
+1071.40
+1072.41
+1073.42
+1074.43
+1075.44
+1076.45
+1077.46
+1078.47
+1079.48
+1080.49
+1081.50
+1082.51
+1083.52
+1084.53
+1085.54
+1086.55
+1087.56
+1088.57
+1089.58
+1090.59
+1091.60
index e7aee95..fa282cd 100644 (file)
@@ -2,6 +2,18 @@
 
         Reviewed by Eric Seidel.
 
+        Special handling of <rp> and <rt> tags
+        https://bugs.webkit.org/show_bug.cgi?id=41557
+
+        So sayeth the spec.
+
+        * html/HTMLTreeBuilder.cpp:
+        (WebCore::HTMLTreeBuilder::processStartTag):
+
+2010-07-02  Adam Barth  <abarth@webkit.org>
+
+        Reviewed by Eric Seidel.
+
         Implement special optgroup processing
         https://bugs.webkit.org/show_bug.cgi?id=41556
 
index 46174a0..bbdcd18 100644 (file)
@@ -560,7 +560,13 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken& token)
             return;
         }
         if (token.name() == rpTag || token.name() == rtTag) {
-            notImplemented();
+            if (m_openElements.inScope(rubyTag.localName())) {
+                generateImpliedEndTags();
+                if (!currentElement()->hasTagName(rubyTag)) {
+                    parseError(token);
+                    m_openElements.popUntil(rubyTag.localName());
+                }
+            }
             insertElement(token);
             return;
         }