Use ContainerNode instead of Node where possible
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 May 2012 16:56:33 +0000 (16:56 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 May 2012 16:56:33 +0000 (16:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=87220

Reviewed by Geoffrey Garen.

It's better to use a more specific type; in some cases we even generate
more efficient code if we have a more specific type. Also, we want any
type casts to be as close as possible to the corresponding type checks,
so eliminating these uses of toContainerNode is a plus, also.

* dom/ContainerNodeAlgorithms.h: Changed insertionPoint to be a ContainerNode
instead of a Node. Fixed spelling error "inseretions". Changed
(WebCore::ChildFrameDisconnector::Target::Target): Changed type of frame owner
element to HTMLFrameOwnerElement from Node.

* dom/DocumentType.cpp:
(WebCore::DocumentType::insertedInto):
(WebCore::DocumentType::removedFrom):
* dom/DocumentType.h:
* dom/Element.cpp:
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
* dom/Element.h:
* dom/Node.cpp:
(WebCore::Node::insertedInto):
(WebCore::Node::removedFrom):
* dom/Node.h:
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::insertedInto):
(WebCore::ProcessingInstruction::removedFrom):
* dom/ProcessingInstruction.h:
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::insertedInto):
* dom/ScriptElement.h:
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::insertedInto):
(WebCore::FormAssociatedElement::removedFrom):
* html/FormAssociatedElement.h:
* html/HTMLBaseElement.cpp:
(WebCore::HTMLBaseElement::insertedInto):
(WebCore::HTMLBaseElement::removedFrom):
* html/HTMLBaseElement.h:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto):
(WebCore::HTMLBodyElement::didNotifyDescendantInsertions):
* html/HTMLBodyElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::insertedInto):
(WebCore::HTMLFormControlElement::removedFrom):
* html/HTMLFormControlElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::insertedInto):
(WebCore::HTMLFormElement::didNotifyDescendantInsertions):
(WebCore::HTMLFormElement::removedFrom):
* html/HTMLFormElement.h:
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::insertedInto):
(WebCore::HTMLFrameElementBase::didNotifyDescendantInsertions):
* html/HTMLFrameElementBase.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::insertedInto):
(WebCore::HTMLFrameSetElement::removedFrom):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::insertedInto):
(WebCore::HTMLIFrameElement::removedFrom):
* html/HTMLIFrameElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::insertedInto):
(WebCore::HTMLInputElement::removedFrom):
* html/HTMLInputElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::insertedInto):
(WebCore::HTMLLinkElement::removedFrom):
* html/HTMLLinkElement.h:
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::insertedInto):
(WebCore::HTMLMapElement::removedFrom):
* html/HTMLMapElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::insertedInto):
(WebCore::HTMLMediaElement::removedFrom):
* html/HTMLMediaElement.h:
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::insertedInto):
* html/HTMLMetaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::insertedInto):
(WebCore::HTMLObjectElement::removedFrom):
* html/HTMLObjectElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::insertedInto):
* html/HTMLOptionElement.h:
* html/HTMLQuoteElement.cpp:
(WebCore::HTMLQuoteElement::insertedInto):
* html/HTMLQuoteElement.h:
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::insertedInto):
* html/HTMLScriptElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::insertedInto):
* html/HTMLSelectElement.h:
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::insertedInto):
(WebCore::HTMLSourceElement::removedFrom):
* html/HTMLSourceElement.h:
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::insertedInto):
(WebCore::HTMLStyleElement::removedFrom):
* html/HTMLStyleElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::insertedInto):
* html/HTMLTextFormControlElement.h:
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::insertedInto):
(WebCore::HTMLTitleElement::removedFrom):
* html/HTMLTitleElement.h:
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::insertedInto):
(WebCore::HTMLTrackElement::removedFrom):
* html/HTMLTrackElement.h:
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::insertedInto):
* mathml/MathMLMathElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::removedFrom):
* svg/SVGElement.h:
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::insertedInto):
(WebCore::SVGFEImageElement::removedFrom):
* svg/SVGFEImageElement.h:
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::insertedInto):
(WebCore::SVGFontFaceElement::removedFrom):
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::insertedInto):
* svg/SVGFontFaceUriElement.h:
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::insertedInto):
(WebCore::SVGGlyphElement::removedFrom):
* svg/SVGGlyphElement.h:
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::insertedInto):
(WebCore::SVGHKernElement::removedFrom):
* svg/SVGHKernElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::insertedInto):
* svg/SVGImageElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::insertedInto):
(WebCore::SVGSVGElement::removedFrom):
* svg/SVGSVGElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::insertedInto):
* svg/SVGScriptElement.h:
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::insertedInto):
(WebCore::SVGStyleElement::removedFrom):
* svg/SVGStyleElement.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::insertedInto):
(WebCore::SVGStyledElement::removedFrom):
* svg/SVGStyledElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::insertedInto):
(WebCore::SVGTRefElement::removedFrom):
* svg/SVGTRefElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::insertedInto):
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::insertedInto):
(WebCore::SVGTitleElement::removedFrom):
* svg/SVGTitleElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::insertedInto):
(WebCore::SVGUseElement::removedFrom):
* svg/SVGUseElement.h:
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::insertedInto):
(WebCore::SVGVKernElement::removedFrom):
* svg/SVGVKernElement.h:
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::insertedInto):
(WebCore::SVGSMILElement::removedFrom):
* svg/animation/SVGSMILElement.h:
Changed arguments of insertedInto and removedFrom to ContainerNode instead of Node.
Did the same with didNotifyDescendantInsertions, while fixing the typo in its name.

* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply): Put a typecast toHTMLElement here.
The check for isListElement and isLegacyAppleStyleSpan takes care of the type checking.
(WebCore::ReplaceSelectionCommand::insertAsListItems): Changed this function to take
an HTMLElement instead of a Node, then we can drop use of the toContainerNode function.
* editing/ReplaceSelectionCommand.h:

* editing/TextIterator.cpp: Fixed a typo in a comment.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@118192 268f45cc-cd09-0410-ab3c-d52691b4dbfc

99 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/ContainerNodeAlgorithms.h
Source/WebCore/dom/DocumentType.cpp
Source/WebCore/dom/DocumentType.h
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/ProcessingInstruction.cpp
Source/WebCore/dom/ProcessingInstruction.h
Source/WebCore/dom/ScriptElement.cpp
Source/WebCore/dom/ScriptElement.h
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/ReplaceSelectionCommand.h
Source/WebCore/editing/TextIterator.cpp
Source/WebCore/html/FormAssociatedElement.cpp
Source/WebCore/html/FormAssociatedElement.h
Source/WebCore/html/HTMLBaseElement.cpp
Source/WebCore/html/HTMLBaseElement.h
Source/WebCore/html/HTMLBodyElement.cpp
Source/WebCore/html/HTMLBodyElement.h
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormControlElement.h
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLFormElement.h
Source/WebCore/html/HTMLFrameElementBase.cpp
Source/WebCore/html/HTMLFrameElementBase.h
Source/WebCore/html/HTMLFrameSetElement.cpp
Source/WebCore/html/HTMLFrameSetElement.h
Source/WebCore/html/HTMLIFrameElement.cpp
Source/WebCore/html/HTMLIFrameElement.h
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/html/HTMLImageElement.h
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/HTMLLinkElement.cpp
Source/WebCore/html/HTMLLinkElement.h
Source/WebCore/html/HTMLMapElement.cpp
Source/WebCore/html/HTMLMapElement.h
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/HTMLMetaElement.cpp
Source/WebCore/html/HTMLMetaElement.h
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/HTMLObjectElement.h
Source/WebCore/html/HTMLOptionElement.cpp
Source/WebCore/html/HTMLOptionElement.h
Source/WebCore/html/HTMLQuoteElement.cpp
Source/WebCore/html/HTMLQuoteElement.h
Source/WebCore/html/HTMLScriptElement.cpp
Source/WebCore/html/HTMLScriptElement.h
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLSelectElement.h
Source/WebCore/html/HTMLSourceElement.cpp
Source/WebCore/html/HTMLSourceElement.h
Source/WebCore/html/HTMLStyleElement.cpp
Source/WebCore/html/HTMLStyleElement.h
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.h
Source/WebCore/html/HTMLTitleElement.cpp
Source/WebCore/html/HTMLTitleElement.h
Source/WebCore/html/HTMLTrackElement.cpp
Source/WebCore/html/HTMLTrackElement.h
Source/WebCore/mathml/MathMLMathElement.cpp
Source/WebCore/mathml/MathMLMathElement.h
Source/WebCore/svg/SVGElement.cpp
Source/WebCore/svg/SVGElement.h
Source/WebCore/svg/SVGFEImageElement.cpp
Source/WebCore/svg/SVGFEImageElement.h
Source/WebCore/svg/SVGFontFaceElement.cpp
Source/WebCore/svg/SVGFontFaceElement.h
Source/WebCore/svg/SVGFontFaceUriElement.cpp
Source/WebCore/svg/SVGFontFaceUriElement.h
Source/WebCore/svg/SVGGlyphElement.cpp
Source/WebCore/svg/SVGGlyphElement.h
Source/WebCore/svg/SVGHKernElement.cpp
Source/WebCore/svg/SVGHKernElement.h
Source/WebCore/svg/SVGImageElement.cpp
Source/WebCore/svg/SVGImageElement.h
Source/WebCore/svg/SVGSVGElement.cpp
Source/WebCore/svg/SVGSVGElement.h
Source/WebCore/svg/SVGScriptElement.cpp
Source/WebCore/svg/SVGScriptElement.h
Source/WebCore/svg/SVGStyleElement.cpp
Source/WebCore/svg/SVGStyleElement.h
Source/WebCore/svg/SVGStyledElement.cpp
Source/WebCore/svg/SVGStyledElement.h
Source/WebCore/svg/SVGTRefElement.cpp
Source/WebCore/svg/SVGTRefElement.h
Source/WebCore/svg/SVGTextPathElement.cpp
Source/WebCore/svg/SVGTextPathElement.h
Source/WebCore/svg/SVGTitleElement.cpp
Source/WebCore/svg/SVGTitleElement.h
Source/WebCore/svg/SVGUseElement.cpp
Source/WebCore/svg/SVGUseElement.h
Source/WebCore/svg/SVGVKernElement.cpp
Source/WebCore/svg/SVGVKernElement.h
Source/WebCore/svg/animation/SVGSMILElement.cpp
Source/WebCore/svg/animation/SVGSMILElement.h

