Title: [103005] trunk
Revision
103005
Author
[email protected]
Date
2011-12-15 17:19:44 -0800 (Thu, 15 Dec 2011)

Log Message

<ruby><div><p><rp> parses incorrectly
https://bugs.webkit.org/show_bug.cgi?id=74668

Reviewed by Darin Adler.

Source/WebCore: 

This patch updates our implementation to match a change to the HTML5
specification regarding how <ruby> elements parse.  Previously, <rp>
and similar tags used to pop the stack up to the <ruby> element.  Now
the popping does not occur.

Tests: html5lib/runner.html

* html/parser/HTMLTreeBuilder.cpp:

LayoutTests: 

Update test results to show progression.

* html5lib/runner-expected.txt:
* platform/chromium/html5lib/runner-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (103004 => 103005)


--- trunk/LayoutTests/ChangeLog	2011-12-16 01:17:45 UTC (rev 103004)
+++ trunk/LayoutTests/ChangeLog	2011-12-16 01:19:44 UTC (rev 103005)
@@ -1,5 +1,17 @@
 2011-12-15  Adam Barth  <[email protected]>
 
+        <ruby><div><p><rp> parses incorrectly
+        https://bugs.webkit.org/show_bug.cgi?id=74668
+
+        Reviewed by Darin Adler.
+
+        Update test results to show progression.
+
+        * html5lib/runner-expected.txt:
+        * platform/chromium/html5lib/runner-expected.txt:
+
+2011-12-15  Adam Barth  <[email protected]>
+
         <!DOCTYPE html><pre>&#x0a;&#x0a;A</pre> doesn't parse correctly
         https://bugs.webkit.org/show_bug.cgi?id=74658
 

Modified: trunk/LayoutTests/html5lib/runner-expected.txt (103004 => 103005)


--- trunk/LayoutTests/html5lib/runner-expected.txt	2011-12-16 01:17:45 UTC (rev 103004)
+++ trunk/LayoutTests/html5lib/runner-expected.txt	2011-12-16 01:19:44 UTC (rev 103005)
@@ -157,96 +157,8 @@
 resources/tests18.dat: PASS
 
 resources/tests19.dat:
-14
-15
-17
-18
 81
 
-Test 14 of 104 in resources/tests19.dat failed. Input:
-<!doctype html><ruby><div><span><rp>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <span>
-|       <rp>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <span>
-|           <rp>
-
-Test 15 of 104 in resources/tests19.dat failed. Input:
-<!doctype html><ruby><div><p><rp>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <p>
-|       <rp>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <p>
-|         <rp>
-
-Test 17 of 104 in resources/tests19.dat failed. Input:
-<!doctype html><ruby><div><span><rt>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <span>
-|       <rt>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <span>
-|           <rt>
-
-Test 18 of 104 in resources/tests19.dat failed. Input:
-<!doctype html><ruby><div><p><rt>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <p>
-|       <rt>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <p>
-|         <rt>
-
 Test 81 of 104 in resources/tests19.dat failed. Input:
 <!doctype html><div><body><frameset>
 Got:
@@ -793,47 +705,8 @@
 
 resources/tests_innerHTML_1.dat: PASS
 
-resources/webkit01.dat:
-26
-27
+resources/webkit01.dat: PASS
 
-Test 26 of 49 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 27 of 49 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/webkit02.dat: PASS
 
 resources/doctype01.dat: PASS

Modified: trunk/LayoutTests/platform/chromium/html5lib/runner-expected.txt (103004 => 103005)


--- trunk/LayoutTests/platform/chromium/html5lib/runner-expected.txt	2011-12-16 01:17:45 UTC (rev 103004)
+++ trunk/LayoutTests/platform/chromium/html5lib/runner-expected.txt	2011-12-16 01:19:44 UTC (rev 103005)
@@ -157,96 +157,8 @@
 resources/tests18.dat: PASS
 
 resources/tests19.dat:
-14
-15
-17
-18
 81
 
-Test 14 of 104 in resources/tests19.dat failed. Input:
-<!doctype html><ruby><div><span><rp>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <span>
-|       <rp>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <span>
-|           <rp>
-
-Test 15 of 104 in resources/tests19.dat failed. Input:
-<!doctype html><ruby><div><p><rp>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <p>
-|       <rp>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <p>
-|         <rp>
-
-Test 17 of 104 in resources/tests19.dat failed. Input:
-<!doctype html><ruby><div><span><rt>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <span>
-|       <rt>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <span>
-|           <rt>
-
-Test 18 of 104 in resources/tests19.dat failed. Input:
-<!doctype html><ruby><div><p><rt>
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <p>
-|       <rt>
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <ruby>
-|       <div>
-|         <p>
-|         <rt>
-
 Test 81 of 104 in resources/tests19.dat failed. Input:
 <!doctype html><div><body><frameset>
 Got:
@@ -793,47 +705,8 @@
 
 resources/tests_innerHTML_1.dat: PASS
 
-resources/webkit01.dat:
-26
-27
+resources/webkit01.dat: PASS
 
-Test 26 of 49 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 27 of 49 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/webkit02.dat: PASS
 
 resources/doctype01.dat: PASS

Modified: trunk/Source/WebCore/ChangeLog (103004 => 103005)


--- trunk/Source/WebCore/ChangeLog	2011-12-16 01:17:45 UTC (rev 103004)
+++ trunk/Source/WebCore/ChangeLog	2011-12-16 01:19:44 UTC (rev 103005)
@@ -1,3 +1,19 @@
+2011-12-15  Adam Barth  <[email protected]>
+
+        <ruby><div><p><rp> parses incorrectly
+        https://bugs.webkit.org/show_bug.cgi?id=74668
+
+        Reviewed by Darin Adler.
+
+        This patch updates our implementation to match a change to the HTML5
+        specification regarding how <ruby> elements parse.  Previously, <rp>
+        and similar tags used to pop the stack up to the <ruby> element.  Now
+        the popping does not occur.
+
+        Tests: html5lib/runner.html
+
+        * html/parser/HTMLTreeBuilder.cpp:
+
 2011-12-15  Daniel Sievers  <[email protected]>
 
         [Chromium] Avoid strdup() for extra argument when tracing is disabled.

Modified: trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp (103004 => 103005)


--- trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp	2011-12-16 01:17:45 UTC (rev 103004)
+++ trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp	2011-12-16 01:19:44 UTC (rev 103005)
@@ -1000,10 +1000,8 @@
     if (token.name() == rpTag || token.name() == rtTag) {
         if (m_tree.openElements()->inScope(rubyTag.localName())) {
             m_tree.generateImpliedEndTags();
-            if (!m_tree.currentNode()->hasTagName(rubyTag)) {
+            if (!m_tree.currentNode()->hasTagName(rubyTag))
                 parseError(token);
-                m_tree.openElements()->popUntil(rubyTag.localName());
-            }
         }
         m_tree.insertHTMLElement(token);
         return;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to