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

eric at webkit.org eric at webkit.org
Wed Dec 22 12:36:42 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1f01448406ceaf0a8b666a082d7b4ebb2c99f1c9
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 26 00:02:46 2010 +0000

    2010-08-25  Eric Seidel  <eric at webkit.org>
    
            Reviewed by Adam Barth.
    
            Remove endTagRequirement now that the LegacyHTMLDocumentParser is dead
            https://bugs.webkit.org/show_bug.cgi?id=44626
    
            Serialization is covered by a bunch of tests.  innerHTML behavior is sadly not.
            In either case, this is just moving code and should have no functional change.
    
            * editing/markup.cpp:
            (WebCore::elementCannotHaveEndTag):
            (WebCore::MarkupAccumulator::shouldSelfClose):
            (WebCore::MarkupAccumulator::appendEndMarkup):
            (WebCore::serializeNodesWithNamespaces):
            * html/HTMLAnchorElement.h:
            * html/HTMLAreaElement.h:
            * html/HTMLBRElement.h:
            * html/HTMLBaseElement.h:
            * html/HTMLBaseFontElement.h:
            * html/HTMLBlockquoteElement.h:
            * html/HTMLBodyElement.h:
            * html/HTMLCanvasElement.cpp:
            * html/HTMLCanvasElement.h:
            * html/HTMLDListElement.h:
            * html/HTMLDataGridCellElement.h:
            * html/HTMLDataGridColElement.h:
            * html/HTMLDirectoryElement.h:
            * html/HTMLDivElement.h:
            * html/HTMLElement.cpp:
            (WebCore::HTMLElement::nodeName):
            (WebCore::HTMLElement::ieForbidsInsertHTML):
            (WebCore::HTMLElement::deprecatedCreateContextualFragment):
            (WebCore::HTMLElement::setInnerText):
            (WebCore::HTMLElement::setOuterText):
            * html/HTMLElement.h:
            * html/HTMLEmbedElement.h:
            * html/HTMLFontElement.h:
            * html/HTMLFormControlElement.h:
            * html/HTMLFormElement.h:
            * html/HTMLFrameElement.h:
            * html/HTMLFrameSetElement.h:
            * html/HTMLHRElement.h:
            * html/HTMLHeadElement.h:
            * html/HTMLHeadingElement.h:
            * html/HTMLHtmlElement.h:
            * html/HTMLIFrameElement.h:
            * html/HTMLImageElement.h:
            * html/HTMLInputElement.h:
            * html/HTMLIsIndexElement.h:
            * html/HTMLLIElement.h:
            * html/HTMLLinkElement.h:
            * html/HTMLMapElement.h:
            * html/HTMLMarqueeElement.h:
            * html/HTMLMenuElement.h:
            * html/HTMLMetaElement.h:
            * html/HTMLModElement.h:
            * html/HTMLOListElement.h:
            * html/HTMLOptionElement.h:
            * html/HTMLParagraphElement.h:
            * html/HTMLParamElement.h:
            * html/HTMLPlugInElement.h:
            * html/HTMLPreElement.h:
            * html/HTMLQuoteElement.h:
            * html/HTMLScriptElement.h:
            * html/HTMLSourceElement.h:
            * html/HTMLStyleElement.h:
            * html/HTMLTableCaptionElement.h:
            * html/HTMLTableCellElement.h:
            * html/HTMLTableColElement.cpp:
            * html/HTMLTableColElement.h:
            * html/HTMLTableElement.h:
            * html/HTMLTableRowElement.h:
            * html/HTMLTableSectionElement.h:
            * html/HTMLUListElement.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66057 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3d5e548..e020791 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,79 @@