index f394c99..3c125b6 100644 (file)
@@ -1,3 +1,208 @@
+2012-05-23  Darin Adler  <darin@apple.com>
+
+        Use ContainerNode instead of Node where possible
+        https://bugs.webkit.org/show_bug.cgi?id=87220
+
+        Reviewed by Geoffrey Garen.
+
+        It's better to use a more specific type; in some cases we even generate
+        more efficient code if we have a more specific type. Also, we want any
+        type casts to be as close as possible to the corresponding type checks,
+        so eliminating these uses of toContainerNode is a plus, also.
+
+        * dom/ContainerNodeAlgorithms.h: Changed insertionPoint to be a ContainerNode
+        instead of a Node. Fixed spelling error "inseretions". Changed
+        (WebCore::ChildFrameDisconnector::Target::Target): Changed type of frame owner
+        element to HTMLFrameOwnerElement from Node.
+
+        * dom/DocumentType.cpp:
+        (WebCore::DocumentType::insertedInto):
+        (WebCore::DocumentType::removedFrom):
+        * dom/DocumentType.h:
+        * dom/Element.cpp:
+        (WebCore::Element::insertedInto):
+        (WebCore::Element::removedFrom):
+        * dom/Element.h:
+        * dom/Node.cpp:
+        (WebCore::Node::insertedInto):
+        (WebCore::Node::removedFrom):
+        * dom/Node.h:
+        * dom/ProcessingInstruction.cpp:
+        (WebCore::ProcessingInstruction::insertedInto):
+        (WebCore::ProcessingInstruction::removedFrom):
+        * dom/ProcessingInstruction.h:
+        * dom/ScriptElement.cpp:
+        (WebCore::ScriptElement::insertedInto):
+        * dom/ScriptElement.h:
+        * html/FormAssociatedElement.cpp:
+        (WebCore::FormAssociatedElement::insertedInto):
+        (WebCore::FormAssociatedElement::removedFrom):
+        * html/FormAssociatedElement.h:
+        * html/HTMLBaseElement.cpp:
+        (WebCore::HTMLBaseElement::insertedInto):
+        (WebCore::HTMLBaseElement::removedFrom):
+        * html/HTMLBaseElement.h:
+        * html/HTMLBodyElement.cpp:
+        (WebCore::HTMLBodyElement::insertedInto):
+        (WebCore::HTMLBodyElement::didNotifyDescendantInsertions):
+        * html/HTMLBodyElement.h:
+        * html/HTMLFormControlElement.cpp:
+        (WebCore::HTMLFormControlElement::insertedInto):
+        (WebCore::HTMLFormControlElement::removedFrom):
+        * html/HTMLFormControlElement.h:
+        * html/HTMLFormElement.cpp:
+        (WebCore::HTMLFormElement::insertedInto):
+        (WebCore::HTMLFormElement::didNotifyDescendantInsertions):
+        (WebCore::HTMLFormElement::removedFrom):
+        * html/HTMLFormElement.h:
+        * html/HTMLFrameElementBase.cpp:
+        (WebCore::HTMLFrameElementBase::insertedInto):
+        (WebCore::HTMLFrameElementBase::didNotifyDescendantInsertions):
+        * html/HTMLFrameElementBase.h:
+        * html/HTMLFrameSetElement.cpp:
+        (WebCore::HTMLFrameSetElement::insertedInto):
+        (WebCore::HTMLFrameSetElement::removedFrom):
+        * html/HTMLFrameSetElement.h:
+        * html/HTMLIFrameElement.cpp:
+        (WebCore::HTMLIFrameElement::insertedInto):
+        (WebCore::HTMLIFrameElement::removedFrom):
+        * html/HTMLIFrameElement.h:
+        * html/HTMLImageElement.cpp:
+        (WebCore::HTMLImageElement::insertedInto):
+        (WebCore::HTMLImageElement::removedFrom):
+        * html/HTMLImageElement.h:
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::insertedInto):
+        (WebCore::HTMLInputElement::removedFrom):
+        * html/HTMLInputElement.h:
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::insertedInto):
+        (WebCore::HTMLLinkElement::removedFrom):
+        * html/HTMLLinkElement.h:
+        * html/HTMLMapElement.cpp:
+        (WebCore::HTMLMapElement::insertedInto):
+        (WebCore::HTMLMapElement::removedFrom):
+        * html/HTMLMapElement.h:
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::insertedInto):
+        (WebCore::HTMLMediaElement::removedFrom):
+        * html/HTMLMediaElement.h:
+        * html/HTMLMetaElement.cpp:
+        (WebCore::HTMLMetaElement::insertedInto):
+        * html/HTMLMetaElement.h:
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::insertedInto):
+        (WebCore::HTMLObjectElement::removedFrom):
+        * html/HTMLObjectElement.h:
+        * html/HTMLOptionElement.cpp:
+        (WebCore::HTMLOptionElement::insertedInto):
+        * html/HTMLOptionElement.h:
+        * html/HTMLQuoteElement.cpp:
+        (WebCore::HTMLQuoteElement::insertedInto):
+        * html/HTMLQuoteElement.h:
+        * html/HTMLScriptElement.cpp:
+        (WebCore::HTMLScriptElement::insertedInto):
+        * html/HTMLScriptElement.h:
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::insertedInto):
+        * html/HTMLSelectElement.h:
+        * html/HTMLSourceElement.cpp:
+        (WebCore::HTMLSourceElement::insertedInto):
+        (WebCore::HTMLSourceElement::removedFrom):
+        * html/HTMLSourceElement.h:
+        * html/HTMLStyleElement.cpp:
+        (WebCore::HTMLStyleElement::insertedInto):
+        (WebCore::HTMLStyleElement::removedFrom):
+        * html/HTMLStyleElement.h:
+        * html/HTMLTextFormControlElement.cpp:
+        (WebCore::HTMLTextFormControlElement::insertedInto):
+        * html/HTMLTextFormControlElement.h:
+        * html/HTMLTitleElement.cpp:
+        (WebCore::HTMLTitleElement::insertedInto):
+        (WebCore::HTMLTitleElement::removedFrom):
+        * html/HTMLTitleElement.h:
+        * html/HTMLTrackElement.cpp:
+        (WebCore::HTMLTrackElement::insertedInto):
+        (WebCore::HTMLTrackElement::removedFrom):
+        * html/HTMLTrackElement.h:
+        * mathml/MathMLMathElement.cpp:
+        (WebCore::MathMLMathElement::insertedInto):
+        * mathml/MathMLMathElement.h:
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::removedFrom):
+        * svg/SVGElement.h:
+        * svg/SVGFEImageElement.cpp:
+        (WebCore::SVGFEImageElement::insertedInto):
+        (WebCore::SVGFEImageElement::removedFrom):
+        * svg/SVGFEImageElement.h:
+        * svg/SVGFontFaceElement.cpp:
+        (WebCore::SVGFontFaceElement::insertedInto):
+        (WebCore::SVGFontFaceElement::removedFrom):
+        * svg/SVGFontFaceElement.h:
+        * svg/SVGFontFaceUriElement.cpp:
+        (WebCore::SVGFontFaceUriElement::insertedInto):
+        * svg/SVGFontFaceUriElement.h:
+        * svg/SVGGlyphElement.cpp:
+        (WebCore::SVGGlyphElement::insertedInto):
+        (WebCore::SVGGlyphElement::removedFrom):
+        * svg/SVGGlyphElement.h:
+        * svg/SVGHKernElement.cpp:
+        (WebCore::SVGHKernElement::insertedInto):
+        (WebCore::SVGHKernElement::removedFrom):
+        * svg/SVGHKernElement.h:
+        * svg/SVGImageElement.cpp:
+        (WebCore::SVGImageElement::insertedInto):
+        * svg/SVGImageElement.h:
+        * svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::insertedInto):
+        (WebCore::SVGSVGElement::removedFrom):
+        * svg/SVGSVGElement.h:
+        * svg/SVGScriptElement.cpp:
+        (WebCore::SVGScriptElement::insertedInto):
+        * svg/SVGScriptElement.h:
+        * svg/SVGStyleElement.cpp:
+        (WebCore::SVGStyleElement::insertedInto):
+        (WebCore::SVGStyleElement::removedFrom):
+        * svg/SVGStyleElement.h:
+        * svg/SVGStyledElement.cpp:
+        (WebCore::SVGStyledElement::insertedInto):
+        (WebCore::SVGStyledElement::removedFrom):
+        * svg/SVGStyledElement.h:
+        * svg/SVGTRefElement.cpp:
+        (WebCore::SVGTRefElement::insertedInto):
+        (WebCore::SVGTRefElement::removedFrom):
+        * svg/SVGTRefElement.h:
+        * svg/SVGTextPathElement.cpp:
+        (WebCore::SVGTextPathElement::insertedInto):
+        * svg/SVGTextPathElement.h:
+        * svg/SVGTitleElement.cpp:
+        (WebCore::SVGTitleElement::insertedInto):
+        (WebCore::SVGTitleElement::removedFrom):
+        * svg/SVGTitleElement.h:
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::insertedInto):
+        (WebCore::SVGUseElement::removedFrom):
+        * svg/SVGUseElement.h:
+        * svg/SVGVKernElement.cpp:
+        (WebCore::SVGVKernElement::insertedInto):
+        (WebCore::SVGVKernElement::removedFrom):
+        * svg/SVGVKernElement.h:
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::SVGSMILElement::insertedInto):
+        (WebCore::SVGSMILElement::removedFrom):
+        * svg/animation/SVGSMILElement.h:
+        Changed arguments of insertedInto and removedFrom to ContainerNode instead of Node.
+        Did the same with didNotifyDescendantInsertions, while fixing the typo in its name.
+
+        * editing/ReplaceSelectionCommand.cpp:
+        (WebCore::ReplaceSelectionCommand::doApply): Put a typecast toHTMLElement here.
+        The check for isListElement and isLegacyAppleStyleSpan takes care of the type checking.
+        (WebCore::ReplaceSelectionCommand::insertAsListItems): Changed this function to take
+        an HTMLElement instead of a Node, then we can drop use of the toContainerNode function.
+        * editing/ReplaceSelectionCommand.h:
+
+        * editing/TextIterator.cpp: Fixed a typo in a comment.
+
 2012-05-23  Alexei Filippov  <alexeif@chromium.org>
 
         Web Inspector: filter out debugging stuff from the heap class view
