[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:23:06 UTC 2010


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

    2010-07-21  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            Fix fast/css/last-child-style-sharing.html
            https://bugs.webkit.org/show_bug.cgi?id=42731
    
            Prior to this patch, we weren't calling finishParsingChildren on the
            body element.  We need a more systematic way of catching these bugs.
    
            * html/HTMLElementStack.cpp:
            (WebCore::HTMLElementStack::popAll):
            * html/HTMLElementStack.h:
            * html/HTMLTreeBuilder.cpp:
            (WebCore::HTMLTreeBuilder::processEndOfFile):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63812 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1b69ecd..74553a4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-07-21  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        Fix fast/css/last-child-style-sharing.html
+        https://bugs.webkit.org/show_bug.cgi?id=42731
+
+        Prior to this patch, we weren't calling finishParsingChildren on the
+        body element.  We need a more systematic way of catching these bugs.
+
+        * html/HTMLElementStack.cpp:
+        (WebCore::HTMLElementStack::popAll):
+        * html/HTMLElementStack.h:
+        * html/HTMLTreeBuilder.cpp:
+        (WebCore::HTMLTreeBuilder::processEndOfFile):
+
 2010-07-21  Hans Wennborg  <hans at chromium.org>
 
         Reviewed by Steve Block.
diff --git a/WebCore/html/HTMLElementStack.cpp b/WebCore/html/HTMLElementStack.cpp
index 850f53f..5c325e5 100644
--- a/WebCore/html/HTMLElementStack.cpp
+++ b/WebCore/html/HTMLElementStack.cpp
@@ -137,6 +137,17 @@ void HTMLElementStack::popHTMLBodyElement()
     popCommon();
 }
 
+void HTMLElementStack::popAll()
+{
+    m_htmlElement = 0;
+    m_headElement = 0;
+    m_bodyElement = 0;
+    while (m_top) {
+        top()->finishParsingChildren();
+        m_top = m_top->releaseNext();
+    }
+}
+
 void HTMLElementStack::pop()
 {
     ASSERT(!top()->hasTagName(HTMLNames::headTag));
diff --git a/WebCore/html/HTMLElementStack.h b/WebCore/html/HTMLElementStack.h
index be8f081..830faf0 100644
--- a/WebCore/html/HTMLElementStack.h
+++ b/WebCore/html/HTMLElementStack.h
@@ -92,6 +92,7 @@ public:
     void popUntilTableRowScopeMarker(); // "clear the stack back to a table row context" in the spec.
     void popHTMLHeadElement();
     void popHTMLBodyElement();
+    void popAll();
 
     void remove(Element*);
     void removeHTMLHeadElement(Element*);
diff --git a/WebCore/html/HTMLTreeBuilder.cpp b/WebCore/html/HTMLTreeBuilder.cpp
index 3cdfa63..2f8c42b 100644
--- a/WebCore/html/HTMLTreeBuilder.cpp
+++ b/WebCore/html/HTMLTreeBuilder.cpp
@@ -2615,8 +2615,8 @@ void HTMLTreeBuilder::processEndOfFile(AtomicHTMLToken& token)
     case InHeadNoscriptMode:
         ASSERT(insertionMode() == InHeadNoscriptMode);
         defaultForInHeadNoscript();
-        processToken(token);
-        break;
+        processEndOfFile(token);
+        return;
     case AfterFramesetMode:
     case AfterAfterFramesetMode:
         ASSERT(insertionMode() == AfterFramesetMode || insertionMode() == AfterAfterFramesetMode);
@@ -2640,7 +2640,7 @@ void HTMLTreeBuilder::processEndOfFile(AtomicHTMLToken& token)
             return;
         }
         processEndOfFile(token);
-        break;
+        return;
     case InForeignContentMode:
         parseError(token);
         // FIXME: Following the spec would infinitely recurse on <svg><svg>
@@ -2648,17 +2648,19 @@ void HTMLTreeBuilder::processEndOfFile(AtomicHTMLToken& token)
         m_tree.openElements()->popUntilElementWithNamespace(xhtmlNamespaceURI);
         setInsertionMode(m_secondaryInsertionMode);
         processEndOfFile(token);
-        break;
+        return;
     case InTableTextMode:
         defaultForInTableText();
         processEndOfFile(token);
-        break;
+        return;
     case TextMode:
     case InCaptionMode:
     case InRowMode:
         notImplemented();
         break;
     }
+    ASSERT(m_tree.openElements()->top());
+    m_tree.openElements()->popAll();
 }
 
 void HTMLTreeBuilder::defaultForInitial()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list