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


The following commit has been merged in the debian/experimental branch:
commit d7b5131dd3a8ee6559df3d32d4b53f8c8556168b
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Jul 25 21:36:32 2010 +0000

    2010-07-25  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            Functions supporting the legacy tree builder are confusing
            https://bugs.webkit.org/show_bug.cgi?id=42951
    
            This patch just inlines these functions into their one call site and
            removes the notImplemented() calls.  We thought we were going to grow
            these to support the new tree builder, but we took a different path.
            Previous to this patch, these functions were confusing because they
            looked like part of the new tree builder.
    
            * html/HTMLTreeBuilder.cpp:
            (WebCore::HTMLTreeBuilder::passTokenToLegacyParser):
            * html/HTMLTreeBuilder.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d6ef5ef..0cca215 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,23 @@
 
         Reviewed by Eric Seidel.
 
+        Functions supporting the legacy tree builder are confusing
+        https://bugs.webkit.org/show_bug.cgi?id=42951
+
+        This patch just inlines these functions into their one call site and
+        removes the notImplemented() calls.  We thought we were going to grow
+        these to support the new tree builder, but we took a different path.
+        Previous to this patch, these functions were confusing because they
+        looked like part of the new tree builder.
+
+        * html/HTMLTreeBuilder.cpp:
+        (WebCore::HTMLTreeBuilder::passTokenToLegacyParser):
+        * html/HTMLTreeBuilder.h:
+
+2010-07-25  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
         Recent HTML5 TreeBuilder Regression?  All canvas tests ASSERT
         https://bugs.webkit.org/show_bug.cgi?id=42948
 
diff --git a/WebCore/html/HTMLTreeBuilder.cpp b/WebCore/html/HTMLTreeBuilder.cpp
index 7a9c295..f706af8 100644
--- a/WebCore/html/HTMLTreeBuilder.cpp
+++ b/WebCore/html/HTMLTreeBuilder.cpp
@@ -392,27 +392,6 @@ static void convertToOldStyle(AtomicHTMLToken& token, Token& oldStyleToken)
     }
 }
 
-void HTMLTreeBuilder::handleScriptStartTag()
-{
-    notImplemented(); // The HTML frgment case?
-    m_tokenizer->setState(HTMLTokenizer::ScriptDataState);
-    notImplemented(); // Save insertion mode.
-}
-
-void HTMLTreeBuilder::handleScriptEndTag(Element* scriptElement, int scriptStartLine)
-{
-    ASSERT(!m_scriptToProcess); // Caller never called takeScriptToProcess!
-    ASSERT(m_scriptToProcessStartLine == uninitializedLineNumberValue); // Caller never called takeScriptToProcess!
-    notImplemented(); // Save insertion mode and insertion point?
-
-    // Pause ourselves so that parsing stops until the script can be processed by the caller.
-    m_isPaused = true;
-    m_scriptToProcess = scriptElement;
-    // Lexer line numbers are 0-based, ScriptSourceCode expects 1-based lines,
-    // so we convert here before passing the line number off to HTMLScriptRunner.
-    m_scriptToProcessStartLine = scriptStartLine + 1;
-}
-
 PassRefPtr<Element> HTMLTreeBuilder::takeScriptToProcess(int& scriptStartLine)
 {
     // Unpause ourselves, callers may pause us again when processing the script.
@@ -470,7 +449,7 @@ void HTMLTreeBuilder::passTokenToLegacyParser(HTMLToken& token)
         // This work is supposed to be done by the parser, but
         // when using the old parser for we have to do this manually.
         if (oldStyleToken.tagName == scriptTag) {
-            handleScriptStartTag();
+            m_tokenizer->setState(HTMLTokenizer::ScriptDataState);
             m_lastScriptElement = static_pointer_cast<Element>(result);
             m_lastScriptElementStartLine = m_tokenizer->lineNumber();
         } else if (oldStyleToken.tagName == preTag || oldStyleToken.tagName == listingTag)
@@ -487,8 +466,16 @@ void HTMLTreeBuilder::passTokenToLegacyParser(HTMLToken& token)
                     // a DocumentFragment for pasting so that javascript content
                     // does not show up in pasted HTML.
                     m_lastScriptElement->removeChildren();
-                } else if (insertionMode() != AfterFramesetMode)
-                    handleScriptEndTag(m_lastScriptElement.get(), m_lastScriptElementStartLine);
+                } else if (insertionMode() != AfterFramesetMode) {
+                    ASSERT(!m_scriptToProcess); // Caller never called takeScriptToProcess!
+                    ASSERT(m_scriptToProcessStartLine == uninitializedLineNumberValue); // Caller never called takeScriptToProcess!
+                    // Pause ourselves so that parsing stops until the script can be processed by the caller.
+                    m_isPaused = true;
+                    m_scriptToProcess = m_lastScriptElement.get();
+                    // Lexer line numbers are 0-based, ScriptSourceCode expects 1-based lines,
+                    // so we convert here before passing the line number off to HTMLScriptRunner.
+                    m_scriptToProcessStartLine = m_lastScriptElementStartLine + 1;
+                }
                 m_lastScriptElement = 0;
                 m_lastScriptElementStartLine = uninitializedLineNumberValue;
             }
diff --git a/WebCore/html/HTMLTreeBuilder.h b/WebCore/html/HTMLTreeBuilder.h
index 735c9f3..d723384 100644
--- a/WebCore/html/HTMLTreeBuilder.h
+++ b/WebCore/html/HTMLTreeBuilder.h
@@ -173,9 +173,6 @@ private:
     // FIXME: Implement error reporting.
     void parseError(AtomicHTMLToken&) { }
 
-    void handleScriptStartTag();
-    void handleScriptEndTag(Element*, int scriptStartLine);
-
     InsertionMode insertionMode() const { return m_insertionMode; }
     void setInsertionMode(InsertionMode mode)
     {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list