+2010-08-25  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Remove endTagRequirement now that the LegacyHTMLDocumentParser is dead
+        https://bugs.webkit.org/show_bug.cgi?id=44626
+
+        Serialization is covered by a bunch of tests.  innerHTML behavior is sadly not.
+        In either case, this is just moving code and should have no functional change.
+
+        * editing/markup.cpp:
+        (WebCore::elementCannotHaveEndTag):
+        (WebCore::MarkupAccumulator::shouldSelfClose):
+        (WebCore::MarkupAccumulator::appendEndMarkup):
+        (WebCore::serializeNodesWithNamespaces):
+        * html/HTMLAnchorElement.h:
+        * html/HTMLAreaElement.h:
+        * html/HTMLBRElement.h:
+        * html/HTMLBaseElement.h:
+        * html/HTMLBaseFontElement.h:
+        * html/HTMLBlockquoteElement.h:
+        * html/HTMLBodyElement.h:
+        * html/HTMLCanvasElement.cpp:
+        * html/HTMLCanvasElement.h:
+        * html/HTMLDListElement.h:
+        * html/HTMLDataGridCellElement.h:
+        * html/HTMLDataGridColElement.h:
+        * html/HTMLDirectoryElement.h:
+        * html/HTMLDivElement.h:
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::nodeName):
+        (WebCore::HTMLElement::ieForbidsInsertHTML):
+        (WebCore::HTMLElement::deprecatedCreateContextualFragment):
+        (WebCore::HTMLElement::setInnerText):
+        (WebCore::HTMLElement::setOuterText):
+        * html/HTMLElement.h:
+        * html/HTMLEmbedElement.h:
+        * html/HTMLFontElement.h:
+        * html/HTMLFormControlElement.h:
+        * html/HTMLFormElement.h:
+        * html/HTMLFrameElement.h:
+        * html/HTMLFrameSetElement.h:
+        * html/HTMLHRElement.h:
+        * html/HTMLHeadElement.h:
+        * html/HTMLHeadingElement.h:
+        * html/HTMLHtmlElement.h:
+        * html/HTMLIFrameElement.h:
+        * html/HTMLImageElement.h:
+        * html/HTMLInputElement.h:
+        * html/HTMLIsIndexElement.h:
+        * html/HTMLLIElement.h:
+        * html/HTMLLinkElement.h:
+        * html/HTMLMapElement.h:
+        * html/HTMLMarqueeElement.h:
+        * html/HTMLMenuElement.h:
+        * html/HTMLMetaElement.h:
+        * html/HTMLModElement.h:
+        * html/HTMLOListElement.h:
+        * html/HTMLOptionElement.h:
+        * html/HTMLParagraphElement.h:
+        * html/HTMLParamElement.h:
+        * html/HTMLPlugInElement.h:
+        * html/HTMLPreElement.h:
+        * html/HTMLQuoteElement.h:
+        * html/HTMLScriptElement.h:
+        * html/HTMLSourceElement.h:
+        * html/HTMLStyleElement.h:
+        * html/HTMLTableCaptionElement.h:
+        * html/HTMLTableCellElement.h:
+        * html/HTMLTableColElement.cpp:
+        * html/HTMLTableColElement.h:
+        * html/HTMLTableElement.h:
+        * html/HTMLTableRowElement.h:
+        * html/HTMLTableSectionElement.h:
+        * html/HTMLUListElement.h:
+
 2010-08-20  Zhenyao Mo  <zmo at google.com>
 
         Reviewed by Kenneth Russell.
diff --git a/WebCore/editing/markup.cpp b/WebCore/editing/markup.cpp
index 23da94a..1baf1bc 100644
--- a/WebCore/editing/markup.cpp
+++ b/WebCore/editing/markup.cpp
@@ -695,13 +695,16 @@ void MarkupAccumulator::appendStartMarkup(Vector<UChar>& result, const Node* nod
     }
 }
 
-static inline bool doesHTMLForbidEndTag(const Node *node)
+static inline bool elementCannotHaveEndTag(const Node *node)
 {
-    if (node->isHTMLElement()) {
-        const HTMLElement* htmlElt = static_cast<const HTMLElement*>(node);
-        return (htmlElt->endTagRequirement() == TagStatusForbidden);
-    }
-    return false;
+    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();
 }
 
 // Rules of self-closure
@@ -715,14 +718,14 @@ bool MarkupAccumulator::shouldSelfClose(const Node* node)
         return false;
     if (node->hasChildNodes())
         return false;
-    if (node->isHTMLElement() && !doesHTMLForbidEndTag(node))
+    if (node->isHTMLElement() && !elementCannotHaveEndTag(node))
         return false;
     return true;
 }
 
 void MarkupAccumulator::appendEndMarkup(Vector<UChar>& result, const Node* node)
 {
-    if (!node->isElementNode() || shouldSelfClose(node) || (!node->hasChildNodes() && doesHTMLForbidEndTag(node)))
+    if (!node->isElementNode() || shouldSelfClose(node) || (!node->hasChildNodes() && elementCannotHaveEndTag(node)))
         return;
 
     result.append('<');
@@ -1118,7 +1121,7 @@ static void serializeNodesWithNamespaces(MarkupAccumulator& accumulator, Node* n
     if (!childrenOnly)
         accumulator.appendStartTag(node, &namespaceHash);
 
-    if (!(node->document()->isHTMLDocument() && doesHTMLForbidEndTag(node))) {
+    if (!(node->document()->isHTMLDocument() && elementCannotHaveEndTag(node))) {
         for (Node* current = node->firstChild(); current; current = current->nextSibling())
             serializeNodesWithNamespaces(accumulator, current, nodeToSkip, IncludeNode, &namespaceHash);
     }
diff --git a/WebCore/html/HTMLAnchorElement.h b/WebCore/html/HTMLAnchorElement.h
index ce38a26..a5ef167 100644
--- a/WebCore/html/HTMLAnchorElement.h
+++ b/WebCore/html/HTMLAnchorElement.h
@@ -97,7 +97,6 @@ protected:
     virtual void parseMappedAttribute(Attribute*);
 
 private:
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
     virtual bool supportsFocus() const;
     virtual bool isMouseFocusable() const;
     virtual bool isKeyboardFocusable(KeyboardEvent*) const;
diff --git a/WebCore/html/HTMLAreaElement.h b/WebCore/html/HTMLAreaElement.h
index cac00e2..10784c3 100644
--- a/WebCore/html/HTMLAreaElement.h
+++ b/WebCore/html/HTMLAreaElement.h
@@ -50,7 +50,6 @@ public:
 private:
     HTMLAreaElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
     virtual void parseMappedAttribute(Attribute*);
     virtual bool supportsFocus() const;
     virtual String target() const;
diff --git a/WebCore/html/HTMLBRElement.h b/WebCore/html/HTMLBRElement.h
index dfd84f8..05df8f6 100644
--- a/WebCore/html/HTMLBRElement.h
+++ b/WebCore/html/HTMLBRElement.h
@@ -36,8 +36,6 @@ public:
 private:
     HTMLBRElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
-
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
     
diff --git a/WebCore/html/HTMLBaseElement.h b/WebCore/html/HTMLBaseElement.h
index 6fdd1e1..aa1454f 100644
--- a/WebCore/html/HTMLBaseElement.h
+++ b/WebCore/html/HTMLBaseElement.h
@@ -34,8 +34,6 @@ public:
 private:
     HTMLBaseElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
-
     virtual String target() const { return m_target; }
 
     virtual void parseMappedAttribute(Attribute*);
diff --git a/WebCore/html/HTMLBaseFontElement.h b/WebCore/html/HTMLBaseFontElement.h
index eea3065..7573045 100644
--- a/WebCore/html/HTMLBaseFontElement.h
+++ b/WebCore/html/HTMLBaseFontElement.h
@@ -33,8 +33,6 @@ public:
 
 private:
     HTMLBaseFontElement(const QualifiedName&, Document*);
-
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
 };
 
 } // namespace
diff --git a/WebCore/html/HTMLBlockquoteElement.h b/WebCore/html/HTMLBlockquoteElement.h
index ca81612..194fe54 100644
--- a/WebCore/html/HTMLBlockquoteElement.h
+++ b/WebCore/html/HTMLBlockquoteElement.h
@@ -34,8 +34,6 @@ public:
 
 private:
     HTMLBlockquoteElement(const QualifiedName&, Document*);
-
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
 };
 
 } // namespace WebCore
