[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:48:59 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 3551ffec692039531779c7eecffc743ff2da6705
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jul 28 20:32:48 2003 +0000

    	Fix for 3343250, XML didn't know how to make implicit tbodies when starting new elements,
    	nor did it know to skip implicit elements when popping its element stack.
    
            Reviewed by darin
    
            * khtml/xml/xml_tokenizer.cpp:
            (XMLHandler::startElement):
            (XMLHandler::endElement):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4718 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 60ed59e..9067258 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,14 @@
+2003-07-28  Dave Hyatt  <hyatt at apple.com>
+
+	Fix for 3343250, XML didn't know how to make implicit tbodies when starting new elements,
+	nor did it know to skip implicit elements when popping its element stack.
+	
+        Reviewed by darin
+
+        * khtml/xml/xml_tokenizer.cpp:
+        (XMLHandler::startElement):
+        (XMLHandler::endElement):
+
 2003-07-25  Dave Hyatt  <hyatt at apple.com>
 
 	Rename box and inline-box to -khtml-box and -khtml-inline-box.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 60ed59e..9067258 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2003-07-28  Dave Hyatt  <hyatt at apple.com>
+
+	Fix for 3343250, XML didn't know how to make implicit tbodies when starting new elements,
+	nor did it know to skip implicit elements when popping its element stack.
+	
+        Reviewed by darin
+
+        * khtml/xml/xml_tokenizer.cpp:
+        (XMLHandler::startElement):
+        (XMLHandler::endElement):
+
 2003-07-25  Dave Hyatt  <hyatt at apple.com>
 
 	Rename box and inline-box to -khtml-box and -khtml-inline-box.
diff --git a/WebCore/khtml/xml/xml_tokenizer.cpp b/WebCore/khtml/xml/xml_tokenizer.cpp
index fb7ecd7..2fa0e69 100644
--- a/WebCore/khtml/xml/xml_tokenizer.cpp
+++ b/WebCore/khtml/xml/xml_tokenizer.cpp
@@ -93,6 +93,21 @@ bool XMLHandler::startElement( const QString& namespaceURI, const QString& /*loc
         if (exceptioncode) // exception setting attributes
             return false;
     }
+
+    // FIXME: This hack ensures implicit table bodies get constructed in XHTML and XML files.
+    // We want to consolidate this with the HTML parser and HTML DOM code at some point.
+    // For now, it's too risky to rip that code up.
+    if (m_currentNode->id() == ID_TABLE &&
+        newElement->id() == ID_TR &&
+        m_currentNode->isHTMLElement() && newElement->isHTMLElement()) {
+        NodeImpl* implicitTBody =
+           new HTMLTableSectionElementImpl( m_doc, ID_TBODY, true /* implicit */ );
+        m_currentNode->addChild(implicitTBody);
+        if (m_view && !implicitTBody->attached())
+            implicitTBody->attach();
+        m_currentNode = implicitTBody;
+    }
+
     if (m_currentNode->addChild(newElement)) {
         if (m_view && !newElement->attached())
             newElement->attach();
@@ -100,6 +115,7 @@ bool XMLHandler::startElement( const QString& namespaceURI, const QString& /*loc
         return true;
     }
     else {
+        
         delete newElement;
         return false;
     }
@@ -116,7 +132,9 @@ bool XMLHandler::endElement( const QString& /*namespaceURI*/, const QString& /*l
         exitText();
     if (m_currentNode->parentNode() != 0) {
         m_currentNode->closeRenderer();
-        m_currentNode = m_currentNode->parentNode();
+        do {
+            m_currentNode = m_currentNode->parentNode();
+        } while (m_currentNode && m_currentNode->implicitNode());
     }
 // ###  else error
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list