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

rniwa at webkit.org rniwa at webkit.org
Wed Dec 22 14:44:02 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f84bef863cb8f289325c74bc3e2e29e9a615ddae
Author: rniwa at webkit.org <rniwa at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 18 21:42:37 2010 +0000

    2010-10-18  Ryosuke Niwa  <rniwa at webkit.org>
    
            Reviewed by Adam Barth.
    
            elementCannotHaveEndTag should be a member function of MarkupAccumulator
            https://bugs.webkit.org/show_bug.cgi?id=47846
    
            Moved elementCannotHaveEndTag into MarkupAccumulator.
    
            No new tests are added since this is a cleanup.
    
            * editing/MarkupAccumulator.cpp:
            (WebCore::MarkupAccumulator::elementCannotHaveEndTag): Added.
            * editing/MarkupAccumulator.h: Added MarkupAccumulator::elementCannotHaveEndTag.
            * editing/markup.cpp: Removed elementCannotHaveEndTag.
            * editing/markup.h: Removed elementCannotHaveEndTag.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69994 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2018539..e075b78 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-10-18  Ryosuke Niwa  <rniwa at webkit.org>
+
+        Reviewed by Adam Barth.
+
+        elementCannotHaveEndTag should be a member function of MarkupAccumulator
+        https://bugs.webkit.org/show_bug.cgi?id=47846
+
+        Moved elementCannotHaveEndTag into MarkupAccumulator.
+
+        No new tests are added since this is a cleanup.
+
+        * editing/MarkupAccumulator.cpp:
+        (WebCore::MarkupAccumulator::elementCannotHaveEndTag): Added.
+        * editing/MarkupAccumulator.h: Added MarkupAccumulator::elementCannotHaveEndTag.
+        * editing/markup.cpp: Removed elementCannotHaveEndTag.
+        * editing/markup.h: Removed elementCannotHaveEndTag.
+
 2010-10-18  Johnny Ding  <jnd at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/editing/MarkupAccumulator.cpp b/WebCore/editing/MarkupAccumulator.cpp
index 91a74c8..a701189 100644
--- a/WebCore/editing/MarkupAccumulator.cpp
+++ b/WebCore/editing/MarkupAccumulator.cpp
@@ -439,6 +439,18 @@ bool MarkupAccumulator::shouldSelfClose(const Node* node)
     return true;
 }
 
+bool MarkupAccumulator::elementCannotHaveEndTag(const Node* node)
+{
+    if (!node->isHTMLElement())
+        return false;
+    
+    // FIXME: ieForbidsInsertHTML may not be the right function to call here
+    // ieForbidsInsertHTML is used to disallow setting innerHTML/outerHTML
+    // or createContextualFragment.  It does not necessarily align with
+    // which elements should be serialized w/o end tags.
+    return static_cast<const HTMLElement*>(node)->ieForbidsInsertHTML();
+}
+
 void MarkupAccumulator::appendEndMarkup(Vector<UChar>& result, const Node* node)
 {
     if (!node->isElementNode() || shouldSelfClose(node) || (!node->hasChildNodes() && elementCannotHaveEndTag(node)))
diff --git a/WebCore/editing/MarkupAccumulator.h b/WebCore/editing/MarkupAccumulator.h
index b35d230..5a9c884 100644
--- a/WebCore/editing/MarkupAccumulator.h
+++ b/WebCore/editing/MarkupAccumulator.h
@@ -96,6 +96,7 @@ protected:
     void appendCDATASection(Vector<UChar>& out, const String& section);
     void appendStartMarkup(Vector<UChar>& result, const Node*, Namespaces*);
     bool shouldSelfClose(const Node*);
+    bool elementCannotHaveEndTag(const Node* node);
     void appendEndMarkup(Vector<UChar>& result, const Node*);
 
     bool shouldResolveURLs() { return m_shouldResolveURLs == AbsoluteURLs; }
diff --git a/WebCore/editing/markup.cpp b/WebCore/editing/markup.cpp
index 2219996..75d567e 100644
--- a/WebCore/editing/markup.cpp
+++ b/WebCore/editing/markup.cpp
@@ -93,18 +93,6 @@ private:
     String m_value;
 };
 
-bool elementCannotHaveEndTag(const Node* node)
-{
-    if (!node->isHTMLElement())
-        return false;
-
-    // FIXME: ieForbidsInsertHTML may not be the right function to call here
-    // ieForbidsInsertHTML is used to disallow setting innerHTML/outerHTML
-    // or createContextualFragment.  It does not necessarily align with
-    // which elements should be serialized w/o end tags.
-    return static_cast<const HTMLElement*>(node)->ieForbidsInsertHTML();
-}
-
 static void completeURLs(Node* node, const String& baseURL)
 {
     Vector<AttributeChange> changes;
diff --git a/WebCore/editing/markup.h b/WebCore/editing/markup.h
index fc8e431..dbf8b80 100644
--- a/WebCore/editing/markup.h
+++ b/WebCore/editing/markup.h
@@ -56,9 +56,6 @@ namespace WebCore {
     String createFullMarkup(const Range*);
 
     String urlToMarkup(const KURL&, const String& title);
-
-    // FIXME: Should this be better encapulated somewhere?
-    bool elementCannotHaveEndTag(const Node*);
 }
 
 #endif // markup_h

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list