diff --git a/WebCore/html/HTMLBodyElement.h b/WebCore/html/HTMLBodyElement.h
index 6526aca..d6ef185 100644
--- a/WebCore/html/HTMLBodyElement.h
+++ b/WebCore/html/HTMLBodyElement.h
@@ -69,8 +69,6 @@ public:
 private:
     HTMLBodyElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
 
diff --git a/WebCore/html/HTMLCanvasElement.cpp b/WebCore/html/HTMLCanvasElement.cpp
index 17fb6e8..7463551 100644
--- a/WebCore/html/HTMLCanvasElement.cpp
+++ b/WebCore/html/HTMLCanvasElement.cpp
@@ -97,19 +97,6 @@ HTMLCanvasElement::~HTMLCanvasElement()
         m_observer->canvasDestroyed(this);
 }
 
-#if ENABLE(DASHBOARD_SUPPORT)
-
-HTMLTagStatus HTMLCanvasElement::endTagRequirement() const 
-{
-    Settings* settings = document()->settings();
-    if (settings && settings->usesDashboardBackwardCompatibilityMode())
-        return TagStatusForbidden; 
-
-    return HTMLElement::endTagRequirement();
-}
-
-#endif
-
 void HTMLCanvasElement::parseMappedAttribute(Attribute* attr)
 {
     const QualifiedName& attrName = attr->name();
diff --git a/WebCore/html/HTMLCanvasElement.h b/WebCore/html/HTMLCanvasElement.h
index 5232e03..feef9d0 100644
--- a/WebCore/html/HTMLCanvasElement.h
+++ b/WebCore/html/HTMLCanvasElement.h
@@ -118,10 +118,6 @@ public:
 private:
     HTMLCanvasElement(const QualifiedName&, Document*);
 
-#if ENABLE(DASHBOARD_SUPPORT)
-    virtual HTMLTagStatus endTagRequirement() const;
-#endif
-
     virtual void parseMappedAttribute(Attribute*);
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 
diff --git a/WebCore/html/HTMLDListElement.h b/WebCore/html/HTMLDListElement.h
index 20dca9f..25697a1 100644
--- a/WebCore/html/HTMLDListElement.h
+++ b/WebCore/html/HTMLDListElement.h
@@ -33,8 +33,6 @@ public:
 
 private:
     HTMLDListElement(const QualifiedName&, Document*);
-
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
 };
 
 } //namespace
diff --git a/WebCore/html/HTMLDataGridCellElement.h b/WebCore/html/HTMLDataGridCellElement.h
index 767f7d8..60af155 100644
--- a/WebCore/html/HTMLDataGridCellElement.h
+++ b/WebCore/html/HTMLDataGridCellElement.h
@@ -53,9 +53,6 @@ public:
 
 private:
     HTMLDataGridCellElement(const QualifiedName&, Document*);
-
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
-    
 };
 
 } // namespace WebCore