index d98e619..fbb5886 100644 (file)
 #define ContainerNodeAlgorithms_h
 
 #include "Document.h"
+#include "HTMLFrameOwnerElement.h"
 #include "InspectorInstrumentation.h"
 #include <wtf/Assertions.h>
 
 namespace WebCore {
 
-class Node;
-
 class ChildNodeInsertionNotifier {
 public:
-    explicit ChildNodeInsertionNotifier(Node* insertionPoint)
+    explicit ChildNodeInsertionNotifier(ContainerNode* insertionPoint)
         : m_insertionPoint(insertionPoint)
-    { }
+    {
+    }
 
     void notifyInsertedIntoDocument(Node*);
     void notify(Node*);
@@ -45,14 +45,15 @@ private:
     void notifyNodeInsertedIntoDocument(Node*);
     void notifyNodeInsertedIntoTree(ContainerNode*);
 
-    Node* m_insertionPoint;
+    ContainerNode* m_insertionPoint;
 };
 
 class ChildNodeRemovalNotifier {
 public:
-    explicit ChildNodeRemovalNotifier(Node* insertionPoint)
+    explicit ChildNodeRemovalNotifier(ContainerNode* insertionPoint)
         : m_insertionPoint(insertionPoint)
-    { }
+    {
+    }
 
     void notify(Node*);
 
@@ -62,15 +63,15 @@ private:
     void notifyNodeRemovedFromDocument(Node*);
     void notifyNodeRemovedFromTree(ContainerNode*);
 
-    Node* m_insertionPoint;
+    ContainerNode* m_insertionPoint;
 };
 
 namespace Private {
 
     template<class GenericNode, class GenericNodeContainer>
-    void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer* container);
+    void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer*);
 
-};
+}
 
 // Helper functions for TreeShared-derived classes, which have a 'Node' style interface
 // This applies to 'ContainerNode' and 'SVGElementInstance'
@@ -195,8 +196,8 @@ inline void ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument(Node* nod
     if (node->isContainerNode())
         notifyDescendantInsertedIntoDocument(toContainerNode(node));
 
-    if (request == Node::InsertionShouldCallDidNotifyDescendantInseretions)
-        node->didNotifyDescendantInseretions(m_insertionPoint);
+    if (request == Node::InsertionShouldCallDidNotifyDescendantInsertions)
+        node->didNotifyDescendantInsertions(m_insertionPoint);
 }
 
 inline void ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree(ContainerNode* node)
@@ -207,8 +208,8 @@ inline void ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree(ContainerNode
     Node::InsertionNotificationRequest request = node->insertedInto(m_insertionPoint);
 
     notifyDescendantInsertedIntoTree(node);
-    if (request == Node::InsertionShouldCallDidNotifyDescendantInseretions)
-        node->didNotifyDescendantInseretions(m_insertionPoint);
+    if (request == Node::InsertionShouldCallDidNotifyDescendantInsertions)
+        node->didNotifyDescendantInsertions(m_insertionPoint);
 
     allowEventDispatch();
 }
@@ -275,17 +276,18 @@ private:
 
     class Target {
     public:
-        Target(Node* element)
+        Target(HTMLFrameOwnerElement* element)
             : m_owner(element)
             , m_ownerParent(element->parentNode())
-        { }
+        {
+        }
 
         bool isValid() const { return m_owner->parentNode() == m_ownerParent; }
         void disconnect();
 
     private:
-        RefPtr<Node> m_owner;
-        Node* m_ownerParent;
+        RefPtr<HTMLFrameOwnerElement> m_owner;
+        ContainerNode* m_ownerParent;
     };
 
     Vector<Target, 10> m_list;
@@ -303,7 +305,7 @@ inline void ChildFrameDisconnector::collectDescendant(Node* root)
             continue;
         Element* element = toElement(node);
         if (element->hasCustomCallbacks() && element->isFrameOwnerElement())
-            m_list.append(node);
+            m_list.append(toFrameOwnerElement(element));
         if (ElementShadow* shadow = element->shadow())
             collectDescendant(shadow);
     }
@@ -316,7 +318,7 @@ inline void ChildFrameDisconnector::disconnect()
         Target& target = m_list[i];
         if (target.isValid())
             target.disconnect();
-    };
+    }
 }
 
 } // namespace WebCore
index a67a6b5..cd1d485 100644 (file)
@@ -56,7 +56,7 @@ PassRefPtr<Node> DocumentType::cloneNode(bool /*deep*/)
     return create(document(), m_name, m_publicId, m_systemId);
 }
 
-Node::InsertionNotificationRequest DocumentType::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest DocumentType::insertedInto(ContainerNode* insertionPoint)
 {
     Node::insertedInto(insertionPoint);
     if (!insertionPoint->inDocument())
@@ -73,7 +73,7 @@ Node::InsertionNotificationRequest DocumentType::insertedInto(Node* insertionPoi
     return InsertionDone;
 }
 
-void DocumentType::removedFrom(Node* insertionPoint)
+void DocumentType::removedFrom(ContainerNode* insertionPoint)
 {
     if (insertionPoint->inDocument() && document() && document()->doctype() == this)
         document()->setDocType(0);
index e523efb..6c64124 100644 (file)
@@ -54,8 +54,8 @@ private:
     virtual NodeType nodeType() const;
     virtual PassRefPtr<Node> cloneNode(bool deep);
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     OwnPtr<NamedNodeMap> m_entities;
     OwnPtr<NamedNodeMap> m_notations;
index 9100966..b80a8c4 100644 (file)
@@ -887,7 +887,7 @@ void Element::setChangedSinceLastFormControlChangeEvent(bool)
 {
 }
 
-Node::InsertionNotificationRequest Element::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertionPoint)
 {
     // need to do superclass processing first so inDocument() is true
     // by the time we reach updateId
@@ -912,7 +912,7 @@ Node::InsertionNotificationRequest Element::insertedInto(Node* insertionPoint)
     return InsertionDone;
 }
 
-void Element::removedFrom(Node* insertionPoint)
+void Element::removedFrom(ContainerNode* insertionPoint)
 {
 #if ENABLE(FULLSCREEN_API)
     if (containsFullScreenElement())
index 917c7ea..ffb7b2d 100644 (file)
@@ -424,8 +424,8 @@ protected:
     {
     }
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
     virtual bool willRecalcStyle(StyleChange);
index 9108f36..db2a35a 100644 (file)
@@ -2449,7 +2449,7 @@ ScriptExecutionContext* Node::scriptExecutionContext() const
     return document();
 }
 
-Node::InsertionNotificationRequest Node::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* insertionPoint)
 {
     ASSERT(insertionPoint->inDocument() || isContainerNode());
     if (insertionPoint->inDocument())
@@ -2457,7 +2457,7 @@ Node::InsertionNotificationRequest Node::insertedInto(Node* insertionPoint)
     return InsertionDone;
 }
 
