[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

eric at webkit.org eric at webkit.org
Wed Dec 22 11:09:23 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f7e6145eabea8e1d2d54d1ded72f6ce047513bae
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jul 14 00:18:52 2010 +0000

    2010-07-13  Eric Seidel  <eric at webkit.org>
    
            Reviewed by Adam Barth.
    
            Make our end tag in-foreign-content mode spec bug workarounds more closely match minefield
            https://bugs.webkit.org/show_bug.cgi?id=42187
    
            * html5lib/runner-expected-html5.txt:
    2010-07-13  Eric Seidel  <eric at webkit.org>
    
            Reviewed by Adam Barth.
    
            Make our end tag in-foreign-content mode spec bug workarounds more closely match minefield
            https://bugs.webkit.org/show_bug.cgi?id=42187
    
            I do not expect these work-arounds to be permanent.  Hixie has promised to
            addresses the feedback to the parser sections of HTML5 soon.
            I added these hacks to make our hacks more-closely match Minefield's hacks
            and thus have us "pass" a few more html5lib runner tests.
    
            We now pass all of the html5lib foreign content tests
            (thus we'll likely need to write more).
    
            Tested by html5lib/runner.html
    
            * html/HTMLElementStack.cpp:
            (WebCore::HTMLElementStack::contains):
            * html/HTMLElementStack.h:
            * html/HTMLTreeBuilder.cpp:
            (WebCore::HTMLTreeBuilder::processEndTag):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63264 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2c837bb..42a94de 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-07-13  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Make our end tag in-foreign-content mode spec bug workarounds more closely match minefield
+        https://bugs.webkit.org/show_bug.cgi?id=42187
+
+        * html5lib/runner-expected-html5.txt:
+
 2010-07-13  Brian Weinstein  <bweinstein at apple.com>
 
         Reviewed by Steve Falkenburg.
diff --git a/LayoutTests/html5lib/runner-expected-html5.txt b/LayoutTests/html5lib/runner-expected-html5.txt
index 4d5e896..9895f96 100644
--- a/LayoutTests/html5lib/runner-expected-html5.txt
+++ b/LayoutTests/html5lib/runner-expected-html5.txt
@@ -335,197 +335,14 @@ Expected:
 |     <keygen>
 resources/tests8.dat: PASS
 
-resources/tests9.dat:
-14
+resources/tests9.dat: PASS
+
+resources/tests10.dat: PASS
 
-Test 14 of 25 in resources/tests9.dat failed. Input:
-<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi>baz</table><p>quux
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <caption>
-|         <math math>
-|           <math mi>
-|             "foo"
-|           <math mi>
-|             "bar"
-|           "baz"
-|         <p>
-|           "quux"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <caption>
-|         <math math>
-|           <math mi>
-|             "foo"
-|           <math mi>
-|             "bar"
-|           "baz"
-|     <p>
-|       "quux"
-resources/tests10.dat:
-14
-
-Test 14 of 25 in resources/tests10.dat failed. Input:
-<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g>baz</table><p>quux
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <caption>
-|         <svg svg>
-|           <svg g>
-|             "foo"
-|           <svg g>
-|             "bar"
-|           "baz"
-|         <p>
-|           "quux"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <table>
-|       <caption>
-|         <svg svg>
-|           <svg g>
-|             "foo"
-|           <svg g>
-|             "bar"
-|           "baz"
-|     <p>
-|       "quux"
 resources/tests11.dat: PASS
 
-resources/tests12.dat:
-1
-2
+resources/tests12.dat: PASS
 
-Test 1 of 2 in resources/tests12.dat failed. Input:
-<!DOCTYPE html><body><p>foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><P>spam<TABLE><tr><td><img></td></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       "foo"
-|       <math math>
-|         <math mtext>
-|           <i>
-|             "baz"
-|         <math annotation-xml>
-|           <svg svg>
-|             <svg desc>
-|               <b>
-|                 "eggs"
-|             <svg g>
-|               <svg foreignObject>
-|                 <p>
-|                   "spam"
-|                 <table>
-|                   <tbody>
-|                     <tr>
-|                       <td>
-|                         <img>
-|                 <g>
-|                   "quux"
-|                 "bar"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       "foo"
-|       <math math>
-|         <math mtext>
-|           <i>
-|             "baz"
-|         <math annotation-xml>
-|           <svg svg>
-|             <svg desc>
-|               <b>
-|                 "eggs"
-|             <svg g>
-|               <svg foreignObject>
-|                 <p>
-|                   "spam"
-|                 <table>
-|                   <tbody>
-|                     <tr>
-|                       <td>
-|                         <img>
-|             <svg g>
-|               "quux"
-|       "bar"
-
-Test 2 of 2 in resources/tests12.dat failed. Input:
-<!DOCTYPE html><body>foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><P>spam<TABLE><tr><td><img></td></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar
-Got:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     "foo"
-|     <math math>
-|       <math mtext>
-|         <i>
-|           "baz"
-|       <math annotation-xml>
-|         <svg svg>
-|           <svg desc>
-|             <b>
-|               "eggs"
-|           <svg g>
-|             <svg foreignObject>
-|               <p>
-|                 "spam"
-|               <table>
-|                 <tbody>
-|                   <tr>
-|                     <td>
-|                       <img>
-|               <g>
-|                 "quux"
-|               "bar"
-Expected:
-| <!DOCTYPE html>
-| <html>
-|   <head>
-|   <body>
-|     "foo"
-|     <math math>
-|       <math mtext>
-|         <i>
-|           "baz"
-|       <math annotation-xml>
-|         <svg svg>
-|           <svg desc>
-|             <b>
-|               "eggs"
-|           <svg g>
-|             <svg foreignObject>
-|               <p>
-|                 "spam"
-|               <table>
-|                 <tbody>
-|                   <tr>
-|                     <td>
-|                       <img>
-|           <svg g>
-|             "quux"
-|     "bar"
 resources/tests14.dat: PASS
 
 resources/tests15.dat: PASS
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3650d79..a97cf4c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-07-13  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Make our end tag in-foreign-content mode spec bug workarounds more closely match minefield
+        https://bugs.webkit.org/show_bug.cgi?id=42187
+
+        I do not expect these work-arounds to be permanent.  Hixie has promised to
+        addresses the feedback to the parser sections of HTML5 soon.
+        I added these hacks to make our hacks more-closely match Minefield's hacks
+        and thus have us "pass" a few more html5lib runner tests.
+
+        We now pass all of the html5lib foreign content tests
+        (thus we'll likely need to write more).
+
+        Tested by html5lib/runner.html
+
+        * html/HTMLElementStack.cpp:
+        (WebCore::HTMLElementStack::contains):
+        * html/HTMLElementStack.h:
+        * html/HTMLTreeBuilder.cpp:
+        (WebCore::HTMLTreeBuilder::processEndTag):
+
 2010-07-12  Tony Gentilcore  <tonyg at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/html/HTMLElementStack.cpp b/WebCore/html/HTMLElementStack.cpp
index d1a1752..850f53f 100644
--- a/WebCore/html/HTMLElementStack.cpp
+++ b/WebCore/html/HTMLElementStack.cpp
@@ -325,6 +325,11 @@ bool HTMLElementStack::contains(Element* element) const
     return !!find(element);
 }
 
+bool HTMLElementStack::contains(const AtomicString& tagName) const
+{
+    return !!topmost(tagName);
+}
+
 template <bool isMarker(Element*)>
 bool inScopeCommon(HTMLElementStack::ElementRecord* top, const AtomicString& targetTag)
 {
diff --git a/WebCore/html/HTMLElementStack.h b/WebCore/html/HTMLElementStack.h
index 8be4422..be8f081 100644
--- a/WebCore/html/HTMLElementStack.h
+++ b/WebCore/html/HTMLElementStack.h
@@ -97,6 +97,7 @@ public:
     void removeHTMLHeadElement(Element*);
 
     bool contains(Element*) const;
+    bool contains(const AtomicString& tagName) const;
 
     bool inScope(Element*) const;
     bool inScope(const AtomicString& tagName) const;
diff --git a/WebCore/html/HTMLTreeBuilder.cpp b/WebCore/html/HTMLTreeBuilder.cpp
index 8a357ff..8051b3e 100644
--- a/WebCore/html/HTMLTreeBuilder.cpp
+++ b/WebCore/html/HTMLTreeBuilder.cpp
@@ -2340,9 +2340,11 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
             HTMLElementStack::ElementRecord* nodeRecord = m_tree.openElements()->topRecord();
             if (!nodeRecord->element()->hasLocalName(token.name())) {
                 parseError(token);
-                // FIXME: This return is not in the spec but appears to be needed.
+                // FIXME: This return is not in the spec but it needed for now
+                // to prevent walking off the bottom of the stack.
                 // http://www.w3.org/Bugs/Public/show_bug.cgi?id=10118
-                return;
+                if (!m_tree.openElements()->contains(token.name()))
+                    return;
             }
             while (1) {
                 if (nodeRecord->element()->hasLocalName(token.name())) {
@@ -2350,8 +2352,13 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
                     return;
                 }
                 nodeRecord = nodeRecord->next();
-                if (nodeRecord->element()->namespaceURI() == xhtmlNamespaceURI)
+                if (nodeRecord->element()->namespaceURI() == xhtmlNamespaceURI) {
                     processUsingSecondaryInsertionModeAndAdjustInsertionMode(token);
+                    // FIXME: This is a hack around a spec bug and is likely wrong.
+                    // http://www.w3.org/Bugs/Public/show_bug.cgi?id=9581
+                    if (nodeRecord != m_tree.openElements()->topRecord())
+                        return;
+                }
             }
             return;
         }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list