diff --git a/WebCore/html/HTMLDataGridColElement.h b/WebCore/html/HTMLDataGridColElement.h
index 116e3ea..5198190 100644
--- a/WebCore/html/HTMLDataGridColElement.h
+++ b/WebCore/html/HTMLDataGridColElement.h
@@ -60,7 +60,6 @@ public:
 private:
     HTMLDataGridColElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
     virtual void insertedIntoTree(bool /*deep*/);
     virtual void removedFromTree(bool /*deep*/);
     virtual void parseMappedAttribute(Attribute*);
diff --git a/WebCore/html/HTMLDirectoryElement.h b/WebCore/html/HTMLDirectoryElement.h
index 6df1b43..afd3876 100644
--- a/WebCore/html/HTMLDirectoryElement.h
+++ b/WebCore/html/HTMLDirectoryElement.h
@@ -33,8 +33,6 @@ public:
 
 private:
     HTMLDirectoryElement(const QualifiedName&, Document*);
-
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
 };
 
 } //namespace
diff --git a/WebCore/html/HTMLDivElement.h b/WebCore/html/HTMLDivElement.h
index 226251d..2e2b417 100644
--- a/WebCore/html/HTMLDivElement.h
+++ b/WebCore/html/HTMLDivElement.h
@@ -36,8 +36,6 @@ protected:
     HTMLDivElement(const QualifiedName&, Document*);
 
 private:
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
 };
diff --git a/WebCore/html/HTMLElement.cpp b/WebCore/html/HTMLElement.cpp
index be6bddc..f40489b 100644
--- a/WebCore/html/HTMLElement.cpp
+++ b/WebCore/html/HTMLElement.cpp
@@ -68,16 +68,48 @@ String HTMLElement::nodeName() const
         return tagQName().localNameUpper();
     return Element::nodeName();
 }