-void Node::removedFrom(Node* insertionPoint)
+void Node::removedFrom(ContainerNode* insertionPoint)
 {
     ASSERT(insertionPoint->inDocument() || isContainerNode());
     if (insertionPoint->inDocument())
index d206a06..1b938fa 100644 (file)
@@ -523,28 +523,28 @@ public:
     // This is similar to the DOMNodeInsertedIntoDocument DOM event, but does not require the overhead of event
     // dispatching.
     //
-    // Webkit notifies this callback regardless if the subtree of the node is a document tree or a floating subtree.
+    // WebKit notifies this callback regardless if the subtree of the node is a document tree or a floating subtree.
     // Implementation can determine the type of subtree by seeing insertionPoint->inDocument().
     // For a performance reason, notifications are delivered only to ContainerNode subclasses if the insertionPoint is out of document.
     //
-    // There are another callback named didNotifyDescendantInseretions(), which is called after all the descendant is notified.
-    // Only a few subclasses actually need this. To utilize this, the node should return InsertionShouldCallDidNotifyDescendantInseretions
+    // There are another callback named didNotifyDescendantInsertions(), which is called after all the descendant is notified.
+    // Only a few subclasses actually need this. To utilize this, the node should return InsertionShouldCallDidNotifyDescendantInsertions
     // from insrtedInto().
     //
     enum InsertionNotificationRequest {
         InsertionDone,
-        InsertionShouldCallDidNotifyDescendantInseretions
+        InsertionShouldCallDidNotifyDescendantInsertions
     };
 
-    virtual InsertionNotificationRequest insertedInto(Node* insertionPoint);
-    virtual void didNotifyDescendantInseretions(Node*) { }
+    virtual InsertionNotificationRequest insertedInto(ContainerNode* insertionPoint);
+    virtual void didNotifyDescendantInsertions(ContainerNode*) { }
 
     // Notifies the node that it is no longer part of the tree.
     //
     // This is a dual of insertedInto(), and is similar to the DOMNodeRemovedFromDocument DOM event, but does not require the overhead of event
     // dispatching, and is called _after_ the node is removed from the tree.
     //
-    virtual void removedFrom(Node* insertionPoint);
+    virtual void removedFrom(ContainerNode* insertionPoint);
 
 #ifndef NDEBUG
     virtual void formatForDebugger(char* buffer, unsigned length) const;
index 45faa4d..ef9d776 100644 (file)
@@ -287,7 +287,7 @@ void ProcessingInstruction::addSubresourceAttributeURLs(ListHashSet<KURL>& urls)
     addSubresourceURL(urls, sheet()->baseURL());
 }
 
-Node::InsertionNotificationRequest ProcessingInstruction::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest ProcessingInstruction::insertedInto(ContainerNode* insertionPoint)
 {
     Node::insertedInto(insertionPoint);
     if (!insertionPoint->inDocument())
@@ -297,7 +297,7 @@ Node::InsertionNotificationRequest ProcessingInstruction::insertedInto(Node* ins
     return InsertionDone;
 }
 
-void ProcessingInstruction::removedFrom(Node* insertionPoint)
+void ProcessingInstruction::removedFrom(ContainerNode* insertionPoint)
 {
     Node::removedFrom(insertionPoint);
     if (!insertionPoint->inDocument())
index 04accd5..e331e21 100644 (file)
@@ -64,8 +64,8 @@ private:
     virtual bool offsetInCharacters() const;
     virtual int maxCharacterOffset() const;
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     void checkStyleSheet();
     virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet*);
index bdc1fcd..aefdddb 100644 (file)
@@ -77,7 +77,7 @@ ScriptElement::~ScriptElement()
     stopLoadRequest();
 }
 
