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

abarth at webkit.org abarth at webkit.org
Wed Dec 22 11:21:03 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a098610da61a2b3ac28c38295c9050eb71c0a1a2
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jul 20 07:33:12 2010 +0000

    2010-07-20  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Darin Adler.
    
            Foster parenting depends on the current element at insertion time
            https://bugs.webkit.org/show_bug.cgi?id=42599
    
            * html5lib/runner-expected-html5.txt:
    2010-07-20  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Darin Adler.
    
            Foster parenting depends on the current element at insertion time
            https://bugs.webkit.org/show_bug.cgi?id=42599
    
            We need to consider the current element at insertion-time when deciding
            whether to redirect insertion to the foster parent.  Previously, we
            were considering the current element *both* at insertion-time and at
            the time we created the guard.
    
            * html/HTMLConstructionSite.h:
            (WebCore::HTMLConstructionSite::RedirectToFosterParentGuard::RedirectToFosterParentGuard):
            * html/HTMLTreeBuilder.cpp:
            (WebCore::HTMLTreeBuilder::processStartTagForInTable):
            (WebCore::HTMLTreeBuilder::processEndTagForInTable):
            (WebCore::HTMLTreeBuilder::defaultForInTableText):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63729 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 86bc3f5..fa21394 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,14 @@
 2010-07-20  Adam Barth  <abarth at webkit.org>
 
+        Reviewed by Darin Adler.
+
+        Foster parenting depends on the current element at insertion time
+        https://bugs.webkit.org/show_bug.cgi?id=42599
+
+        * html5lib/runner-expected-html5.txt:
+
+2010-07-20  Adam Barth  <abarth at webkit.org>
+
         Reviewed by Eric Seidel.
 
         Import a number of fast/invalid tests into html5lib for easy of fixing
diff --git a/LayoutTests/html5lib/runner-expected-html5.txt b/LayoutTests/html5lib/runner-expected-html5.txt
index 708caad..d58b2fb 100644
--- a/LayoutTests/html5lib/runner-expected-html5.txt
+++ b/LayoutTests/html5lib/runner-expected-html5.txt
@@ -289,7 +289,6 @@ resources/tables01.dat: PASS
 resources/tricky01.dat:
 2
 6
-7
 
 Test 2 of 9 in resources/tricky01.dat failed. Input:
 <html>
@@ -461,31 +460,4 @@ Expected:
 |           <td>
 |             "
 "
-
-Test 7 of 9 in resources/tricky01.dat failed. Input:
-<table><tr><p><a><p>You should see this text.
-Got:
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       <a>
-|     <table>
-|       <tbody>
-|         <tr>
-|           <p>
-|             <a>
-|               "You should see this text."
-Expected:
-| <html>
-|   <head>
-|   <body>
-|     <p>
-|       <a>
-|     <p>
-|       <a>
-|         "You should see this text."
-|     <table>
-|       <tbody>
-|         <tr>
 #EOF
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7935bb0..f796abd 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-07-20  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Darin Adler.
+
+        Foster parenting depends on the current element at insertion time
+        https://bugs.webkit.org/show_bug.cgi?id=42599
+
+        We need to consider the current element at insertion-time when deciding
+        whether to redirect insertion to the foster parent.  Previously, we
+        were considering the current element *both* at insertion-time and at
+        the time we created the guard.
+
+        * html/HTMLConstructionSite.h:
+        (WebCore::HTMLConstructionSite::RedirectToFosterParentGuard::RedirectToFosterParentGuard):
+        * html/HTMLTreeBuilder.cpp:
+        (WebCore::HTMLTreeBuilder::processStartTagForInTable):
+        (WebCore::HTMLTreeBuilder::processEndTagForInTable):
+        (WebCore::HTMLTreeBuilder::defaultForInTableText):
+
 2010-07-20  Matthew Delaney  <mdelaney at apple.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/html/HTMLConstructionSite.h b/WebCore/html/HTMLConstructionSite.h
index fb27c96..e248af8 100644
--- a/WebCore/html/HTMLConstructionSite.h
+++ b/WebCore/html/HTMLConstructionSite.h
@@ -90,11 +90,11 @@ public:
 
     class RedirectToFosterParentGuard : public Noncopyable {
     public:
-        RedirectToFosterParentGuard(HTMLConstructionSite& tree, bool shouldRedirect)
+        RedirectToFosterParentGuard(HTMLConstructionSite& tree)
             : m_tree(tree)
             , m_wasRedirectingBefore(tree.m_redirectAttachToFosterParent)
         {
-            m_tree.m_redirectAttachToFosterParent = shouldRedirect;
+            m_tree.m_redirectAttachToFosterParent = true;
         }
 
         ~RedirectToFosterParentGuard()
diff --git a/WebCore/html/HTMLTreeBuilder.cpp b/WebCore/html/HTMLTreeBuilder.cpp
index a288391..19e67df 100644
--- a/WebCore/html/HTMLTreeBuilder.cpp
+++ b/WebCore/html/HTMLTreeBuilder.cpp
@@ -214,13 +214,6 @@ bool isNonAnchorFormattingTag(const AtomicString& tagName)
         || isNonAnchorNonNobrFormattingTag(tagName);
 }
 
-bool requiresRedirectToFosterParent(Element* element)
-{
-    return element->hasTagName(tableTag)
-        || isTableBodyContextTag(element->localName())
-        || element->hasTagName(trTag);
-}
-
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#formatting
 bool isFormattingTag(const AtomicString& tagName)
 {
@@ -1153,7 +1146,7 @@ void HTMLTreeBuilder::processStartTagForInTable(AtomicHTMLToken& token)
         return;
     }
     parseError(token);
-    HTMLConstructionSite::RedirectToFosterParentGuard redirecter(m_tree, requiresRedirectToFosterParent(m_tree.currentElement()));
+    HTMLConstructionSite::RedirectToFosterParentGuard redirecter(m_tree);
     processStartTagForInBody(token);
 }
 
@@ -2105,7 +2098,7 @@ void HTMLTreeBuilder::processEndTagForInTable(AtomicHTMLToken& token)
         return;
     }
     // Is this redirection necessary here?
-    HTMLConstructionSite::RedirectToFosterParentGuard redirecter(m_tree, requiresRedirectToFosterParent(m_tree.currentElement()));
+    HTMLConstructionSite::RedirectToFosterParentGuard redirecter(m_tree);
     processEndTagForInBody(token);
 }
 
@@ -2712,7 +2705,7 @@ void HTMLTreeBuilder::defaultForInTableText()
     String characters = String::adopt(m_pendingTableCharacters);
     if (hasNonWhitespace(characters)) {
         // FIXME: parse error
-        HTMLConstructionSite::RedirectToFosterParentGuard redirecter(m_tree, requiresRedirectToFosterParent(m_tree.currentElement()));
+        HTMLConstructionSite::RedirectToFosterParentGuard redirecter(m_tree);
         m_tree.reconstructTheActiveFormattingElements();
         m_tree.insertTextNode(characters);
         m_framesetOk = false;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list