-    
-HTMLTagStatus HTMLElement::endTagRequirement() const
-{
-    if (hasLocalName(wbrTag))
-        return TagStatusForbidden;
-    if (hasLocalName(dtTag) || hasLocalName(ddTag) || hasLocalName(rpTag) || hasLocalName(rtTag))
-        return TagStatusOptional;
 
-    // Same values as <span>.  This way custom tag name elements will behave like inline spans.
-    return TagStatusRequired;
+bool HTMLElement::ieForbidsInsertHTML() const
+{
+    // FIXME: Supposedly IE disallows settting innerHTML, outerHTML
+    // and createContextualFragment on these tags.  We have no tests to
+    // verify this however, so this list could be totally wrong.
+    // This list was moved from the previous endTagRequirement() implementation.
+    // This is also called from editing and assumed to be the list of tags
+    // for which no end tag should be serialized. It's unclear if the list for
+    // IE compat and the list for serialization sanity are the same.
+    if (hasLocalName(areaTag)
+        || hasLocalName(baseTag)
+        || hasLocalName(basefontTag)
+        || hasLocalName(brTag)
+        || hasLocalName(colTag)
+#if ENABLE(DATAGRID)
+        || hasLocalName(dcellTag)
+        || hasLocalName(dcolTag)
+#endif
+        || hasLocalName(embedTag)
+        || hasLocalName(frameTag)
+        || hasLocalName(hrTag)
+        || hasLocalName(imageTag)
+        || hasLocalName(imgTag)
+        || hasLocalName(inputTag)
+        || hasLocalName(isindexTag)
+        || hasLocalName(linkTag)
+        || hasLocalName(metaTag)
+        || hasLocalName(paramTag)
+        || hasLocalName(sourceTag)
+        || hasLocalName(wbrTag))
+        return true;
+    // FIXME: I'm not sure why dashboard mode would want to change the
+    // serialization of <canvas>, that seems like a bad idea.
+#if ENABLE(DASHBOARD_SUPPORT)
+    if (hasLocalName(canvasTag)) {
+        Settings* settings = document()->settings();
+        if (settings && settings->usesDashboardBackwardCompatibilityMode())
+            return true;
+    }
+#endif
+    return false;
 }
 
 bool HTMLElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
@@ -239,7 +271,7 @@ static bool useLegacyTreeBuilder(Document*)
 PassRefPtr<DocumentFragment> HTMLElement::deprecatedCreateContextualFragment(const String& markup, FragmentScriptingPermission scriptingPermission)
 {
     // The following is in accordance with the definition as used by IE.
-    if (endTagRequirement() == TagStatusForbidden)
+    if (ieForbidsInsertHTML())
         return 0;
 
     if (hasLocalName(colTag) || hasLocalName(colgroupTag) || hasLocalName(framesetTag)
@@ -359,8 +391,7 @@ void HTMLElement::setOuterHTML(const String& html, ExceptionCode& ec)
 
 void HTMLElement::setInnerText(const String& text, ExceptionCode& ec)
 {
-    // Follow the IE specs about when this is allowed.
-    if (endTagRequirement() == TagStatusForbidden) {
+    if (ieForbidsInsertHTML()) {
         ec = NO_MODIFICATION_ALLOWED_ERR;
         return;
     }
@@ -429,8 +460,7 @@ void HTMLElement::setInnerText(const String& text, ExceptionCode& ec)
 
 void HTMLElement::setOuterText(const String &text, ExceptionCode& ec)
 {
-    // Follow the IE specs about when this is allowed.
-    if (endTagRequirement() == TagStatusForbidden) {
+    if (ieForbidsInsertHTML()) {
         ec = NO_MODIFICATION_ALLOWED_ERR;
         return;
     }
diff --git a/WebCore/html/HTMLElement.h b/WebCore/html/HTMLElement.h
index 5f08d38..6edf5c3 100644
--- a/WebCore/html/HTMLElement.h
+++ b/WebCore/html/HTMLElement.h
@@ -72,7 +72,7 @@ public:
 
     virtual void accessKeyAction(bool sendToAnyElement);
 
-    virtual HTMLTagStatus endTagRequirement() const;
+    bool ieForbidsInsertHTML() const;
 
     virtual bool rendererIsNeeded(RenderStyle*);
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
diff --git a/WebCore/html/HTMLEmbedElement.h b/WebCore/html/HTMLEmbedElement.h
index 97fc3c3..5f4df67 100644
--- a/WebCore/html/HTMLEmbedElement.h
+++ b/WebCore/html/HTMLEmbedElement.h
@@ -36,8 +36,6 @@ public:
 private:
     HTMLEmbedElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
-
     virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const;
     virtual void parseMappedAttribute(Attribute*);
 
diff --git a/WebCore/html/HTMLFontElement.h b/WebCore/html/HTMLFontElement.h
index e7d95b9..f97ab08 100644
--- a/WebCore/html/HTMLFontElement.h
+++ b/WebCore/html/HTMLFontElement.h
@@ -36,8 +36,6 @@ public:
 
 private:
     HTMLFontElement(const QualifiedName&, Document*);
-    
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
 
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
diff --git a/WebCore/html/HTMLFormControlElement.h b/WebCore/html/HTMLFormControlElement.h
index c7b7280..2352182 100644
--- a/WebCore/html/HTMLFormControlElement.h
+++ b/WebCore/html/HTMLFormControlElement.h
@@ -122,8 +122,6 @@ protected:
     virtual bool recalcWillValidate() const;
 
 private:
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual const AtomicString& formControlName() const;
     virtual const AtomicString& formControlType() const = 0;
 
diff --git a/WebCore/html/HTMLFormElement.h b/WebCore/html/HTMLFormElement.h
index cd67b85..151b2e8 100644
--- a/WebCore/html/HTMLFormElement.h
+++ b/WebCore/html/HTMLFormElement.h
@@ -114,8 +114,6 @@ public:
 private:
     HTMLFormElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual bool rendererIsNeeded(RenderStyle*);
     virtual void insertedIntoDocument();
     virtual void removedFromDocument();
diff --git a/WebCore/html/HTMLFrameElement.h b/WebCore/html/HTMLFrameElement.h
index 3b49a76..d8cf509 100644
--- a/WebCore/html/HTMLFrameElement.h
+++ b/WebCore/html/HTMLFrameElement.h
@@ -39,8 +39,6 @@ public:
 private:
     HTMLFrameElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
-  
     virtual void attach();
 
     virtual bool rendererIsNeeded(RenderStyle*);
diff --git a/WebCore/html/HTMLFrameSetElement.h b/WebCore/html/HTMLFrameSetElement.h
index c48428f..c761414 100644
--- a/WebCore/html/HTMLFrameSetElement.h
+++ b/WebCore/html/HTMLFrameSetElement.h
@@ -67,8 +67,6 @@ public:
 private:
     HTMLFrameSetElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const;
     virtual void parseMappedAttribute(Attribute*);
 
diff --git a/WebCore/html/HTMLHRElement.h b/WebCore/html/HTMLHRElement.h
index 68f9f45..e86bb56 100644
--- a/WebCore/html/HTMLHRElement.h
+++ b/WebCore/html/HTMLHRElement.h
@@ -35,8 +35,6 @@ public:
 private:
     HTMLHRElement(const QualifiedName&, Document*);
     
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
-    
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
 };
diff --git a/WebCore/html/HTMLHeadElement.h b/WebCore/html/HTMLHeadElement.h
index e8f3492..1a5df86 100644
--- a/WebCore/html/HTMLHeadElement.h
+++ b/WebCore/html/HTMLHeadElement.h
@@ -35,8 +35,6 @@ public:
 
 private:
     HTMLHeadElement(const QualifiedName&, Document*);
-
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusOptional; }
 };
 
 } // namespace
diff --git a/WebCore/html/HTMLHeadingElement.h b/WebCore/html/HTMLHeadingElement.h
index 8d83905..f09cfe3 100644
--- a/WebCore/html/HTMLHeadingElement.h
+++ b/WebCore/html/HTMLHeadingElement.h
@@ -33,8 +33,6 @@ public:
 
 private:
     HTMLHeadingElement(const QualifiedName&, Document*);
-
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
 };
 
 } // namespace WebCore
diff --git a/WebCore/html/HTMLHtmlElement.h b/WebCore/html/HTMLHtmlElement.h
index 5a74b3d..e854fb1 100644
--- a/WebCore/html/HTMLHtmlElement.h
+++ b/WebCore/html/HTMLHtmlElement.h
@@ -36,8 +36,6 @@ public:
 private:
     HTMLHtmlElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
     virtual void insertedIntoDocument();
 #endif
diff --git a/WebCore/html/HTMLIFrameElement.h b/WebCore/html/HTMLIFrameElement.h
index 8c54fe0..61cd6b6 100644
--- a/WebCore/html/HTMLIFrameElement.h
+++ b/WebCore/html/HTMLIFrameElement.h
@@ -35,8 +35,6 @@ public:
 private:
     HTMLIFrameElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
 
diff --git a/WebCore/html/HTMLImageElement.h b/WebCore/html/HTMLImageElement.h
index 23aa6c7..7f38216 100644
--- a/WebCore/html/HTMLImageElement.h
+++ b/WebCore/html/HTMLImageElement.h
@@ -80,8 +80,6 @@ protected:
     virtual void willMoveToNewOwnerDocument();
 
 private:
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
-
     virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const;
     virtual void parseMappedAttribute(Attribute*);
 
diff --git a/WebCore/html/HTMLInputElement.h b/WebCore/html/HTMLInputElement.h
index f5be46a..e6cdda3 100644
--- a/WebCore/html/HTMLInputElement.h
+++ b/WebCore/html/HTMLInputElement.h
@@ -218,8 +218,6 @@ private:
     virtual void willMoveToNewOwnerDocument();
     virtual void didMoveToNewOwnerDocument();
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
-
     virtual bool isKeyboardFocusable(KeyboardEvent*) const;
     virtual bool isMouseFocusable() const;
     virtual bool isEnumeratable() const { return inputType() != IMAGE; }
diff --git a/WebCore/html/HTMLIsIndexElement.h b/WebCore/html/HTMLIsIndexElement.h
index d66c0ed..857ef75 100644
--- a/WebCore/html/HTMLIsIndexElement.h
+++ b/WebCore/html/HTMLIsIndexElement.h
@@ -36,7 +36,6 @@ public:
 private:
     HTMLIsIndexElement(const QualifiedName&, Document*, HTMLFormElement*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
     virtual bool canTriggerImplicitSubmission() const { return true; }
 
     virtual void parseMappedAttribute(Attribute*);
diff --git a/WebCore/html/HTMLLIElement.h b/WebCore/html/HTMLLIElement.h
index 2174fe8..ad12b67 100644
--- a/WebCore/html/HTMLLIElement.h
+++ b/WebCore/html/HTMLLIElement.h
@@ -35,8 +35,6 @@ public:
 private:
     HTMLLIElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusOptional; }
-
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
 
diff --git a/WebCore/html/HTMLLinkElement.h b/WebCore/html/HTMLLinkElement.h
index 6e460e0..2fb7525 100644
--- a/WebCore/html/HTMLLinkElement.h
+++ b/WebCore/html/HTMLLinkElement.h
@@ -75,8 +75,6 @@ public:
     bool isIcon() const { return m_relAttribute.m_isIcon; }
 
 private:
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
-
     virtual void parseMappedAttribute(Attribute*);
 
     void process();
diff --git a/WebCore/html/HTMLMapElement.h b/WebCore/html/HTMLMapElement.h
index 8ff392f..c0c1395 100644
--- a/WebCore/html/HTMLMapElement.h
+++ b/WebCore/html/HTMLMapElement.h
@@ -47,8 +47,6 @@ public:
 private:
     HTMLMapElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual void parseMappedAttribute(Attribute*);
 
     virtual void insertedIntoDocument();
diff --git a/WebCore/html/HTMLMarqueeElement.h b/WebCore/html/HTMLMarqueeElement.h
index 317b138..1b3229a 100644
--- a/WebCore/html/HTMLMarqueeElement.h
+++ b/WebCore/html/HTMLMarqueeElement.h
@@ -43,8 +43,6 @@ public:
     
 private:
     HTMLMarqueeElement(const QualifiedName&, Document*);
-    
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
 
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
diff --git a/WebCore/html/HTMLMenuElement.h b/WebCore/html/HTMLMenuElement.h
index 753a28d..6b588ec 100644
--- a/WebCore/html/HTMLMenuElement.h
+++ b/WebCore/html/HTMLMenuElement.h
@@ -33,8 +33,6 @@ public:
     
 private:
     HTMLMenuElement(const QualifiedName&, Document*);
-    
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
 };
 
 } //namespace