-void ScriptElement::insertedInto(Node* insertionPoint)
+void ScriptElement::insertedInto(ContainerNode* insertionPoint)
 {
     if (insertionPoint->inDocument() && !m_parserInserted)
         prepareScript(); // FIXME: Provide a real starting line number here.
index 6c08258..6bec56d 100644 (file)
@@ -28,8 +28,8 @@
 namespace WebCore {
 
 class CachedScript;
+class ContainerNode;
 class Element;
-class Node;
 class ScriptElement;
 class ScriptSourceCode;
 
@@ -67,7 +67,7 @@ protected:
     bool forceAsync() const { return m_forceAsync; }
 
     // Helper functions used by our parent classes.
-    void insertedInto(Node*);
+    void insertedInto(ContainerNode*);
     void childrenChanged();
     void handleSourceAttribute(const String& sourceUrl);
     void handleAsyncAttribute();
index 3fa8d5f..70d47e5 100644 (file)
@@ -964,7 +964,7 @@ void ReplaceSelectionCommand::doApply()
     Node* blockStart = enclosingBlock(insertionPos.deprecatedNode());
     if ((isListElement(refNode.get()) || (isLegacyAppleStyleSpan(refNode.get()) && isListElement(refNode->firstChild())))
         && blockStart && blockStart->renderer()->isListItem())
-        refNode = insertAsListItems(refNode, blockStart, insertionPos, insertedNodes);
+        refNode = insertAsListItems(toHTMLElement(refNode.get()), blockStart, insertionPos, insertedNodes);
     else {
         insertNodeAt(refNode, insertionPos);
         insertedNodes.respondToNodeInsertion(refNode.get());
@@ -1229,12 +1229,12 @@ EditAction ReplaceSelectionCommand::editingAction() const
 
 // If the user is inserting a list into an existing list, instead of nesting the list,
 // we put the list items into the existing list.
-Node* ReplaceSelectionCommand::insertAsListItems(PassRefPtr<Node> prpListElement, Node* insertionBlock, const Position& insertPos, InsertedNodes& insertedNodes)
+Node* ReplaceSelectionCommand::insertAsListItems(PassRefPtr<HTMLElement> prpListElement, Node* insertionBlock, const Position& insertPos, InsertedNodes& insertedNodes)
 {
-    RefPtr<Node> listElement = prpListElement;
+    RefPtr<HTMLElement> listElement = prpListElement;
 
     while (listElement->hasChildNodes() && isListElement(listElement->firstChild()) && listElement->childNodeCount() == 1)
-        listElement = listElement->firstChild();
+        listElement = toHTMLElement(listElement->firstChild());
 
     bool isStart = isStartOfParagraph(insertPos);
     bool isEnd = isEndOfParagraph(insertPos);
@@ -1252,7 +1252,7 @@ Node* ReplaceSelectionCommand::insertAsListItems(PassRefPtr<Node> prpListElement
 
     while (RefPtr<Node> listItem = listElement->firstChild()) {
         ExceptionCode ec = 0;
-        toContainerNode(listElement.get())->removeChild(listItem.get(), ec);
+        listElement->removeChild(listItem.get(), ec);
         ASSERT(!ec);
         if (isStart || isMiddle) {
             insertNodeBefore(listItem, lastNode);
index 3a0b5a5..d56c511 100644 (file)
 namespace WebCore {
 
 class DocumentFragment;
-class EditingStyle;
-class Node;
 class ReplacementFragment;
-class StylePropertySet;
 
 class ReplaceSelectionCommand : public CompositeEditCommand {
 public:
@@ -75,7 +72,7 @@ private:
         RefPtr<Node> m_lastNodeInserted;
     };
 
-    Node* insertAsListItems(PassRefPtr<Node>, Node* insertionNode, const Position&, InsertedNodes&);
+    Node* insertAsListItems(PassRefPtr<HTMLElement> listElement, Node* insertionNode, const Position&, InsertedNodes&);
 
     void updateNodesInserted(Node*);
     bool shouldRemoveEndBR(Node*, const VisiblePosition&);
index 3f2000d..b3b84a7 100644 (file)
@@ -1734,7 +1734,7 @@ static inline void unlockSearcher()
 
 // ICU's search ignores the distinction between small kana letters and ones
 // that are not small, and also characters that differ only in the voicing
-// marks when considering only primary collation strength diffrences.
+// marks when considering only primary collation strength differences.
 // This is not helpful for end users, since these differences make words
 // distinct, so for our purposes we need these to be considered.
 // The Unicode folks do not think the collation algorithm should be
index 76dd0d1..390c149 100644 (file)
@@ -60,7 +60,7 @@ void FormAssociatedElement::didMoveToNewDocument(Document* oldDocument)
         oldDocument->unregisterFormElementWithFormAttribute(this);
 }
 
-void FormAssociatedElement::insertedInto(Node* insertionPoint)
+void FormAssociatedElement::insertedInto(ContainerNode* insertionPoint)
 {
     resetFormOwner();
     if (!insertionPoint->inDocument())
@@ -71,7 +71,7 @@ void FormAssociatedElement::insertedInto(Node* insertionPoint)
         element->document()->registerFormElementWithFormAttribute(this);
 }
 
-void FormAssociatedElement::removedFrom(Node* insertionPoint)
+void FormAssociatedElement::removedFrom(ContainerNode* insertionPoint)
 {
     HTMLElement* element = toHTMLElement(this);
     if (insertionPoint->inDocument() && element->fastHasAttribute(formAttr))
index 92eb8d7..4c9cda0 100644 (file)
@@ -79,8 +79,8 @@ public:
 protected:
     FormAssociatedElement();
 
-    void insertedInto(Node*);
-    void removedFrom(Node*);
+    void insertedInto(ContainerNode*);
+    void removedFrom(ContainerNode*);
     void didMoveToNewDocument(Document* oldDocument);
 
     void setForm(HTMLFormElement*);
index e970f40..2754717 100644 (file)
@@ -50,7 +50,7 @@ void HTMLBaseElement::parseAttribute(const Attribute& attribute)
         HTMLElement::parseAttribute(attribute);
 }
 
-Node::InsertionNotificationRequest HTMLBaseElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLBaseElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     if (insertionPoint->inDocument())
@@ -58,7 +58,7 @@ Node::InsertionNotificationRequest HTMLBaseElement::insertedInto(Node* insertion
     return InsertionDone;
 }
 
-void HTMLBaseElement::removedFrom(Node* insertionPoint)
+void HTMLBaseElement::removedFrom(ContainerNode* insertionPoint)
 {
     HTMLElement::removedFrom(insertionPoint);
     if (insertionPoint->inDocument())
index 3b8a81c..bb74fb7 100644 (file)
@@ -37,8 +37,8 @@ private:
     virtual String target() const;
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
     virtual void parseAttribute(const Attribute&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 };
 
 } // namespace
index 735006b..846e331 100644 (file)
@@ -152,15 +152,15 @@ void HTMLBodyElement::parseAttribute(const Attribute& attribute)
         HTMLElement::parseAttribute(attribute);
 }
 
-Node::InsertionNotificationRequest HTMLBodyElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLBodyElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     if (insertionPoint->inDocument())
-        return InsertionShouldCallDidNotifyDescendantInseretions;
+        return InsertionShouldCallDidNotifyDescendantInsertions;
     return InsertionDone;
 }
 
-void HTMLBodyElement::didNotifyDescendantInseretions(Node* insertionPoint)
+void HTMLBodyElement::didNotifyDescendantInsertions(ContainerNode* insertionPoint)
 {
     ASSERT_UNUSED(insertionPoint, insertionPoint->inDocument());
     ASSERT(document());
index 1089f70..22ac19c 100644 (file)
@@ -74,8 +74,8 @@ private:
     virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
     virtual void collectStyleForAttribute(const Attribute&, StylePropertySet*) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void didNotifyDescendantInseretions(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void didNotifyDescendantInsertions(ContainerNode*) OVERRIDE;
     
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
     
index f195ec0..03dc73f 100644 (file)
@@ -222,7 +222,7 @@ void HTMLFormControlElement::didMoveToNewDocument(Document* oldDocument)
     HTMLElement::didMoveToNewDocument(oldDocument);
 }
 
-Node::InsertionNotificationRequest HTMLFormControlElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLFormControlElement::insertedInto(ContainerNode* insertionPoint)
 {
     m_dataListAncestorState = Unknown;
     setNeedsWillValidateCheck();
@@ -231,7 +231,7 @@ Node::InsertionNotificationRequest HTMLFormControlElement::insertedInto(Node* in
     return InsertionDone;
 }
 
-void HTMLFormControlElement::removedFrom(Node* insertionPoint)
+void HTMLFormControlElement::removedFrom(ContainerNode* insertionPoint)
 {
     m_fieldSetAncestorValid = false;
     m_dataListAncestorState = Unknown;
index d4bdd67..859c0f0 100644 (file)
@@ -119,8 +119,8 @@ protected:
     virtual void requiredAttributeChanged();
     virtual void disabledAttributeChanged();
     virtual void attach();
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE;
 
     virtual bool supportsFocus() const;
index 472d804..f5d9b94 100644 (file)
@@ -130,18 +130,18 @@ bool HTMLFormElement::rendererIsNeeded(const NodeRenderingContext& context)
     return formIsTablePart;
 }
 
-Node::InsertionNotificationRequest HTMLFormElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLFormElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     if (insertionPoint->inDocument())
-        return InsertionShouldCallDidNotifyDescendantInseretions;
+        return InsertionShouldCallDidNotifyDescendantInsertions;
     return InsertionDone;
 }
 
-void HTMLFormElement::didNotifyDescendantInseretions(Node* insertionPoint)
+void HTMLFormElement::didNotifyDescendantInsertions(ContainerNode* insertionPoint)
 {
     ASSERT(insertionPoint->inDocument());
-    HTMLElement::didNotifyDescendantInseretions(insertionPoint);
+    HTMLElement::didNotifyDescendantInsertions(insertionPoint);
     if (hasID())
         document()->resetFormElementsOwner();
 }
@@ -154,7 +154,7 @@ static inline Node* findRoot(Node* n)
     return root;
 }
 
-void HTMLFormElement::removedFrom(Node* insertionPoint)
+void HTMLFormElement::removedFrom(ContainerNode* insertionPoint)
 {
     Node* root = findRoot(this);
     Vector<FormAssociatedElement*> associatedElements(m_associatedElements);
index 4bdbe3d..c12c9aa 100644 (file)
@@ -118,9 +118,9 @@ private:
     HTMLFormElement(const QualifiedName&, Document*);
 
     virtual bool rendererIsNeeded(const NodeRenderingContext&);
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void didNotifyDescendantInseretions(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void didNotifyDescendantInsertions(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     virtual void handleLocalEvents(Event*);
 
index 8e1cb6f..16cf360 100644 (file)
@@ -153,15 +153,15 @@ void HTMLFrameElementBase::setNameAndOpenURL()
     openURL();
 }
 
-Node::InsertionNotificationRequest HTMLFrameElementBase::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLFrameElementBase::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLFrameOwnerElement::insertedInto(insertionPoint);
     if (insertionPoint->inDocument())
-        return InsertionShouldCallDidNotifyDescendantInseretions;
+        return InsertionShouldCallDidNotifyDescendantInsertions;
     return InsertionDone;
 }
 
-void HTMLFrameElementBase::didNotifyDescendantInseretions(Node* insertionPoint)
+void HTMLFrameElementBase::didNotifyDescendantInsertions(ContainerNode* insertionPoint)
 {
     ASSERT_UNUSED(insertionPoint, insertionPoint->inDocument());
 
index 91c7196..11dc94d 100644 (file)
@@ -54,8 +54,8 @@ protected:
     bool isURLAllowed() const;
 
     virtual void parseAttribute(const Attribute&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void didNotifyDescendantInseretions(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void didNotifyDescendantInsertions(ContainerNode*) OVERRIDE;
     virtual void attach();
 
 private:
index c51ecc3..b0e7f04 100644 (file)
@@ -210,7 +210,7 @@ bool HTMLFrameSetElement::willRecalcStyle(StyleChange)
     return true;
 }
 
-Node::InsertionNotificationRequest HTMLFrameSetElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLFrameSetElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     if (insertionPoint->inDocument()) {
@@ -221,7 +221,7 @@ Node::InsertionNotificationRequest HTMLFrameSetElement::insertedInto(Node* inser
     return InsertionDone;
 }
 
-void HTMLFrameSetElement::removedFrom(Node* insertionPoint)
+void HTMLFrameSetElement::removedFrom(ContainerNode* insertionPoint)
 {
     HTMLElement::removedFrom(insertionPoint);
     if (insertionPoint->inDocument()) {
index 2d3c9ad..a4c391b 100644 (file)
@@ -79,8 +79,8 @@ private:
 
     virtual bool willRecalcStyle(StyleChange);
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     OwnArrayPtr<Length> m_rowLengths;
     OwnArrayPtr<Length> m_colLengths;
index 0be7053..dc4d435 100644 (file)
@@ -105,7 +105,7 @@ RenderObject* HTMLIFrameElement::createRenderer(RenderArena* arena, RenderStyle*
     return new (arena) RenderIFrame(this);
 }
 
-Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(ContainerNode* insertionPoint)
 {
     InsertionNotificationRequest result = HTMLFrameElementBase::insertedInto(insertionPoint);
     if (insertionPoint->inDocument() && document()->isHTMLDocument())
@@ -113,7 +113,7 @@ Node::InsertionNotificationRequest HTMLIFrameElement::insertedInto(Node* inserti
     return result;
 }
 
-void HTMLIFrameElement::removedFrom(Node* insertionPoint)
+void HTMLIFrameElement::removedFrom(ContainerNode* insertionPoint)
 {
     HTMLFrameElementBase::removedFrom(insertionPoint);
     if (insertionPoint->inDocument() && document()->isHTMLDocument())
index 67ed06c..7bc2b0e 100644 (file)
@@ -41,8 +41,8 @@ private:
     virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
     virtual void collectStyleForAttribute(const Attribute&, StylePropertySet*) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
index 1510bb6..012d9ec 100644 (file)
@@ -167,7 +167,7 @@ void HTMLImageElement::attach()
     }
 }
 
-Node::InsertionNotificationRequest HTMLImageElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLImageElement::insertedInto(ContainerNode* insertionPoint)
 {
     if (!m_form) {
         // m_form can be non-null if it was set in constructor.
@@ -188,7 +188,7 @@ Node::InsertionNotificationRequest HTMLImageElement::insertedInto(Node* insertio
     return HTMLElement::insertedInto(insertionPoint);
 }
 
-void HTMLImageElement::removedFrom(Node* insertionPoint)
+void HTMLImageElement::removedFrom(ContainerNode* insertionPoint)
 {
     if (m_form)
         m_form->removeImgElement(this);
index e3a9246..9c6ff5a 100644 (file)
@@ -99,8 +99,8 @@ private:
 
     virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; }
     virtual bool shouldRegisterAsExtraNamedItem() const OVERRIDE { return true; }
 
index 478de43..732cab4 100644 (file)
@@ -1336,7 +1336,7 @@ void HTMLInputElement::didChangeForm()
     addToRadioButtonGroup();
 }
 
-Node::InsertionNotificationRequest HTMLInputElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLTextFormControlElement::insertedInto(insertionPoint);
     if (!insertionPoint->inDocument())
@@ -1346,7 +1346,7 @@ Node::InsertionNotificationRequest HTMLInputElement::insertedInto(Node* insertio
     return InsertionDone;
 }
 
-void HTMLInputElement::removedFrom(Node* insertionPoint)
+void HTMLInputElement::removedFrom(ContainerNode* insertionPoint)
 {
     if (insertionPoint->inDocument())
         removeFromRadioButtonGroup();
index 69d0f17..561334e 100644 (file)
@@ -260,8 +260,8 @@ private:
 
     virtual void willChangeForm() OVERRIDE;
     virtual void didChangeForm() OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE;
 
     virtual bool isKeyboardFocusable(KeyboardEvent*) const;
index 927410b..a9644c1 100644 (file)
@@ -243,7 +243,7 @@ void HTMLLinkElement::clearSheet()
     m_sheet = 0;
 }
 
-Node::InsertionNotificationRequest HTMLLinkElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLLinkElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     if (!insertionPoint->inDocument())
@@ -259,7 +259,7 @@ Node::InsertionNotificationRequest HTMLLinkElement::insertedInto(Node* insertion
     return InsertionDone;
 }
 
-void HTMLLinkElement::removedFrom(Node* insertionPoint)
+void HTMLLinkElement::removedFrom(ContainerNode* insertionPoint)
 {
     HTMLElement::removedFrom(insertionPoint);
     if (!insertionPoint->inDocument())
index 5574217..bb69e12 100644 (file)
@@ -75,8 +75,8 @@ private:
     static void processCallback(Node*);
     void clearSheet();
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     // from CachedResourceClient
     virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet);
index 5073e89..8f6d6f6 100644 (file)
@@ -130,14 +130,14 @@ HTMLCollection* HTMLMapElement::areas()
     return ensureCachedHTMLCollection(MapAreas);
 }
 
-Node::InsertionNotificationRequest HTMLMapElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLMapElement::insertedInto(ContainerNode* insertionPoint)
 {
     if (insertionPoint->inDocument())
         treeScope()->addImageMap(this);
     return HTMLElement::insertedInto(insertionPoint);
 }
 
-void HTMLMapElement::removedFrom(Node* insertionPoint)
+void HTMLMapElement::removedFrom(ContainerNode* insertionPoint)
 {
     if (insertionPoint->inDocument())
         treeScope()->removeImageMap(this);
index 038ae64..be4c2a5 100644 (file)
@@ -48,8 +48,8 @@ private:
 
     virtual void parseAttribute(const Attribute&) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     AtomicString m_name;
 };
index 130d11f..465298c 100644 (file)
@@ -495,7 +495,7 @@ bool HTMLMediaElement::childShouldCreateRenderer(const NodeRenderingContext& chi
     return childContext.isOnUpperEncapsulationBoundary() && HTMLElement::childShouldCreateRenderer(childContext);
 }
 
-Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode* insertionPoint)
 {
     LOG(Media, "HTMLMediaElement::insertedInto");
     HTMLElement::insertedInto(insertionPoint);
@@ -505,7 +505,7 @@ Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(Node* insertio
     return InsertionDone;
 }
 
-void HTMLMediaElement::removedFrom(Node* insertionPoint)
+void HTMLMediaElement::removedFrom(ContainerNode* insertionPoint)
 {
     if (insertionPoint->inDocument()) {
         LOG(Media, "HTMLMediaElement::removedFromDocument");
index d8cb8c5..5363ae2 100644 (file)
@@ -368,8 +368,8 @@ private:
     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
     virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual void didRecalcStyle(StyleChange);
     
     virtual void defaultEventHandler(Event*);
index b1f3501..8d7a1a3 100644 (file)
@@ -54,7 +54,7 @@ void HTMLMetaElement::parseAttribute(const Attribute& attribute)
         HTMLElement::parseAttribute(attribute);
 }
 
-Node::InsertionNotificationRequest HTMLMetaElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLMetaElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     if (insertionPoint->inDocument())
index 7e0762a..92118f8 100644 (file)
@@ -39,7 +39,7 @@ private:
     HTMLMetaElement(const QualifiedName&, Document*);
 
     virtual void parseAttribute(const Attribute&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
 
     void process();
 
index e3be066..024e825 100644 (file)
@@ -328,14 +328,14 @@ bool HTMLObjectElement::rendererIsNeeded(const NodeRenderingContext& context)
     return HTMLPlugInImageElement::rendererIsNeeded(context);
 }
 
-Node::InsertionNotificationRequest HTMLObjectElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLObjectElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLPlugInImageElement::insertedInto(insertionPoint);
     FormAssociatedElement::insertedInto(insertionPoint);
     return InsertionDone;
 }
 
-void HTMLObjectElement::removedFrom(Node* insertionPoint)
+void HTMLObjectElement::removedFrom(ContainerNode* insertionPoint)
 {
     HTMLPlugInImageElement::removedFrom(insertionPoint);
     FormAssociatedElement::removedFrom(insertionPoint);
index 36a4160..c44da02 100644 (file)
@@ -70,8 +70,8 @@ private:
     virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
     virtual void collectStyleForAttribute(const Attribute&, StylePropertySet*) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE;
index 7bce8e6..33e39a6 100644 (file)
@@ -306,7 +306,7 @@ bool HTMLOptionElement::disabled() const
     return ownElementDisabled() || (parentNode() && parentNode()->isHTMLElement() && static_cast<HTMLElement*>(parentNode())->disabled());
 }
 
-Node::InsertionNotificationRequest HTMLOptionElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLOptionElement::insertedInto(ContainerNode* insertionPoint)
 {
     if (HTMLSelectElement* select = ownerSelectElement()) {
         select->setRecalcListItems();
index f9c50aa..247b6c1 100644 (file)
@@ -75,7 +75,7 @@ private:
 
     virtual void parseAttribute(const Attribute&) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
     virtual void accessKeyAction(bool);
 
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
index cd72115..05a33ab 100644 (file)
@@ -41,7 +41,7 @@ PassRefPtr<HTMLQuoteElement> HTMLQuoteElement::create(const QualifiedName& tagNa
     return adoptRef(new HTMLQuoteElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest HTMLQuoteElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLQuoteElement::insertedInto(ContainerNode* insertionPoint)
 {
     if (hasTagName(qTag))
         document()->setUsesBeforeAfterRules(true);
index 72b82ca..fec2d9a 100644 (file)
@@ -36,7 +36,7 @@ public:
 private:
     HTMLQuoteElement(const QualifiedName&, Document*);
     
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
 };
 
index d53584e..4f2c956 100644 (file)
@@ -72,7 +72,7 @@ void HTMLScriptElement::parseAttribute(const Attribute& attribute)
         HTMLElement::parseAttribute(attribute);
 }
 
-Node::InsertionNotificationRequest HTMLScriptElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLScriptElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     ScriptElement::insertedInto(insertionPoint);
index 8059f13..c2ca0db 100644 (file)
@@ -45,7 +45,7 @@ private:
     HTMLScriptElement(const QualifiedName&, Document*, bool wasInsertedByParser, bool alreadyStarted);
 
     virtual void parseAttribute(const Attribute&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
index b4efee1..d066c9f 100644 (file)
@@ -1490,7 +1490,7 @@ void HTMLSelectElement::typeAheadFind(KeyboardEvent* event)
     }
 }
 
-Node::InsertionNotificationRequest HTMLSelectElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLSelectElement::insertedInto(ContainerNode* insertionPoint)
 {
     // When the element is created during document parsing, it won't have any
     // items yet - but for innerHTML and related methods, this method is called
index dc8954f..3055977 100644 (file)
@@ -143,7 +143,7 @@ private:
     void typeAheadFind(KeyboardEvent*);
     void saveLastSelection();
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
 
     virtual bool isOptionalFormControl() const { return !isRequiredFormControl(); }
     virtual bool isRequiredFormControl() const;
index 2b331c8..4ac537b 100644 (file)
@@ -54,7 +54,7 @@ PassRefPtr<HTMLSourceElement> HTMLSourceElement::create(const QualifiedName& tag
     return adoptRef(new HTMLSourceElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest HTMLSourceElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLSourceElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     Element* parent = parentElement();
@@ -63,7 +63,7 @@ Node::InsertionNotificationRequest HTMLSourceElement::insertedInto(Node* inserti
     return InsertionDone;
 }
 
-void HTMLSourceElement::removedFrom(Node* removalRoot)
+void HTMLSourceElement::removedFrom(ContainerNode* removalRoot)
 {
     Element* parent = parentElement();
     if (!parent && removalRoot->isElementNode())
index cb9f413..15920e3 100644 (file)
@@ -49,8 +49,8 @@ public:
 private:
     HTMLSourceElement(const QualifiedName&, Document*);
     
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
 
     void errorEventTimerFired(Timer<HTMLSourceElement>*);
index 2f2198e..afc8eba 100644 (file)
@@ -149,7 +149,7 @@ void HTMLStyleElement::unregisterWithScopingNode(ContainerNode* scope)
 }
 #endif
 
-Node::InsertionNotificationRequest HTMLStyleElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLStyleElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     if (insertionPoint->inDocument()) {
@@ -163,7 +163,7 @@ Node::InsertionNotificationRequest HTMLStyleElement::insertedInto(Node* insertio
     return InsertionDone;
 }
 
-void HTMLStyleElement::removedFrom(Node* insertionPoint)
+void HTMLStyleElement::removedFrom(ContainerNode* insertionPoint)
 {
     HTMLElement::removedFrom(insertionPoint);
 
@@ -172,10 +172,8 @@ void HTMLStyleElement::removedFrom(Node* insertionPoint)
     // That is, because willRemove() is also called if an ancestor is removed from the document.
     // Now, if we want to register <style scoped> even if it's not inDocument,
     // we'd need to find a way to discern whether that is the case, or whether <style scoped> itself is about to be removed.
-    if (m_isRegisteredWithScopingNode) {
-        Node* scope = parentNode() ? parentNode() : insertionPoint;
-        unregisterWithScopingNode(toContainerNode(scope));
-    }
+    if (m_isRegisteredWithScopingNode)
+        unregisterWithScopingNode(parentNode() ? parentNode() : insertionPoint);
 #endif
 
     if (insertionPoint->inDocument())
index c1a5f7e..7e31254 100644 (file)
@@ -60,8 +60,8 @@ private:
 
     // overload from HTMLElement
     virtual void parseAttribute(const Attribute&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
     virtual void finishParsingChildren();
index 6410971..e00f1d4 100644 (file)
@@ -70,7 +70,7 @@ bool HTMLTextFormControlElement::childShouldCreateRenderer(const NodeRenderingCo
     return childContext.isOnEncapsulationBoundary() && HTMLFormControlElementWithState::childShouldCreateRenderer(childContext);
 }
 
-Node::InsertionNotificationRequest HTMLTextFormControlElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLTextFormControlElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLFormControlElement::insertedInto(insertionPoint);
     if (!insertionPoint->inDocument())
index ba5f9bd..3fee3c4 100644 (file)
@@ -46,7 +46,7 @@ public:
     void forwardEvent(Event*);
 
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
 
     // The derived class should return true if placeholder processing is needed.
     virtual bool supportsPlaceholder() const = 0;
index 0a73ad1..f8a9700 100644 (file)
@@ -44,7 +44,7 @@ PassRefPtr<HTMLTitleElement> HTMLTitleElement::create(const QualifiedName& tagNa
     return adoptRef(new HTMLTitleElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     if (insertionPoint->inDocument())
@@ -52,7 +52,7 @@ Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(Node* insertio
     return InsertionDone;
 }
 
-void HTMLTitleElement::removedFrom(Node* insertionPoint)
+void HTMLTitleElement::removedFrom(ContainerNode* insertionPoint)
 {
     HTMLElement::removedFrom(insertionPoint);
     if (insertionPoint->inDocument())
index 662f5d7..ccf00d6 100644 (file)
@@ -39,8 +39,8 @@ public:
 private:
     HTMLTitleElement(const QualifiedName&, Document*);
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
     StringWithDirection m_title;
index 64b19a8..a0c20bf 100644 (file)
@@ -72,7 +72,7 @@ PassRefPtr<HTMLTrackElement> HTMLTrackElement::create(const QualifiedName& tagNa
     return adoptRef(new HTMLTrackElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest HTMLTrackElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLTrackElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     if (insertionPoint->inDocument()) {
@@ -83,7 +83,7 @@ Node::InsertionNotificationRequest HTMLTrackElement::insertedInto(Node* insertio
     return InsertionDone;
 }
 
-void HTMLTrackElement::removedFrom(Node* insertionPoint)
+void HTMLTrackElement::removedFrom(ContainerNode* insertionPoint)
 {
     HTMLMediaElement* parent = mediaElement();
     if (!parent && WebCore::isMediaElement(insertionPoint))
index a05666d..34f779b 100644 (file)
@@ -77,9 +77,9 @@ private:
 
     virtual void parseAttribute(const Attribute&) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
 
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
 
 #if ENABLE(MICRODATA)
index 98e33cd..80d9157 100644 (file)
@@ -43,7 +43,7 @@ PassRefPtr<MathMLMathElement> MathMLMathElement::create(const QualifiedName& tag
     return adoptRef(new MathMLMathElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest MathMLMathElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest MathMLMathElement::insertedInto(ContainerNode* insertionPoint)
 {
     // There are sibling rules in the MathML default style.
     if (insertionPoint->inDocument())
index 42ba75f..b37db3d 100644 (file)
@@ -39,7 +39,7 @@ public:
 private:
     MathMLMathElement(const QualifiedName& tagName, Document*);
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 };
     
index 03031f7..05ab250 100644 (file)
@@ -171,7 +171,7 @@ void SVGElement::setXmlbase(const String& value, ExceptionCode&)
     setAttribute(XMLNames::baseAttr, value);
 }
 
-void SVGElement::removedFrom(Node* rootParent)
+void SVGElement::removedFrom(ContainerNode* rootParent)
 {
     if (rootParent->inDocument()) {
         document()->accessSVGExtensions()->removeAllAnimationElementsFromTarget(this);
index bb65004..d344f9d 100644 (file)
@@ -125,7 +125,7 @@ protected:
     virtual void attributeChanged(const Attribute&) OVERRIDE;
     virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE;
     
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     SVGElementRareData* rareSVGData() const;
     SVGElementRareData* ensureRareSVGData();
index 12b4d48..75d0b43 100644 (file)
@@ -175,14 +175,14 @@ void SVGFEImageElement::svgAttributeChanged(const QualifiedName& attrName)
     ASSERT_NOT_REACHED();
 }
 
-Node::InsertionNotificationRequest SVGFEImageElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGFEImageElement::insertedInto(ContainerNode* rootParent)
 {
     SVGFilterPrimitiveStandardAttributes::insertedInto(rootParent);
     buildPendingResource();
     return InsertionDone;
 }
 
-void SVGFEImageElement::removedFrom(Node* rootParent)
+void SVGFEImageElement::removedFrom(ContainerNode* rootParent)
 {
     SVGFilterPrimitiveStandardAttributes::removedFrom(rootParent);
     if (rootParent->inDocument())
index a7f9923..de60642 100644 (file)
@@ -60,8 +60,8 @@ private:
     void requestImageResource();
 
     virtual void buildPendingResource();
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEImageElement)
         DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio)
index 17175de..02f7d9a 100644 (file)
@@ -314,7 +314,7 @@ void SVGFontFaceElement::rebuildFontFace()
     document()->styleResolverChanged(DeferRecalcStyle);
 }
 
-Node::InsertionNotificationRequest SVGFontFaceElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGFontFaceElement::insertedInto(ContainerNode* rootParent)
 {
     SVGElement::insertedInto(rootParent);
     if (!rootParent->inDocument())
@@ -325,7 +325,7 @@ Node::InsertionNotificationRequest SVGFontFaceElement::insertedInto(Node* rootPa
     return InsertionDone;
 }
 
-void SVGFontFaceElement::removedFrom(Node* rootParent)
+void SVGFontFaceElement::removedFrom(ContainerNode* rootParent)
 {
     SVGElement::removedFrom(rootParent);
 
index 9d13202..1dddf76 100644 (file)
@@ -57,8 +57,8 @@ private:
     virtual void parseAttribute(const Attribute&) OVERRIDE;
 
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     RefPtr<StyleRuleFontFace> m_fontFaceRule;
     RefPtr<SVGFontElement> m_fontElement;
index e211910..f610537 100644 (file)
@@ -82,7 +82,7 @@ void SVGFontFaceUriElement::childrenChanged(bool changedByParser, Node* beforeCh
         static_cast<SVGFontFaceElement*>(grandparent)->rebuildFontFace();
 }
 
-Node::InsertionNotificationRequest SVGFontFaceUriElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGFontFaceUriElement::insertedInto(ContainerNode* rootParent)
 {
     loadFont();
     return SVGElement::insertedInto(rootParent);
index 547f300..1cc3dd9 100644 (file)
@@ -42,7 +42,7 @@ private:
     
     virtual void parseAttribute(const Attribute&) OVERRIDE;
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
 
     void loadFont();
 
index 0ef7e49..9f127c9 100644 (file)
@@ -61,13 +61,13 @@ void SVGGlyphElement::parseAttribute(const Attribute& attribute)
         SVGStyledElement::parseAttribute(attribute);
 }
 
-Node::InsertionNotificationRequest SVGGlyphElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGGlyphElement::insertedInto(ContainerNode* rootParent)
 {
     invalidateGlyphCache();
     return SVGStyledElement::insertedInto(rootParent);
 }
 
-void SVGGlyphElement::removedFrom(Node* rootParent)
+void SVGGlyphElement::removedFrom(ContainerNode* rootParent)
 {
     if (rootParent->inDocument())
         invalidateGlyphCache();
index c32b6d6..18b212c 100644 (file)
@@ -49,8 +49,8 @@ private:
     // FIXME: svgAttributeChanged missing.
     virtual void parseAttribute(const Attribute&) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
 
index 43de067..06b6685 100644 (file)
@@ -41,7 +41,7 @@ PassRefPtr<SVGHKernElement> SVGHKernElement::create(const QualifiedName& tagName
     return adoptRef(new SVGHKernElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest SVGHKernElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGHKernElement::insertedInto(ContainerNode* rootParent)
 {
     ContainerNode* fontNode = parentNode();
     if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) {
@@ -52,7 +52,7 @@ Node::InsertionNotificationRequest SVGHKernElement::insertedInto(Node* rootParen
     return SVGElement::insertedInto(rootParent);
 }
 
-void SVGHKernElement::removedFrom(Node* rootParent)
+void SVGHKernElement::removedFrom(ContainerNode* rootParent)
 {
     ContainerNode* fontNode = parentNode();
     if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) {
index 6b60d26..376e025 100644 (file)
@@ -36,8 +36,8 @@ public:
 private:
     SVGHKernElement(const QualifiedName&, Document*);
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
 };
index 6e0af02..5558d10 100644 (file)
@@ -211,7 +211,7 @@ void SVGImageElement::attach()
     }
 }
 
-Node::InsertionNotificationRequest SVGImageElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGImageElement::insertedInto(ContainerNode* rootParent)
 {
     SVGStyledTransformableElement::insertedInto(rootParent);
     if (!rootParent->inDocument())
index bdae5d7..f2f8d9b 100644 (file)
@@ -55,7 +55,7 @@ private:
     virtual void svgAttributeChanged(const QualifiedName&);
 
     virtual void attach();
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
 
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
  
index 8e0f210..8213fa1 100644 (file)
@@ -478,14 +478,14 @@ RenderObject* SVGSVGElement::createRenderer(RenderArena* arena, RenderStyle*)
     return new (arena) RenderSVGViewportContainer(this);
 }
 
-Node::InsertionNotificationRequest SVGSVGElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGSVGElement::insertedInto(ContainerNode* rootParent)
 {
     if (rootParent->inDocument())
         document()->accessSVGExtensions()->addTimeContainer(this);
     return SVGStyledLocatableElement::insertedInto(rootParent);
 }
 
-void SVGSVGElement::removedFrom(Node* rootParent)
+void SVGSVGElement::removedFrom(ContainerNode* rootParent)
 {
     if (rootParent->inDocument())
         document()->accessSVGExtensions()->removeTimeContainer(this);
index 6ead78b..be3c6ba 100644 (file)
@@ -145,8 +145,8 @@ private:
     virtual bool rendererIsNeeded(const NodeRenderingContext& context) { return StyledElement::rendererIsNeeded(context); }
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     virtual void svgAttributeChanged(const QualifiedName&);
 
index 8558b73..ff9834c 100644 (file)
@@ -117,7 +117,7 @@ void SVGScriptElement::svgAttributeChanged(const QualifiedName& attrName)
     ASSERT_NOT_REACHED();
 }
 
-Node::InsertionNotificationRequest SVGScriptElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGScriptElement::insertedInto(ContainerNode* rootParent)
 {
     SVGElement::insertedInto(rootParent);
     ScriptElement::insertedInto(rootParent);
index c88aaeb..503598f 100644 (file)
@@ -46,7 +46,7 @@ private:
 
     bool isSupportedAttribute(const QualifiedName&);
     virtual void parseAttribute(const Attribute&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
     virtual void svgAttributeChanged(const QualifiedName&);
index 905b686..ce00232 100644 (file)
@@ -134,7 +134,7 @@ void SVGStyleElement::finishParsingChildren()
     SVGElement::finishParsingChildren();
 }
 
-Node::InsertionNotificationRequest SVGStyleElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode* rootParent)
 {
     SVGElement::insertedInto(rootParent);
     if (rootParent->inDocument())
@@ -142,7 +142,7 @@ Node::InsertionNotificationRequest SVGStyleElement::insertedInto(Node* rootParen
     return InsertionDone;
 }
 
-void SVGStyleElement::removedFrom(Node* rootParent)
+void SVGStyleElement::removedFrom(ContainerNode* rootParent)
 {
     SVGElement::removedFrom(rootParent);
     if (rootParent->inDocument())
index bbf288d..3cf5b9f 100644 (file)
@@ -54,8 +54,8 @@ private:
 
     bool isSupportedAttribute(const QualifiedName&);
     virtual void parseAttribute(const Attribute&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
     virtual void finishParsingChildren();
index c0cd1e8..f32e66a 100644 (file)
@@ -358,7 +358,7 @@ void SVGStyledElement::attach()
         object->updateFromElement();
 }
 
-Node::InsertionNotificationRequest SVGStyledElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGStyledElement::insertedInto(ContainerNode* rootParent)
 {
     SVGElement::insertedInto(rootParent);
     updateRelativeLengthsInformation();
@@ -390,7 +390,7 @@ void SVGStyledElement::buildPendingResourcesIfNeeded()
     }
 }
 
-void SVGStyledElement::removedFrom(Node* rootParent)
+void SVGStyledElement::removedFrom(ContainerNode* rootParent)
 {
     if (rootParent->inDocument())
         updateRelativeLengthsInformation(false, this);
index 87a5b48..be9bf24 100644 (file)
@@ -72,8 +72,8 @@ protected:
     virtual void svgAttributeChanged(const QualifiedName&);
 
     virtual void attach();
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
     static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName&);
index dec3642..0ab47ea 100644 (file)
@@ -292,7 +292,7 @@ void SVGTRefElement::buildPendingResource()
     }
 }
 
-Node::InsertionNotificationRequest SVGTRefElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGTRefElement::insertedInto(ContainerNode* rootParent)
 {
     SVGStyledElement::insertedInto(rootParent);
     if (rootParent->inDocument())
@@ -300,7 +300,7 @@ Node::InsertionNotificationRequest SVGTRefElement::insertedInto(Node* rootParent
     return InsertionDone;
 }
 
-void SVGTRefElement::removedFrom(Node* rootParent)
+void SVGTRefElement::removedFrom(ContainerNode* rootParent)
 {
     SVGStyledElement::removedFrom(rootParent);
     if (rootParent->inDocument())
index 85c0684..0a3f7ff 100644 (file)
@@ -50,8 +50,8 @@ private:
     virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const;
     virtual bool rendererIsNeeded(const NodeRenderingContext&);
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     void clearEventListener();
 
index 8b59f4e..542d1a9 100644 (file)
@@ -139,7 +139,7 @@ bool SVGTextPathElement::rendererIsNeeded(const NodeRenderingContext& context)
     return false;
 }
 
-Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNode* rootParent)
 {
     SVGStyledElement::insertedInto(rootParent);
     if (!rootParent->inDocument())
index 452e60e..7baf0f4 100644 (file)
@@ -115,7 +115,7 @@ public:
 private:
     SVGTextPathElement(const QualifiedName&, Document*);
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
 
     bool isSupportedAttribute(const QualifiedName&);
     virtual void parseAttribute(const Attribute&) OVERRIDE;
index 4ba90fa..51706f0 100644 (file)
@@ -38,7 +38,7 @@ PassRefPtr<SVGTitleElement> SVGTitleElement::create(const QualifiedName& tagName
     return adoptRef(new SVGTitleElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest SVGTitleElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGTitleElement::insertedInto(ContainerNode* rootParent)
 {
     SVGStyledElement::insertedInto(rootParent);
     if (!rootParent->inDocument())
@@ -49,7 +49,7 @@ Node::InsertionNotificationRequest SVGTitleElement::insertedInto(Node* rootParen
     return InsertionDone;
 }
 
-void SVGTitleElement::removedFrom(Node* rootParent)
+void SVGTitleElement::removedFrom(ContainerNode* rootParent)
 {
     SVGElement::removedFrom(rootParent);
     if (rootParent->inDocument())
index b8ef265..fdbdb7c 100644 (file)
@@ -35,8 +35,8 @@ public:
 private:
     SVGTitleElement(const QualifiedName&, Document*);
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
 
     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
index 24f1b3e..2221bac 100755 (executable)
@@ -174,7 +174,7 @@ static inline bool isWellFormedDocument(Document* document)
     return true;
 }
 
-Node::InsertionNotificationRequest SVGUseElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGUseElement::insertedInto(ContainerNode* rootParent)
 {
     // This functions exists to assure assumptions made in the code regarding SVGElementInstance creation/destruction are satisfied.
     SVGStyledTransformableElement::insertedInto(rootParent);
@@ -188,7 +188,7 @@ Node::InsertionNotificationRequest SVGUseElement::insertedInto(Node* rootParent)
     return InsertionDone;
 }
 
-void SVGUseElement::removedFrom(Node* rootParent)
+void SVGUseElement::removedFrom(ContainerNode* rootParent)
 {
     SVGStyledTransformableElement::removedFrom(rootParent);
     if (rootParent->inDocument())
index e42b61d..971ade6 100755 (executable)
@@ -59,8 +59,8 @@ private:
     virtual bool isValid() const { return SVGTests::isValid(); }
     virtual bool supportsFocus() const { return true; }
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual void buildPendingResource();
 
     bool isSupportedAttribute(const QualifiedName&);
index 6ed8d49..cb541b7 100644 (file)
@@ -39,7 +39,7 @@ PassRefPtr<SVGVKernElement> SVGVKernElement::create(const QualifiedName& tagName
     return adoptRef(new SVGVKernElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest SVGVKernElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGVKernElement::insertedInto(ContainerNode* rootParent)
 {
     if (rootParent->inDocument()) {
         ContainerNode* fontNode = parentNode();
@@ -52,7 +52,7 @@ Node::InsertionNotificationRequest SVGVKernElement::insertedInto(Node* rootParen
     return SVGElement::insertedInto(rootParent);
 }
 
-void SVGVKernElement::removedFrom(Node* rootParent)
+void SVGVKernElement::removedFrom(ContainerNode* rootParent)
 {
     ContainerNode* fontNode = parentNode();
     if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) {
index d331974..b3df0fc 100644 (file)
@@ -39,8 +39,8 @@ public:
 private:
     SVGVKernElement(const QualifiedName&, Document*);
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }
 };
index 353e7b9..2781d2f 100644 (file)
@@ -193,7 +193,7 @@ void SVGSMILElement::reset()
     resolveFirstInterval();
 }
 
-Node::InsertionNotificationRequest SVGSMILElement::insertedInto(Node* rootParent)
+Node::InsertionNotificationRequest SVGSMILElement::insertedInto(ContainerNode* rootParent)
 {
     SVGElement::insertedInto(rootParent);
     if (!rootParent->inDocument())
@@ -222,7 +222,7 @@ Node::InsertionNotificationRequest SVGSMILElement::insertedInto(Node* rootParent
     return InsertionDone;
 }
 
-void SVGSMILElement::removedFrom(Node* rootParent)
+void SVGSMILElement::removedFrom(ContainerNode* rootParent)
 {
     if (rootParent->inDocument()) {
         if (m_timeContainer) {
index 8e8cd6c..42827c7 100644 (file)
@@ -47,8 +47,8 @@ public:
     bool isSupportedAttribute(const QualifiedName&);
     virtual void parseAttribute(const Attribute&) OVERRIDE;
     virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
-    virtual void removedFrom(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual void removedFrom(ContainerNode*) OVERRIDE;
     
     virtual bool hasValidAttributeType() = 0;
     virtual void animationAttributeChanged() = 0;