diff --git a/WebCore/html/HTMLMetaElement.h b/WebCore/html/HTMLMetaElement.h
index 6ee7191..9b0178e 100644
--- a/WebCore/html/HTMLMetaElement.h
+++ b/WebCore/html/HTMLMetaElement.h
@@ -38,8 +38,6 @@ public:
 private:
     HTMLMetaElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
-
     virtual void parseMappedAttribute(Attribute*);
     virtual void insertedIntoDocument();
 
diff --git a/WebCore/html/HTMLModElement.h b/WebCore/html/HTMLModElement.h
index 4292006..2b09e21 100644
--- a/WebCore/html/HTMLModElement.h
+++ b/WebCore/html/HTMLModElement.h
@@ -34,8 +34,6 @@ public:
 
 private:
     HTMLModElement(const QualifiedName&, Document*);
-
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
 };
 
 } //namespace
diff --git a/WebCore/html/HTMLOListElement.h b/WebCore/html/HTMLOListElement.h
index 62e2ae1..179fec0 100644
--- a/WebCore/html/HTMLOListElement.h
+++ b/WebCore/html/HTMLOListElement.h
@@ -38,8 +38,6 @@ public:
 private:
     HTMLOListElement(const QualifiedName&, Document*);
         
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
 
diff --git a/WebCore/html/HTMLOptionElement.h b/WebCore/html/HTMLOptionElement.h
index c8b9c2a..c1791d7 100644
--- a/WebCore/html/HTMLOptionElement.h
+++ b/WebCore/html/HTMLOptionElement.h
@@ -66,7 +66,6 @@ public:
 private:
     HTMLOptionElement(const QualifiedName&, Document*, HTMLFormElement* = 0);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusOptional; }
     virtual bool supportsFocus() const;
     virtual bool isFocusable() const;
     virtual bool rendererIsNeeded(RenderStyle*) { return false; }
diff --git a/WebCore/html/HTMLParagraphElement.h b/WebCore/html/HTMLParagraphElement.h
index 8fff62d..6dbf071 100644
--- a/WebCore/html/HTMLParagraphElement.h
+++ b/WebCore/html/HTMLParagraphElement.h
@@ -34,8 +34,6 @@ public:
 private:
     HTMLParagraphElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
 };
diff --git a/WebCore/html/HTMLParamElement.h b/WebCore/html/HTMLParamElement.h
index 60b90a4..f13f8fa 100644
--- a/WebCore/html/HTMLParamElement.h
+++ b/WebCore/html/HTMLParamElement.h
@@ -37,19 +37,18 @@ public:
 private:
     HTMLParamElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
-
     virtual void parseMappedAttribute(Attribute*);
 
     virtual bool isURLAttribute(Attribute*) const;
 
     virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
 
+    // FIXME: These don't need to be stored as members and instead
+    // name() value() could use getAttribute(nameAttr/valueAttr).
     AtomicString m_name;
     AtomicString m_value;
 };
 
-
-}
+} // namespace WebCore
 
 #endif
diff --git a/WebCore/html/HTMLPlugInElement.h b/WebCore/html/HTMLPlugInElement.h
index f2f8351..8a791b1 100644
--- a/WebCore/html/HTMLPlugInElement.h
+++ b/WebCore/html/HTMLPlugInElement.h
@@ -65,8 +65,6 @@ private:
 
     virtual RenderWidget* renderWidgetForJSBindings() const = 0;
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual void updateWidget() { }
 
 protected:
diff --git a/WebCore/html/HTMLPreElement.h b/WebCore/html/HTMLPreElement.h
index cf48180..3ccdb86 100644
--- a/WebCore/html/HTMLPreElement.h
+++ b/WebCore/html/HTMLPreElement.h
@@ -34,8 +34,6 @@ public:
 private:
     HTMLPreElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
 };
diff --git a/WebCore/html/HTMLQuoteElement.h b/WebCore/html/HTMLQuoteElement.h
index 9babd8e..225dde8 100644
--- a/WebCore/html/HTMLQuoteElement.h
+++ b/WebCore/html/HTMLQuoteElement.h
@@ -36,8 +36,6 @@ public:
 private:
     HTMLQuoteElement(const QualifiedName&, Document*);
     
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual void insertedIntoDocument();
 };
 
diff --git a/WebCore/html/HTMLScriptElement.h b/WebCore/html/HTMLScriptElement.h
index 29eb97d..a5629ee 100644
--- a/WebCore/html/HTMLScriptElement.h
+++ b/WebCore/html/HTMLScriptElement.h
@@ -49,8 +49,6 @@ private:
 
     virtual String scriptContent() const;
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual void parseMappedAttribute(Attribute*);
     virtual void insertedIntoDocument();
     virtual void removedFromDocument();
diff --git a/WebCore/html/HTMLSourceElement.h b/WebCore/html/HTMLSourceElement.h
index a0dd952..8aa1d06 100644
--- a/WebCore/html/HTMLSourceElement.h
+++ b/WebCore/html/HTMLSourceElement.h
@@ -48,8 +48,6 @@ public:
 
 private:
     HTMLSourceElement(const QualifiedName&, Document*);
-
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
     
     virtual void insertedIntoTree(bool);
     virtual bool isURLAttribute(Attribute*) const;
diff --git a/WebCore/html/HTMLStyleElement.h b/WebCore/html/HTMLStyleElement.h
index d68bab4..b4013b8 100644
--- a/WebCore/html/HTMLStyleElement.h
+++ b/WebCore/html/HTMLStyleElement.h
@@ -41,8 +41,6 @@ public:
 private:
     HTMLStyleElement(const QualifiedName&, Document*, bool createdByParser);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     // overload from HTMLElement
     virtual void parseMappedAttribute(Attribute*);
     virtual void insertedIntoDocument();
diff --git a/WebCore/html/HTMLTableCaptionElement.h b/WebCore/html/HTMLTableCaptionElement.h
index b78d8b0..a2dd2fa 100644
--- a/WebCore/html/HTMLTableCaptionElement.h
+++ b/WebCore/html/HTMLTableCaptionElement.h
@@ -37,8 +37,6 @@ public:
 private:
     HTMLTableCaptionElement(const QualifiedName&, Document*);
     
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-    
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
 };
diff --git a/WebCore/html/HTMLTableCellElement.h b/WebCore/html/HTMLTableCellElement.h
index a937c96..0c97413 100644
--- a/WebCore/html/HTMLTableCellElement.h
+++ b/WebCore/html/HTMLTableCellElement.h
@@ -56,8 +56,6 @@ public:
 private:
     HTMLTableCellElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusOptional; }
-
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
 
diff --git a/WebCore/html/HTMLTableColElement.cpp b/WebCore/html/HTMLTableColElement.cpp
index 50718b0..20b0f36 100644
--- a/WebCore/html/HTMLTableColElement.cpp
+++ b/WebCore/html/HTMLTableColElement.cpp
@@ -47,11 +47,6 @@ PassRefPtr<HTMLTableColElement> HTMLTableColElement::create(const QualifiedName&
     return adoptRef(new HTMLTableColElement(tagName, document));
 }
 
-HTMLTagStatus HTMLTableColElement::endTagRequirement() const
-{
-    return hasLocalName(colTag) ? TagStatusForbidden : TagStatusOptional;
-}
-
 bool HTMLTableColElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
 {
     if (attrName == widthAttr) {
diff --git a/WebCore/html/HTMLTableColElement.h b/WebCore/html/HTMLTableColElement.h
index 1a73ec6..c7517d1 100644
--- a/WebCore/html/HTMLTableColElement.h
+++ b/WebCore/html/HTMLTableColElement.h
@@ -42,7 +42,6 @@ public:
 private:
     HTMLTableColElement(const QualifiedName& tagName, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const;
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
     virtual bool canHaveAdditionalAttributeStyleDecls() const { return true; }
diff --git a/WebCore/html/HTMLTableElement.h b/WebCore/html/HTMLTableElement.h
index 80f4a42..da3dc30 100644
--- a/WebCore/html/HTMLTableElement.h
+++ b/WebCore/html/HTMLTableElement.h
@@ -71,8 +71,6 @@ public:
 private:
     HTMLTableElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
     virtual bool isURLAttribute(Attribute*) const;
diff --git a/WebCore/html/HTMLTableRowElement.h b/WebCore/html/HTMLTableRowElement.h
index ca241d8..c433677 100644
--- a/WebCore/html/HTMLTableRowElement.h
+++ b/WebCore/html/HTMLTableRowElement.h
@@ -49,8 +49,6 @@ public:
 
 private:
     HTMLTableRowElement(const QualifiedName&, Document*);
-
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusOptional; }
 };
 
 } // namespace
diff --git a/WebCore/html/HTMLTableSectionElement.h b/WebCore/html/HTMLTableSectionElement.h
index 2248e72..a84cbde 100644
--- a/WebCore/html/HTMLTableSectionElement.h
+++ b/WebCore/html/HTMLTableSectionElement.h
@@ -56,7 +56,6 @@ public:
 private:
     HTMLTableSectionElement(const QualifiedName& tagName, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusOptional; }
     virtual bool canHaveAdditionalAttributeStyleDecls() const { return true; }
     virtual void additionalAttributeStyleDecls(Vector<CSSMutableStyleDeclaration*>&);
 };
diff --git a/WebCore/html/HTMLUListElement.h b/WebCore/html/HTMLUListElement.h
index c6d6d02..f91bf1c 100644
--- a/WebCore/html/HTMLUListElement.h
+++ b/WebCore/html/HTMLUListElement.h
@@ -35,8 +35,6 @@ public:
 private:
     HTMLUListElement(const QualifiedName&, Document*);
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
-
     virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
     virtual void parseMappedAttribute(Attribute*);
 };
diff --git a/WebKit/qt/Api/qwebelement.cpp b/WebKit/qt/Api/qwebelement.cpp
index 1dd4150..83ee451 100644
--- a/WebKit/qt/Api/qwebelement.cpp
+++ b/WebKit/qt/Api/qwebelement.cpp
@@ -1190,6 +1190,8 @@ void QWebElement::removeAllChildren()
     m_element->removeAllChildren();
 }
 
+// FIXME: This code, and all callers are wrong, and have no place in a
+// WebKit implementation.  These should be replaced with WebCore implementations.
 static RefPtr<Node> findInsertionPoint(PassRefPtr<Node> root)
 {
     RefPtr<Node> node = root;
@@ -1205,7 +1207,7 @@ static RefPtr<Node> findInsertionPoint(PassRefPtr<Node> root)
         // The insert point could be a non-enclosable tag and it can thus
         // never have children, so go one up. Get the parent element, and not
         // note as a root note will always exist.
-        if (element->endTagRequirement() == TagStatusForbidden)
+        if (element->ieForbidsInsertHTML())
             node = node->parentElement();
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list