Node: removedFrom() and insertedInto() should use references.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Oct 2013 18:51:32 +0000 (18:51 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Oct 2013 18:51:32 +0000 (18:51 +0000)
<https://webkit.org/b/122315>

Reviewed by Anders Carlsson.

ContainerNode* -> ContainerNode&

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

98 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/ContainerNodeAlgorithms.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/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/HTMLFormControlElementWithState.cpp
Source/WebCore/html/HTMLFormControlElementWithState.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/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/html/shadow/InsertionPoint.cpp
Source/WebCore/html/shadow/InsertionPoint.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/SVGMPathElement.cpp
Source/WebCore/svg/SVGMPathElement.h
Source/WebCore/svg/SVGPathElement.cpp
Source/WebCore/svg/SVGPathElement.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/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 2d94b61c4f84dd99b9939b13c2648cb4532a6505..ffaa323c3109b0189504f8eb35dd00aaa1ac8a8b 100644 (file)
@@ -1,3 +1,12 @@
+2013-10-04  Andreas Kling  <akling@apple.com>
+
+        Node: removedFrom() and insertedInto() should use references.
+        <https://webkit.org/b/122315>
+
+        Reviewed by Anders Carlsson.
+
+        ContainerNode* -> ContainerNode&
+
 2013-10-04  Romain Perier  <romain.perier@gmail.com>
 
         Optimize strings copies in srcset parser
index 076ce988b7622a08c0df838b078a2f03b8013cb3..a135b1f4c2ff75ec2fef92a0d0cc86a253259737 100644 (file)
@@ -198,7 +198,7 @@ inline void ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument(Node& nod
 {
     ASSERT(m_insertionPoint.inDocument());
     Ref<Node> protect(node);
-    if (Node::InsertionShouldCallDidNotifySubtreeInsertions == node.insertedInto(&m_insertionPoint))
+    if (Node::InsertionShouldCallDidNotifySubtreeInsertions == node.insertedInto(m_insertionPoint))
         m_postInsertionNotificationTargets.append(node);
     if (node.isContainerNode())
         notifyDescendantInsertedIntoDocument(toContainerNode(node));
@@ -209,7 +209,7 @@ inline void ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree(ContainerNode
     NoEventDispatchAssertion assertNoEventDispatch;
     ASSERT(!m_insertionPoint.inDocument());
 
-    if (Node::InsertionShouldCallDidNotifySubtreeInsertions == node.insertedInto(&m_insertionPoint))
+    if (Node::InsertionShouldCallDidNotifySubtreeInsertions == node.insertedInto(m_insertionPoint))
         m_postInsertionNotificationTargets.append(node);
     notifyDescendantInsertedIntoTree(node);
 }
@@ -238,7 +238,7 @@ inline void ChildNodeInsertionNotifier::notify(Node& node)
 inline void ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument(Node& node)
 {
     ASSERT(m_insertionPoint.inDocument());
-    node.removedFrom(&m_insertionPoint);
+    node.removedFrom(m_insertionPoint);
 
     if (node.isContainerNode())
         notifyDescendantRemovedFromDocument(toContainerNode(node));
@@ -249,7 +249,7 @@ inline void ChildNodeRemovalNotifier::notifyNodeRemovedFromTree(ContainerNode& n
     NoEventDispatchAssertion assertNoEventDispatch;
     ASSERT(!m_insertionPoint.inDocument());
 
-    node.removedFrom(&m_insertionPoint);
+    node.removedFrom(m_insertionPoint);
     notifyDescendantRemovedFromTree(node);
 }
 
index 847609cb22cc6bb59098d6d05b67564dbdf30318..e66c95d07183e87268a1c7acc0293a4299d41658 100644 (file)
@@ -1314,7 +1314,7 @@ RenderElement* Element::createRenderer(RenderArena&, RenderStyle& style)
     return RenderElement::createFor(*this, style);
 }
 
-Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest Element::insertedInto(ContainerNode& insertionPoint)
 {
     bool wasInDocument = inDocument();
     // need to do superclass processing first so inDocument() is true
@@ -1327,13 +1327,13 @@ Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertio
         setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(true);
 #endif
 
-    if (!insertionPoint->isInTreeScope())
+    if (!insertionPoint.isInTreeScope())
         return InsertionDone;
 
     if (hasRareData())
         elementRareData()->clearClassListValueForQuirksMode();
 
-    TreeScope* newScope = insertionPoint->treeScope();
+    TreeScope* newScope = insertionPoint.treeScope();
     HTMLDocument* newDocument = !wasInDocument && inDocument() && newScope->documentScope()->isHTMLDocument() ? toHTMLDocument(newScope->documentScope()) : 0;
     if (newScope != treeScope())
         newScope = 0;
@@ -1362,7 +1362,7 @@ Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertio
     return InsertionDone;
 }
 
-void Element::removedFrom(ContainerNode* insertionPoint)
+void Element::removedFrom(ContainerNode& insertionPoint)
 {
 #if ENABLE(FULLSCREEN_API)
     if (containsFullScreenElement())
@@ -1375,8 +1375,8 @@ void Element::removedFrom(ContainerNode* insertionPoint)
 
     setSavedLayerScrollOffset(IntSize());
 
-    if (insertionPoint->isInTreeScope()) {
-        TreeScope* oldScope = insertionPoint->treeScope();
+    if (insertionPoint.isInTreeScope()) {
+        TreeScope* oldScope = insertionPoint.treeScope();
         HTMLDocument* oldDocument = inDocument() && oldScope->documentScope()->isHTMLDocument() ? toHTMLDocument(oldScope->documentScope()) : 0;
         if (oldScope != treeScope())
             oldScope = 0;
index 552ed6a380a4e07d8f1d8c77f06ce709322bf9b8..9a7a20125a111d13d0c85dd53de5c90dff5b9983 100644 (file)
@@ -563,8 +563,8 @@ protected:
     {
     }
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual void childrenChanged(const ChildChange&) OVERRIDE;
     virtual void removeAllEventListeners() OVERRIDE FINAL;
 
index 888399ea87d58b354f2a6cda0d5a99650ad0506f..210de6acaf2c095afa0e7305cddefdd0b1714cff 100644 (file)
@@ -1020,20 +1020,20 @@ Node* Node::insertionParentForBinding() const
     return findInsertionPointOf(this);
 }
 
-Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest Node::insertedInto(ContainerNode& insertionPoint)
 {
-    ASSERT(insertionPoint->inDocument() || isContainerNode());
-    if (insertionPoint->inDocument())
+    ASSERT(insertionPoint.inDocument() || isContainerNode());
+    if (insertionPoint.inDocument())
         setFlag(InDocumentFlag);
     if (parentOrShadowHostNode()->isInShadowTree())
         setFlag(IsInShadowTreeFlag);
     return InsertionDone;
 }
 
-void Node::removedFrom(ContainerNode* insertionPoint)
+void Node::removedFrom(ContainerNode& insertionPoint)
 {
-    ASSERT(insertionPoint->inDocument() || isContainerNode());
-    if (insertionPoint->inDocument())
+    ASSERT(insertionPoint.inDocument() || isContainerNode());
+    if (insertionPoint.inDocument())
         clearFlag(InDocumentFlag);
     if (isInShadowTree() && !treeScope()->rootNode()->isShadowRoot())
         clearFlag(IsInShadowTreeFlag);
index 2f272dacf73805a0c35db12e7e2058844da3818d..44575d54e794b3107365f8faeb5883105ea0603d 100644 (file)
@@ -477,7 +477,7 @@ public:
         InsertionShouldCallDidNotifySubtreeInsertions
     };
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode* insertionPoint);
+    virtual InsertionNotificationRequest insertedInto(ContainerNode& insertionPoint);
     virtual void didNotifySubtreeInsertions(ContainerNode*) { }
 
     // Notifies the node that it is no longer part of the tree.
@@ -485,7 +485,7 @@ public:
     // 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(ContainerNode* insertionPoint);
+    virtual void removedFrom(ContainerNode& insertionPoint);
 
 #ifndef NDEBUG
     virtual void formatForDebugger(char* buffer, unsigned length) const;
index 510891f1cb26df81ad2e3257fdd8d22ca3626b83..b06809d7e69977915a67ab860a854bfd1ff428bf 100644 (file)
@@ -262,20 +262,20 @@ void ProcessingInstruction::addSubresourceAttributeURLs(ListHashSet<URL>& urls)
     addSubresourceURL(urls, sheet()->baseURL());
 }
 
-Node::InsertionNotificationRequest ProcessingInstruction::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest ProcessingInstruction::insertedInto(ContainerNode& insertionPoint)
 {
     CharacterData::insertedInto(insertionPoint);
-    if (!insertionPoint->inDocument())
+    if (!insertionPoint.inDocument())
         return InsertionDone;
     document().styleSheetCollection().addStyleSheetCandidateNode(*this, m_createdByParser);
     checkStyleSheet();
     return InsertionDone;
 }
 
-void ProcessingInstruction::removedFrom(ContainerNode* insertionPoint)
+void ProcessingInstruction::removedFrom(ContainerNode& insertionPoint)
 {
     CharacterData::removedFrom(insertionPoint);
-    if (!insertionPoint->inDocument())
+    if (!insertionPoint.inDocument())
         return;
     
     document().styleSheetCollection().removeStyleSheetCandidateNode(*this);
index 47196992cd9a090ee336c1db3f8ce5db444aeea3..55a56b7e8205cb3409560392ab88e6ee8a81fcaf 100644 (file)
@@ -60,8 +60,8 @@ private:
     virtual NodeType nodeType() const;
     virtual PassRefPtr<Node> cloneNode(bool deep);
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     void checkStyleSheet();
     virtual void setCSSStyleSheet(const String& href, const URL& baseURL, const String& charset, const CachedCSSStyleSheet*);
index f12e45d2c7dacab685dea2c884ac31bcf9fb0883..3e0b77cc72052b901572fe1b8c2b4c8f1b58befa 100644 (file)
@@ -88,9 +88,9 @@ ScriptElement::~ScriptElement()
     stopLoadRequest();
 }
 
-void ScriptElement::insertedInto(ContainerNode* insertionPoint)
+void ScriptElement::insertedInto(ContainerNode& insertionPoint)
 {
-    if (insertionPoint->inDocument() && !m_parserInserted)
+    if (insertionPoint.inDocument() && !m_parserInserted)
         prepareScript(); // FIXME: Provide a real starting line number here.
 }
 
index 05a418cbfd8ed079d01c63e353bf6a2cbe31ed95..281077e5dece81eed998bf034946569104eade9e 100644 (file)
@@ -68,7 +68,7 @@ protected:
     bool forceAsync() const { return m_forceAsync; }
 
     // Helper functions used by our parent classes.
-    void insertedInto(ContainerNode*);
+    void insertedInto(ContainerNode&);
     void childrenChanged();
     void handleSourceAttribute(const String& sourceUrl);
     void handleAsyncAttribute();
index 1f3c637ea3804d48399e3954beac782fe2a037a5..7d9f65facfb77ff6d4e4c1ef69929ec0db276112 100644 (file)
@@ -76,10 +76,10 @@ void FormAssociatedElement::didMoveToNewDocument(Document* oldDocument)
         resetFormAttributeTargetObserver();
 }
 
-void FormAssociatedElement::insertedInto(ContainerNode* insertionPoint)
+void FormAssociatedElement::insertedInto(ContainerNode& insertionPoint)
 {
     resetFormOwner();
-    if (!insertionPoint->inDocument())
+    if (!insertionPoint.inDocument())
         return;
 
     HTMLElement* element = toHTMLElement(this);
@@ -87,10 +87,10 @@ void FormAssociatedElement::insertedInto(ContainerNode* insertionPoint)
         resetFormAttributeTargetObserver();
 }
 
-void FormAssociatedElement::removedFrom(ContainerNode* insertionPoint)
+void FormAssociatedElement::removedFrom(ContainerNode& insertionPoint)
 {
     HTMLElement* element = toHTMLElement(this);
-    if (insertionPoint->inDocument() && element->fastHasAttribute(formAttr))
+    if (insertionPoint.inDocument() && element->fastHasAttribute(formAttr))
         m_formAttributeTargetObserver = nullptr;
     // If the form and element are both in the same tree, preserve the connection to the form.
     // Otherwise, null out our form and remove ourselves from the form's list of elements.
index bdad7b7a84cde5b16a022189207a8b7790d597d9..95c2a49178fdff4426b163cd1e86a66bb3267671 100644 (file)
@@ -92,8 +92,8 @@ public:
 protected:
     FormAssociatedElement();
 
-    void insertedInto(ContainerNode*);
-    void removedFrom(ContainerNode*);
+    void insertedInto(ContainerNode&);
+    void removedFrom(ContainerNode&);
     void didMoveToNewDocument(Document* oldDocument);
 
     void setForm(HTMLFormElement*);
index 842b700ea1ade5ecf59f92d2789f94365b49de72..7e8d2764a6cf2c74892707b20617888fb901a544 100644 (file)
@@ -52,18 +52,18 @@ void HTMLBaseElement::parseAttribute(const QualifiedName& name, const AtomicStri
         HTMLElement::parseAttribute(name, value);
 }
 
-Node::InsertionNotificationRequest HTMLBaseElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLBaseElement::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
-    if (insertionPoint->inDocument())
+    if (insertionPoint.inDocument())
         document().processBaseElement();
     return InsertionDone;
 }
 
-void HTMLBaseElement::removedFrom(ContainerNode* insertionPoint)
+void HTMLBaseElement::removedFrom(ContainerNode& insertionPoint)
 {
     HTMLElement::removedFrom(insertionPoint);
-    if (insertionPoint->inDocument())
+    if (insertionPoint.inDocument())
         document().processBaseElement();
 }
 
index 0cde9f075171d9522eefe354dcb450585ca8c224..c8dabc48074590b9491617ea105b25d2ef5fa229 100644 (file)
@@ -40,8 +40,8 @@ private:
     virtual String target() const;
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 };
 
 ELEMENT_TYPE_CASTS(HTMLBaseElement)
index 4f122e1d56047f80be6c479fe4005e0d38aa93b5..db76e72d8b5b8601de630397d81c2645465dc741 100644 (file)
@@ -155,10 +155,10 @@ void HTMLBodyElement::parseAttribute(const QualifiedName& name, const AtomicStri
         HTMLElement::parseAttribute(name, value);
 }
 
-Node::InsertionNotificationRequest HTMLBodyElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLBodyElement::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
-    if (!insertionPoint->inDocument())
+    if (!insertionPoint.inDocument())
         return InsertionDone;
 
     // FIXME: It's surprising this is web compatible since it means a marginwidth and marginheight attribute can
index bea423232b7cba92df6eff6dec91d46848e3786d..8ae40a042b29e73adf06062ee490d2dc8cefef60 100644 (file)
@@ -74,7 +74,7 @@ private:
     virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
     virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
 
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
     
index a912cd9118c90ea2923e538d38b156be8289f262..2f4356af3d2fac7e40423aace31d8a13ea3bc352 100644 (file)
@@ -229,7 +229,7 @@ void HTMLFormControlElement::didMoveToNewDocument(Document* oldDocument)
     HTMLElement::didMoveToNewDocument(oldDocument);
 }
 
-Node::InsertionNotificationRequest HTMLFormControlElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLFormControlElement::insertedInto(ContainerNode& insertionPoint)
 {
     m_ancestorDisabledState = AncestorDisabledStateUnknown;
     m_dataListAncestorState = Unknown;
@@ -239,7 +239,7 @@ Node::InsertionNotificationRequest HTMLFormControlElement::insertedInto(Containe
     return InsertionDone;
 }
 
-void HTMLFormControlElement::removedFrom(ContainerNode* insertionPoint)
+void HTMLFormControlElement::removedFrom(ContainerNode& insertionPoint)
 {
     m_validationMessage = nullptr;
     m_ancestorDisabledState = AncestorDisabledStateUnknown;
index 380cf0fcd901da71e0b1eb321b1bab1016e6b3a3..5608e0057da8d52737d16f31c5e45de92f4ed96c 100644 (file)
@@ -112,8 +112,8 @@ protected:
     virtual void requiredAttributeChanged();
     virtual void disabledAttributeChanged();
     virtual void didAttachRenderers() OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE;
 
     virtual bool supportsFocus() const OVERRIDE;
index 695506580d45f775b13ec6f3fc39e50704af90c3..5e459ea996257dd3344633466a4b1f0c97537b65 100644 (file)
@@ -43,16 +43,16 @@ HTMLFormControlElementWithState::~HTMLFormControlElementWithState()
 {
 }
 
-Node::InsertionNotificationRequest HTMLFormControlElementWithState::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLFormControlElementWithState::insertedInto(ContainerNode& insertionPoint)
 {
-    if (insertionPoint->inDocument() && !containingShadowRoot())
+    if (insertionPoint.inDocument() && !containingShadowRoot())
         document().formController().registerFormElementWithState(this);
     return HTMLFormControlElement::insertedInto(insertionPoint);
 }
 
-void HTMLFormControlElementWithState::removedFrom(ContainerNode* insertionPoint)
+void HTMLFormControlElementWithState::removedFrom(ContainerNode& insertionPoint)
 {
-    if (insertionPoint->inDocument() && !containingShadowRoot() && !insertionPoint->containingShadowRoot())
+    if (insertionPoint.inDocument() && !containingShadowRoot() && !insertionPoint.containingShadowRoot())
         document().formController().unregisterFormElementWithState(this);
     HTMLFormControlElement::removedFrom(insertionPoint);
 }
index e55e5b2126ce1757187434d8c4187278711b123d..fe01cb3df8bd71adb7c4e3a68085d4cdab68e0c8 100644 (file)
@@ -47,8 +47,8 @@ protected:
 
     virtual bool shouldAutocomplete() const;
     virtual void finishParsingChildren();
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual bool isFormControlElementWithState() const OVERRIDE;
 };
 
index 7dd33cc60b9bc15188a8aeb7081400b7916b87ea..e166c0d1591ddc5cd9c57b7edb02ffa74b7eff9b 100644 (file)
@@ -124,10 +124,10 @@ bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style)
     return formIsTablePart;
 }
 
-Node::InsertionNotificationRequest HTMLFormElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLFormElement::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
-    if (insertionPoint->inDocument())
+    if (insertionPoint.inDocument())
         document().didAssociateFormControl(this);
     return InsertionDone;
 }
@@ -140,7 +140,7 @@ static inline Node* findRoot(Node* n)
     return root;
 }
 
-void HTMLFormElement::removedFrom(ContainerNode* insertionPoint)
+void HTMLFormElement::removedFrom(ContainerNode& insertionPoint)
 {
     Node* root = findRoot(this);
     Vector<FormAssociatedElement*> associatedElements(m_associatedElements);
index 1a3b371139ba79d2f0d7a12c56b5a137ad197198..932a1a69f68686304df6e84ba09c0c5e5b02c094 100644 (file)
@@ -112,8 +112,8 @@ private:
     HTMLFormElement(const QualifiedName&, Document&);
 
     virtual bool rendererIsNeeded(const RenderStyle&);
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual void finishParsingChildren() OVERRIDE;
 
     virtual void handleLocalEvents(Event*);
index b81aad023dd345e0c4afe169fcaa41ed3ce3a682..e2a1f2fb94ed1f39a80ff001290799a3a36cc2c0 100644 (file)
@@ -142,10 +142,10 @@ void HTMLFrameElementBase::setNameAndOpenURL()
     openURL();
 }
 
-Node::InsertionNotificationRequest HTMLFrameElementBase::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLFrameElementBase::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLFrameOwnerElement::insertedInto(insertionPoint);
-    if (insertionPoint->inDocument())
+    if (insertionPoint.inDocument())
         return InsertionShouldCallDidNotifySubtreeInsertions;
     return InsertionDone;
 }
index 23033aab80e0f02d3601e0fbd38d1c010116003c..eed4879fb9e2ef6dc7992613e9cf6d2808f378c8 100644 (file)
@@ -50,7 +50,7 @@ protected:
     bool isURLAllowed() const;
 
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
     virtual void didNotifySubtreeInsertions(ContainerNode*) OVERRIDE;
     virtual void didAttachRenderers() OVERRIDE;
 
index 05cf4aa9aee6106a4a497720d1c792fabaeb3dc9..2e800726a7ee44560e88f26a286ed2735ece4f89 100644 (file)
@@ -209,10 +209,10 @@ bool HTMLFrameSetElement::willRecalcStyle(Style::Change)
     return true;
 }
 
-Node::InsertionNotificationRequest HTMLFrameSetElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLFrameSetElement::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
-    if (insertionPoint->inDocument()) {
+    if (insertionPoint.inDocument()) {
         if (Frame* frame = document().frame())
             frame->loader().client().dispatchDidBecomeFrameset(document().isFrameSet());
     }
@@ -220,10 +220,10 @@ Node::InsertionNotificationRequest HTMLFrameSetElement::insertedInto(ContainerNo
     return InsertionDone;
 }
 
-void HTMLFrameSetElement::removedFrom(ContainerNode* insertionPoint)
+void HTMLFrameSetElement::removedFrom(ContainerNode& insertionPoint)
 {
     HTMLElement::removedFrom(insertionPoint);
-    if (insertionPoint->inDocument()) {
+    if (insertionPoint.inDocument()) {
         if (Frame* frame = document().frame())
             frame->loader().client().dispatchDidBecomeFrameset(document().isFrameSet());
     }
index 246511fe5d4d28f9e800868eca012fa9f2892462..166c298f6a4e016e12a70736ed52de786b6f25c9 100644 (file)
@@ -81,8 +81,8 @@ private:
 
     virtual bool willRecalcStyle(Style::Change) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     std::unique_ptr<Length[]> m_rowLengths;
     std::unique_ptr<Length[]> m_colLengths;
index 3e9626822386561f9277ff7b28ea6fc0034584a2..12dcac546a5fcac28325dcc9b236c3f9e0cc14db 100644 (file)
@@ -198,7 +198,7 @@ void HTMLImageElement::didAttachRenderers()
         renderImage->setImageSizeForAltText();
 }
 
-Node::InsertionNotificationRequest HTMLImageElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLImageElement::insertedInto(ContainerNode& insertionPoint)
 {
     if (!m_form) { // m_form can be non-null if it was set in constructor.
         m_form = HTMLFormElement::findClosestFormAncestor(*this);
@@ -208,13 +208,13 @@ Node::InsertionNotificationRequest HTMLImageElement::insertedInto(ContainerNode*
 
     // If we have been inserted from a renderer-less document,
     // our loader may have not fetched the image, so do it now.
-    if (insertionPoint->inDocument() && !m_imageLoader.image())
+    if (insertionPoint.inDocument() && !m_imageLoader.image())
         m_imageLoader.updateFromElement();
 
     return HTMLElement::insertedInto(insertionPoint);
 }
 
-void HTMLImageElement::removedFrom(ContainerNode* insertionPoint)
+void HTMLImageElement::removedFrom(ContainerNode& insertionPoint)
 {
     if (m_form)
         m_form->removeImgElement(this);
index 7fc7c427839098961a6e7306741a464cdc7a9def..dce39764624dbc92a3d0c08485c502327b888d62 100644 (file)
@@ -106,8 +106,8 @@ private:
 
     virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const;
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     virtual bool isFormAssociatedElement() OVERRIDE FINAL { return false; }
     virtual FormNamedItem* asFormNamedItem() OVERRIDE FINAL { return this; }
index c04fe0200cd4975104f2da4bba4933628f8766b1..8bb25f280fcb62196ee5a1e9944e461a84b4d40c 100644 (file)
@@ -1505,10 +1505,10 @@ void HTMLInputElement::didChangeForm()
     addToRadioButtonGroup();
 }
 
-Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLTextFormControlElement::insertedInto(insertionPoint);
-    if (insertionPoint->inDocument() && !form())
+    if (insertionPoint.inDocument() && !form())
         addToRadioButtonGroup();
 #if ENABLE(DATALIST_ELEMENT)
     resetListAttributeTargetObserver();
@@ -1516,9 +1516,9 @@ Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode*
     return InsertionDone;
 }
 
-void HTMLInputElement::removedFrom(ContainerNode* insertionPoint)
+void HTMLInputElement::removedFrom(ContainerNode& insertionPoint)
 {
-    if (insertionPoint->inDocument() && !form())
+    if (insertionPoint.inDocument() && !form())
         removeFromRadioButtonGroup();
     HTMLTextFormControlElement::removedFrom(insertionPoint);
     ASSERT(!inDocument());
index 81b0287613c461a4aa53f20bff29eeae364a60fc..cdec924482ef8990b9c988fd0747d41bc53be9b5 100644 (file)
@@ -332,8 +332,8 @@ private:
 
     virtual void willChangeForm() OVERRIDE;
     virtual void didChangeForm() OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE;
 
     virtual bool hasCustomFocusLogic() const OVERRIDE;
index c908da3b441a29d0b45e2c2fcc75fd5d19ee5ffd..1d728d4e864a4cdd1c19bd748b5cc314e752b29c 100644 (file)
@@ -245,10 +245,10 @@ void HTMLLinkElement::clearSheet()
     m_sheet = 0;
 }
 
-Node::InsertionNotificationRequest HTMLLinkElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLLinkElement::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
-    if (!insertionPoint->inDocument())
+    if (!insertionPoint.inDocument())
         return InsertionDone;
 
     m_isInShadowTree = isInShadowTree();
@@ -261,10 +261,10 @@ Node::InsertionNotificationRequest HTMLLinkElement::insertedInto(ContainerNode*
     return InsertionDone;
 }
 
-void HTMLLinkElement::removedFrom(ContainerNode* insertionPoint)
+void HTMLLinkElement::removedFrom(ContainerNode& insertionPoint)
 {
     HTMLElement::removedFrom(insertionPoint);
-    if (!insertionPoint->inDocument())
+    if (!insertionPoint.inDocument())
         return;
 
     m_linkLoader.released();
index dcc08384a280f9ce34344f8ed07e2b82bb158131..825ff7a2bee7757e67694a7042e77108ab6fb821 100644 (file)
@@ -79,8 +79,8 @@ private:
     static void processCallback(Node*);
     void clearSheet();
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     // from CachedResourceClient
     virtual void setCSSStyleSheet(const String& href, const URL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet);
index f825bb15d65138af19b1d8750c3f56ad95ab3a60..8ac37bfd4de46724602c59fc6ed82271828fe1ea 100644 (file)
@@ -127,16 +127,16 @@ PassRefPtr<HTMLCollection> HTMLMapElement::areas()
     return ensureCachedHTMLCollection(MapAreas);
 }
 
-Node::InsertionNotificationRequest HTMLMapElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLMapElement::insertedInto(ContainerNode& insertionPoint)
 {
-    if (insertionPoint->inDocument())
+    if (insertionPoint.inDocument())
         treeScope()->addImageMap(this);
     return HTMLElement::insertedInto(insertionPoint);
 }
 
-void HTMLMapElement::removedFrom(ContainerNode* insertionPoint)
+void HTMLMapElement::removedFrom(ContainerNode& insertionPoint)
 {
-    if (insertionPoint->inDocument())
+    if (insertionPoint.inDocument())
         treeScope()->removeImageMap(this);
     HTMLElement::removedFrom(insertionPoint);
 }
index 2036c10d5b36db93b88efed9635f5c7ac5b426a6..52aded0cd12ce7b1cb999f8cb3853c67121510d9 100644 (file)
@@ -48,8 +48,8 @@ private:
 
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     AtomicString m_name;
 };
index c33febc293fdd4c394eee825f857a5b24f28c809..348f87e5fa37cf84472242ad234bb369dfb5e490 100644 (file)
@@ -597,12 +597,12 @@ bool HTMLMediaElement::childShouldCreateRenderer(const Node* child) const
 #endif
 }
 
-Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode& insertionPoint)
 {
     LOG(Media, "HTMLMediaElement::insertedInto");
 
     HTMLElement::insertedInto(insertionPoint);
-    if (insertionPoint->inDocument()) {
+    if (insertionPoint.inDocument()) {
         m_inActiveDocument = true;
 
         if (m_networkState == NETWORK_EMPTY && !getAttribute(srcAttr).isEmpty())
@@ -613,12 +613,12 @@ Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode*
     return InsertionDone;
 }
 
-void HTMLMediaElement::removedFrom(ContainerNode* insertionPoint)
+void HTMLMediaElement::removedFrom(ContainerNode& insertionPoint)
 {
     LOG(Media, "HTMLMediaElement::removedFrom");
 
     m_inActiveDocument = false;
-    if (insertionPoint->inDocument()) {
+    if (insertionPoint.inDocument()) {
         configureMediaControls();
         if (m_networkState > NETWORK_EMPTY)
             pause();
index 59feadfedfcac2988fde4fbc53aad343db7d00ca..e0e9a8f8c66e6acf3bdfd1f9ed739cb20ff76be4 100644 (file)
@@ -441,8 +441,8 @@ private:
     virtual bool rendererIsNeeded(const RenderStyle&);
     virtual RenderElement* createRenderer(RenderArena&, RenderStyle&);
     virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual void didRecalcStyle(Style::Change);
 
     virtual void defaultEventHandler(Event*);
index 82ac1fd2c55368d5b42cfb6e397334fe7ffa9f3e..a8fecd9fd460c16b727aec2c03d408c98d7c169b 100644 (file)
@@ -54,10 +54,10 @@ void HTMLMetaElement::parseAttribute(const QualifiedName& name, const AtomicStri
         HTMLElement::parseAttribute(name, value);
 }
 
-Node::InsertionNotificationRequest HTMLMetaElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLMetaElement::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
-    if (insertionPoint->inDocument())
+    if (insertionPoint.inDocument())
         process();
     return InsertionDone;
 }
index 58c227e165b9048383a6fd991738831892d600d4..f97119eb1618a54994e725f149dc4c9daf6118de 100644 (file)
@@ -39,7 +39,7 @@ private:
     HTMLMetaElement(const QualifiedName&, Document&);
 
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
 
     void process();
 };
index 9c0be288f3e9ae7a88559f645d2628940ffa2243..1f2c9b239396ab52cf5b62e773fa11e5e667bc43 100644 (file)
@@ -317,14 +317,14 @@ void HTMLObjectElement::updateWidget(PluginCreationOption pluginCreationOption)
         renderFallbackContent();
 }
 
-Node::InsertionNotificationRequest HTMLObjectElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLObjectElement::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLPlugInImageElement::insertedInto(insertionPoint);
     FormAssociatedElement::insertedInto(insertionPoint);
     return InsertionDone;
 }
 
-void HTMLObjectElement::removedFrom(ContainerNode* insertionPoint)
+void HTMLObjectElement::removedFrom(ContainerNode& insertionPoint)
 {
     HTMLPlugInImageElement::removedFrom(insertionPoint);
     FormAssociatedElement::removedFrom(insertionPoint);
index cce3fbf008b5d00feac05df7fd3672a309f3620b..3817f3817f67dd8bd32c21973703125d7af46967 100644 (file)
@@ -70,8 +70,8 @@ private:
     virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
     virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE;
 
index 48603556849871ba6d7341d924584b7f6320bdaa..3560f57d5ca4c886e510d31efd0cc99356c1c5ef 100644 (file)
@@ -350,7 +350,7 @@ bool HTMLOptionElement::isDisabledFormControl() const
     return isHTMLOptGroupElement(parentElement) && parentElement->isDisabledFormControl();
 }
 
-Node::InsertionNotificationRequest HTMLOptionElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLOptionElement::insertedInto(ContainerNode& insertionPoint)
 {
     if (HTMLSelectElement* select = ownerSelectElement()) {
         select->setRecalcListItems();
index f24e56d354583da0e17f9c8f134d1c7bd863ebb8..b92900dc29cd72764d2c829b851d9f15b1610ecd 100644 (file)
@@ -76,7 +76,7 @@ private:
 
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
     virtual void accessKeyAction(bool);
 
     virtual void childrenChanged(const ChildChange&) OVERRIDE;
index 141be90dc75141a7f376c0315e428f62a0859b61..96d2d91107c958e0ce716b77ebbde600f010be1c 100644 (file)
@@ -42,7 +42,7 @@ PassRefPtr<HTMLQuoteElement> HTMLQuoteElement::create(const QualifiedName& tagNa
     return adoptRef(new HTMLQuoteElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest HTMLQuoteElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLQuoteElement::insertedInto(ContainerNode& insertionPoint)
 {
     if (hasTagName(qTag))
         document().styleSheetCollection().setUsesBeforeAfterRulesOverride(true);
index fcfde34716668ff9fb41dd163f3b347f22597616..3684b9e45084e6af794b511f4a3eabe33ae4cdb2 100644 (file)
@@ -36,7 +36,7 @@ public:
 private:
     HTMLQuoteElement(const QualifiedName&, Document&);
     
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
 };
 
index 661e3822488f6b465e47fa079aa3e5ab074532c3..b0bdc951c78649d923b3dafff642aede4b979c98 100644 (file)
@@ -70,7 +70,7 @@ void HTMLScriptElement::parseAttribute(const QualifiedName& name, const AtomicSt
         HTMLElement::parseAttribute(name, value);
 }
 
-Node::InsertionNotificationRequest HTMLScriptElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLScriptElement::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     ScriptElement::insertedInto(insertionPoint);
index 67228f8af6a20dadce9e3424d6209685c9fd4a35..7d45f05fe05db4812c835654f3faa07df5b0cdb0 100644 (file)
@@ -45,7 +45,7 @@ private:
     HTMLScriptElement(const QualifiedName&, Document&, bool wasInsertedByParser, bool alreadyStarted);
 
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
     virtual void childrenChanged(const ChildChange&) OVERRIDE;
 
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
index 80b4cdb464d6df77ac4e7040ed9c3400eb28ee5a..6d7543039ae72504197bfa1e259ecc121d989571 100644 (file)
@@ -1537,7 +1537,7 @@ void HTMLSelectElement::typeAheadFind(KeyboardEvent* event)
         listBoxOnChange();
 }
 
-Node::InsertionNotificationRequest HTMLSelectElement::insertedInto(ContainerNode* 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 8527899cd1aa1dd8bec3b361ef53952e8e9977c1..25d1c1ec1cb9d7bc8c25dedc2a40b2fbb0aeeeb5 100644 (file)
@@ -149,7 +149,7 @@ private:
     void typeAheadFind(KeyboardEvent*);
     void saveLastSelection();
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
 
     virtual bool isOptionalFormControl() const { return !isRequiredFormControl(); }
     virtual bool isRequiredFormControl() const;
index c1c545e4c3969d7f944c3993d9f52d0850e00d93..92d69563e8384ab5bc51d74200cde21ec81f6a83 100644 (file)
@@ -53,7 +53,7 @@ PassRefPtr<HTMLSourceElement> HTMLSourceElement::create(const QualifiedName& tag
     return adoptRef(new HTMLSourceElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest HTMLSourceElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLSourceElement::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     Element* parent = parentElement();
@@ -62,11 +62,11 @@ Node::InsertionNotificationRequest HTMLSourceElement::insertedInto(ContainerNode
     return InsertionDone;
 }
 
-void HTMLSourceElement::removedFrom(ContainerNode* removalRoot)
+void HTMLSourceElement::removedFrom(ContainerNode& removalRoot)
 {
     Element* parent = parentElement();
-    if (!parent && removalRoot->isElementNode())
-        parent = toElement(removalRoot);
+    if (!parent && removalRoot.isElementNode())
+        parent = &toElement(removalRoot);
     if (parent && parent->isMediaElement())
         toHTMLMediaElement(parent)->sourceWasRemoved(this);
     HTMLElement::removedFrom(removalRoot);
index 7006ce9820189574a38e0ec3a5f70d3a89532547..28521d1e5622001779a8903458c1155d97b2decb 100644 (file)
@@ -48,8 +48,8 @@ public:
 private:
     HTMLSourceElement(const QualifiedName&, Document&);
     
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
 
     void errorEventTimerFired(Timer<HTMLSourceElement>*);
index ed628144f7da977b4922018f353b917cd0a62e54..924b326f2c1cea1ed101074f1395463ca45e1a9d 100644 (file)
@@ -91,20 +91,20 @@ void HTMLStyleElement::finishParsingChildren()
     HTMLElement::finishParsingChildren();
 }
 
-Node::InsertionNotificationRequest HTMLStyleElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLStyleElement::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
-    if (insertionPoint->inDocument())
+    if (insertionPoint.inDocument())
         m_styleSheetOwner.insertedIntoDocument(document(), *this);
 
     return InsertionDone;
 }
 
-void HTMLStyleElement::removedFrom(ContainerNode* insertionPoint)
+void HTMLStyleElement::removedFrom(ContainerNode& insertionPoint)
 {
     HTMLElement::removedFrom(insertionPoint);
 
-    if (insertionPoint->inDocument())
+    if (insertionPoint.inDocument())
         m_styleSheetOwner.removedFromDocument(document(), *this);
 }
 
index 0b58496cb59b7eac73d90ae09bb7db4af609fd82..353730895381802f24eedd6129ab4ceecf4e90fd 100644 (file)
@@ -52,8 +52,8 @@ private:
 
     // overload from HTMLElement
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual void childrenChanged(const ChildChange&) OVERRIDE;
 
     virtual void finishParsingChildren();
index 99184fe9fd32738879d8c4b2330408185321d302..05663ae80f2a2993b4f840ea2269861911a989b1 100644 (file)
@@ -73,10 +73,10 @@ bool HTMLTextFormControlElement::childShouldCreateRenderer(const Node* child) co
     return hasShadowRootParent(child) && HTMLFormControlElementWithState::childShouldCreateRenderer(child);
 }
 
-Node::InsertionNotificationRequest HTMLTextFormControlElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLTextFormControlElement::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLFormControlElementWithState::insertedInto(insertionPoint);
-    if (!insertionPoint->inDocument())
+    if (!insertionPoint.inDocument())
         return InsertionDone;
     String initialValue = value();
     setTextAsOfLastFormControlChangeEvent(initialValue.isNull() ? emptyString() : initialValue);
index 483f78f625993bd6b93c7e73113cd2202c02f1d1..27496b8a2feb85f0ee8cbc9b27aea3e53b956bd6 100644 (file)
@@ -46,7 +46,7 @@ public:
     void forwardEvent(Event*);
 
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
 
     // The derived class should return true if placeholder processing is needed.
     virtual bool supportsPlaceholder() const = 0;
index 181e23d6cd39235f661bfa45dae4e71837e260c7..7323d3ae6e9e666290f89318e554764627eab9cf 100644 (file)
@@ -47,7 +47,7 @@ PassRefPtr<HTMLTitleElement> HTMLTitleElement::create(const QualifiedName& tagNa
     return adoptRef(new HTMLTitleElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
     if (inDocument() && !isInShadowTree())
@@ -55,10 +55,10 @@ Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode*
     return InsertionDone;
 }
 
-void HTMLTitleElement::removedFrom(ContainerNode* insertionPoint)
+void HTMLTitleElement::removedFrom(ContainerNode& insertionPoint)
 {
     HTMLElement::removedFrom(insertionPoint);
-    if (insertionPoint->inDocument() && !insertionPoint->isInShadowTree())
+    if (insertionPoint.inDocument() && !insertionPoint.isInShadowTree())
         document().removeTitle(this);
 }
 
index e363efc998da088b9c3be3e731417931a2d841f2..4e742f66a36bc7cfc01969e718d0aa5ffd5ec7dc 100644 (file)
@@ -39,8 +39,8 @@ public:
 private:
     HTMLTitleElement(const QualifiedName&, Document&);
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual void childrenChanged(const ChildChange&) OVERRIDE;
 
     StringWithDirection m_title;
index db31e20083f1296952fd4e81ddbce666bea1a875..1b8f311ddeb2f4bb0430b23e4b227270ad43e830 100644 (file)
@@ -70,24 +70,24 @@ PassRefPtr<HTMLTrackElement> HTMLTrackElement::create(const QualifiedName& tagNa
     return adoptRef(new HTMLTrackElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest HTMLTrackElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest HTMLTrackElement::insertedInto(ContainerNode& insertionPoint)
 {
     // Since we've moved to a new parent, we may now be able to load.
     scheduleLoad();
 
     HTMLElement::insertedInto(insertionPoint);
     HTMLMediaElement* parent = mediaElement();
-    if (insertionPoint == parent) {
+    if (&insertionPoint == parent) {
         ensureTrack();
         parent->didAddTextTrack(this);
     }
     return InsertionDone;
 }
 
-void HTMLTrackElement::removedFrom(ContainerNode* insertionPoint)
+void HTMLTrackElement::removedFrom(ContainerNode& insertionPoint)
 {
-    if (!parentNode() && WebCore::isMediaElement(insertionPoint))
-        toHTMLMediaElement(insertionPoint)->didRemoveTextTrack(this);
+    if (!parentNode() && WebCore::isMediaElement(&insertionPoint))
+        toHTMLMediaElement(insertionPoint).didRemoveTextTrack(this);
     HTMLElement::removedFrom(insertionPoint);
 }
 
index b76151b6d1857d0ac703e487589cb2f48fd1eb5e..3a46dd6cc041fd52da6a4dff57267a41700e7f70 100644 (file)
@@ -73,9 +73,9 @@ private:
 
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
 
     void loadTimerFired(Timer<HTMLTrackElement>*);
index 10aebc81f8e34af4d90da6a4ecd5a0dae9252e8c..30efbdc788042722c7f419153bf968297b1adbc9 100644 (file)
@@ -114,7 +114,7 @@ void InsertionPoint::childrenChanged(const ChildChange& change)
         root->invalidateDistribution();
 }
 
-Node::InsertionNotificationRequest InsertionPoint::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest InsertionPoint::insertedInto(ContainerNode& insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
 
@@ -126,11 +126,11 @@ Node::InsertionNotificationRequest InsertionPoint::insertedInto(ContainerNode* i
     return InsertionDone;
 }
 
-void InsertionPoint::removedFrom(ContainerNode* insertionPoint)
+void InsertionPoint::removedFrom(ContainerNode& insertionPoint)
 {
     ShadowRoot* root = containingShadowRoot();
     if (!root)
-        root = insertionPoint->containingShadowRoot();
+        root = insertionPoint.containingShadowRoot();
 
     if (root && root->hostElement()) {
         root->invalidateDistribution();
index 71c98327069c7275da64919e808b71ba3a34025a..c4d6d109eccacddfa92aadd21eb623a64be496bf 100644 (file)
@@ -69,8 +69,8 @@ protected:
     InsertionPoint(const QualifiedName&, Document&);
     virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
     virtual void childrenChanged(const ChildChange&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual bool isInsertionPointNode() const OVERRIDE { return true; }
 
 private:
index d68a515c184a3fcd5b0bf8d736e43d9cae155265..c6a63eaaa89c0195b117a77eab4d30076d6111c4 100644 (file)
@@ -43,10 +43,10 @@ PassRefPtr<MathMLMathElement> MathMLMathElement::create(const QualifiedName& tag
     return adoptRef(new MathMLMathElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest MathMLMathElement::insertedInto(ContainerNode* insertionPoint)
+Node::InsertionNotificationRequest MathMLMathElement::insertedInto(ContainerNode& insertionPoint)
 {
     // There are sibling rules in the MathML default style.
-    if (insertionPoint->inDocument())
+    if (insertionPoint.inDocument())
         document().styleSheetCollection().setUsesSiblingRulesOverride(true);
     return MathMLInlineContainerElement::insertedInto(insertionPoint);
 }
index 3bf37557d82e40c6d4b2236be0203b7165906301..113b5176820583f0643c7c088fd1a8032878336c 100644 (file)
@@ -39,7 +39,7 @@ public:
 private:
     MathMLMathElement(const QualifiedName& tagName, Document&);
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
     virtual RenderElement* createRenderer(RenderArena&, RenderStyle&);
 };
     
index e2121bdc2ec7cf1ca62f7e7e68c1c7571726ba2e..0c56e52643f4488afb084eb88082f86d1bd57e8b 100644 (file)
@@ -328,9 +328,9 @@ void SVGElement::setXmlbase(const String& value, ExceptionCode&)
     setAttribute(XMLNames::baseAttr, value);
 }
 
-void SVGElement::removedFrom(ContainerNode* rootParent)
+void SVGElement::removedFrom(ContainerNode& rootParent)
 {
-    bool wasInDocument = rootParent->inDocument();
+    bool wasInDocument = rootParent.inDocument();
     if (wasInDocument)
         updateRelativeLengthsInformation(false, this);
 
@@ -1005,7 +1005,7 @@ void SVGElement::svgAttributeChanged(const QualifiedName& attrName)
     }
 }
 
-Node::InsertionNotificationRequest SVGElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGElement::insertedInto(ContainerNode& rootParent)
 {
     StyledElement::insertedInto(rootParent);
     updateRelativeLengthsInformation();
index a454d4740c7a0cab62828cb0ee96c207a7434f0f..e875e787732f36876b6e06d06cd860eccf3872bd 100644 (file)
@@ -148,8 +148,6 @@ protected:
     virtual void finishParsingChildren();
     virtual void attributeChanged(const QualifiedName&, const AtomicString&, AttributeModificationReason = ModifiedDirectly) OVERRIDE;
     virtual bool childShouldCreateRenderer(const Node*) const OVERRIDE;
-    
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
 
     SVGElementRareData& ensureSVGRareData();
 
@@ -158,7 +156,8 @@ protected:
 
     virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
     virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual void childrenChanged(const ChildChange&) OVERRIDE;
     virtual bool selfHasRelativeLengths() const { return false; }
     void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(selfHasRelativeLengths(), this); }
index 1c1b4a8e615d73648cedadd2ad0066d1b85ae3df..3b7bc11f6f0e76a3d62d2c1cda3e5c0a5e1ebfd4 100644 (file)
@@ -174,17 +174,17 @@ void SVGFEImageElement::svgAttributeChanged(const QualifiedName& attrName)
     ASSERT_NOT_REACHED();
 }
 
-Node::InsertionNotificationRequest SVGFEImageElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGFEImageElement::insertedInto(ContainerNode& rootParent)
 {
     SVGFilterPrimitiveStandardAttributes::insertedInto(rootParent);
     buildPendingResource();
     return InsertionDone;
 }
 
-void SVGFEImageElement::removedFrom(ContainerNode* rootParent)
+void SVGFEImageElement::removedFrom(ContainerNode& rootParent)
 {
     SVGFilterPrimitiveStandardAttributes::removedFrom(rootParent);
-    if (rootParent->inDocument())
+    if (rootParent.inDocument())
         clearResourceReferences();
 }
 
index 6966d30cd0a57758f61e59c75679c60485facfcf..562b27362fcfbbcf8ef087d89c75a366125a8e08 100644 (file)
@@ -58,8 +58,8 @@ private:
     void requestImageResource();
 
     virtual void buildPendingResource();
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEImageElement)
         DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio)
index 44b83a023c8b1c59ebc14dce54cb2613afeb8a60..014b9894df6534a6ddc7c9cfa0ec0177c7c36157 100644 (file)
@@ -265,10 +265,10 @@ void SVGFontFaceElement::rebuildFontFace()
     document().styleResolverChanged(DeferRecalcStyle);
 }
 
-Node::InsertionNotificationRequest SVGFontFaceElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGFontFaceElement::insertedInto(ContainerNode& rootParent)
 {
     SVGElement::insertedInto(rootParent);
-    if (!rootParent->inDocument()) {
+    if (!rootParent.inDocument()) {
         ASSERT(!m_fontElement);
         return InsertionDone;
     }
@@ -278,11 +278,11 @@ Node::InsertionNotificationRequest SVGFontFaceElement::insertedInto(ContainerNod
     return InsertionDone;
 }
 
-void SVGFontFaceElement::removedFrom(ContainerNode* rootParent)
+void SVGFontFaceElement::removedFrom(ContainerNode& rootParent)
 {
     SVGElement::removedFrom(rootParent);
 
-    if (rootParent->inDocument()) {
+    if (rootParent.inDocument()) {
         m_fontElement = 0;
         document().accessSVGExtensions()->unregisterSVGFontFaceElement(this);
         m_fontFaceRule->mutableProperties()->clear();
index 73c18ca69c4fbd95738f7e3b622387280cc87680..845ef9a7f492f90097477f6c01facf50e6591c91 100644 (file)
@@ -57,8 +57,8 @@ private:
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
 
     virtual void childrenChanged(const ChildChange&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return false; }
 
index f506b442f9dc5c9060a7564c0b0f15ae5e054d3d..189efe25e4dcc61561d71261debc7e3d6a2edc81 100644 (file)
@@ -82,7 +82,7 @@ void SVGFontFaceUriElement::childrenChanged(const ChildChange& change)
         toSVGFontFaceElement(grandparent)->rebuildFontFace();
 }
 
-Node::InsertionNotificationRequest SVGFontFaceUriElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGFontFaceUriElement::insertedInto(ContainerNode& rootParent)
 {
     loadFont();
     return SVGElement::insertedInto(rootParent);
index a8859f04df45e83dcc65cdfe3cbd04dec9564caf..b712939b6549b9f37cdfd8c78dc662208eb63d30 100644 (file)
@@ -42,7 +42,7 @@ private:
     
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
     virtual void childrenChanged(const ChildChange&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
     virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return false; }
 
     void loadFont();
index ca28037dd9c0d2e11997e63d4ce57a1e154956aa..ee656146d7189dc44bf11dfba48074d388bc698b 100644 (file)
@@ -59,15 +59,15 @@ void SVGGlyphElement::parseAttribute(const QualifiedName& name, const AtomicStri
         SVGElement::parseAttribute(name, value);
 }
 
-Node::InsertionNotificationRequest SVGGlyphElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGGlyphElement::insertedInto(ContainerNode& rootParent)
 {
     invalidateGlyphCache();
     return SVGElement::insertedInto(rootParent);
 }
 
-void SVGGlyphElement::removedFrom(ContainerNode* rootParent)
+void SVGGlyphElement::removedFrom(ContainerNode& rootParent)
 {
-    if (rootParent->inDocument())
+    if (rootParent.inDocument())
         invalidateGlyphCache();
     SVGElement::removedFrom(rootParent);
 }
index 46e59643b8e09b436199c1fba39dc4ef02973e56..164d1b004f28a92326c5fdcd8b62e2aaa3c266e8 100644 (file)
@@ -49,8 +49,8 @@ private:
     // FIXME: svgAttributeChanged missing.
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
 
index 994f33791e9979d17840ac48d6b2169d4e47558f..1688487a803a2d1ada1c53a20dbdffa395435ce6 100644 (file)
@@ -41,7 +41,7 @@ PassRefPtr<SVGHKernElement> SVGHKernElement::create(const QualifiedName& tagName
     return adoptRef(new SVGHKernElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest SVGHKernElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGHKernElement::insertedInto(ContainerNode& rootParent)
 {
     ContainerNode* fontNode = parentNode();
     if (fontNode && isSVGFontElement(fontNode))
@@ -50,7 +50,7 @@ Node::InsertionNotificationRequest SVGHKernElement::insertedInto(ContainerNode*
     return SVGElement::insertedInto(rootParent);
 }
 
-void SVGHKernElement::removedFrom(ContainerNode* rootParent)
+void SVGHKernElement::removedFrom(ContainerNode& rootParent)
 {
     ContainerNode* fontNode = parentNode();
     if (fontNode && isSVGFontElement(fontNode))
index 16ea29bac9f08f9ac4b8e1da7177ca2a5690b476..abe15c3c2e300c65150adc81872f48122975ebb6 100644 (file)
@@ -36,8 +36,8 @@ public:
 private:
     SVGHKernElement(const QualifiedName&, Document&);
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
 };
index 8bbbf246f6c5832c03572ad7fd58ae0c5ee25f82..d85ec6af0b43772519cdea1fbac0d8537630aff4 100644 (file)
@@ -203,10 +203,10 @@ void SVGImageElement::didAttachRenderers()
     }
 }
 
-Node::InsertionNotificationRequest SVGImageElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGImageElement::insertedInto(ContainerNode& rootParent)
 {
     SVGGraphicsElement::insertedInto(rootParent);
-    if (!rootParent->inDocument())
+    if (!rootParent.inDocument())
         return InsertionDone;
     // Update image loader, as soon as we're living in the tree.
     // We can only resolve base URIs properly, after that!
index 44d642c24d5127553f0fcd6c0e1c65d38a7df1cb..989480b068b350ec52597c4e8634960f7614eecb 100644 (file)
@@ -51,7 +51,7 @@ private:
     virtual void svgAttributeChanged(const QualifiedName&);
 
     virtual void didAttachRenderers() OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
 
     virtual RenderElement* createRenderer(RenderArena&, RenderStyle&);
 
index 53a63675b46f8acdc9f0dd3ea74a3ab27c64c8d1..4552a03effcdecd477f0093be9f5247169728444 100644 (file)
@@ -88,19 +88,19 @@ void SVGMPathElement::clearResourceReferences()
     document().accessSVGExtensions()->removeAllTargetReferencesForElement(this);
 }
 
-Node::InsertionNotificationRequest SVGMPathElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGMPathElement::insertedInto(ContainerNode& rootParent)
 {
     SVGElement::insertedInto(rootParent);
-    if (rootParent->inDocument())
+    if (rootParent.inDocument())
         buildPendingResource();
     return InsertionDone;
 }
 
-void SVGMPathElement::removedFrom(ContainerNode* rootParent)
+void SVGMPathElement::removedFrom(ContainerNode& rootParent)
 {
     SVGElement::removedFrom(rootParent);
-    notifyParentOfPathChange(rootParent);
-    if (rootParent->inDocument())
+    notifyParentOfPathChange(&rootParent);
+    if (rootParent.inDocument())
         clearResourceReferences();
 }
 
index 573a3cff2fd0c24cf664e949e651fb1b6d4ec059..fa5ae86845dbff27d34c00b9b536455ce53118d9 100644 (file)
@@ -49,8 +49,8 @@ private:
 
     void buildPendingResource();
     void clearResourceReferences();
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    void removedFrom(ContainerNode*);
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     bool isSupportedAttribute(const QualifiedName&);
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
index c59e7ba3c60aad494ca3c6c45137593a74a39b0e..393c9b3c8c53515cb0d7e1685c149c5608368b96 100644 (file)
@@ -294,14 +294,14 @@ void SVGPathElement::invalidateMPathDependencies()
     }
 }
 
-Node::InsertionNotificationRequest SVGPathElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGPathElement::insertedInto(ContainerNode& rootParent)
 {
     SVGGraphicsElement::insertedInto(rootParent);
     invalidateMPathDependencies();
     return InsertionDone;
 }
 
-void SVGPathElement::removedFrom(ContainerNode* rootParent)
+void SVGPathElement::removedFrom(ContainerNode& rootParent)
 {
     SVGGraphicsElement::removedFrom(rootParent);
     invalidateMPathDependencies();
index 53a520e130339bed2f63ce6523c67ae6bcbe2582..14bb488446d8babfb76283a94ab2f1062dd9dfcb 100644 (file)
@@ -120,8 +120,8 @@ private:
 
     virtual RenderElement* createRenderer(RenderArena&, RenderStyle&) OVERRIDE;
 
-    virtual Node::InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual Node::InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     void invalidateMPathDependencies();
 
index 69d59dbb7fa5d3d9709219441d7464bc3beb0986..d3e342505c7fa12b56ef3dd7237d40d633814ba7 100644 (file)
@@ -488,9 +488,9 @@ RenderElement* SVGSVGElement::createRenderer(RenderArena& arena, RenderStyle&)
     return new (arena) RenderSVGViewportContainer(*this);
 }
 
-Node::InsertionNotificationRequest SVGSVGElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGSVGElement::insertedInto(ContainerNode& rootParent)
 {
-    if (rootParent->inDocument()) {
+    if (rootParent.inDocument()) {
         document().accessSVGExtensions()->addTimeContainer(this);
 
         // Animations are started at the end of document parsing and after firing the load event,
@@ -502,9 +502,9 @@ Node::InsertionNotificationRequest SVGSVGElement::insertedInto(ContainerNode* ro
     return SVGGraphicsElement::insertedInto(rootParent);
 }
 
-void SVGSVGElement::removedFrom(ContainerNode* rootParent)
+void SVGSVGElement::removedFrom(ContainerNode& rootParent)
 {
-    if (rootParent->inDocument())
+    if (rootParent.inDocument())
         document().accessSVGExtensions()->removeTimeContainer(this);
     SVGGraphicsElement::removedFrom(rootParent);
 }
index 4acc8438f3f91a06c0005002d460f83019521177..aaf0ea09fa0d5f77b6e3680b5eba6768c3234851 100644 (file)
@@ -144,8 +144,8 @@ private:
     virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
     virtual RenderElement* createRenderer(RenderArena&, RenderStyle&);
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     virtual void svgAttributeChanged(const QualifiedName&);
 
index 094a2c806bbd93a45db4162a44a3290a55f3bb5c..bc0c72fa7968208ff7f06266ed64f88342923a89 100644 (file)
@@ -117,11 +117,11 @@ void SVGScriptElement::svgAttributeChanged(const QualifiedName& attrName)
     ASSERT_NOT_REACHED();
 }
 
-Node::InsertionNotificationRequest SVGScriptElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGScriptElement::insertedInto(ContainerNode& rootParent)
 {
     SVGElement::insertedInto(rootParent);
     ScriptElement::insertedInto(rootParent);
-    if (rootParent->inDocument())
+    if (rootParent.inDocument())
         SVGExternalResourcesRequired::insertedIntoDocument(this);
     return InsertionDone;
 }
index 3793b0f53f026f57ab1889ed0f7ef2de320ecb54..91f7fcf2addc48fe634c6ff85abc2f7373f02c59 100644 (file)
@@ -46,7 +46,7 @@ private:
 
     bool isSupportedAttribute(const QualifiedName&);
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
     virtual void childrenChanged(const ChildChange&) OVERRIDE;
 
     virtual void svgAttributeChanged(const QualifiedName&);
index 1c1de9100085f6f6b944b62d541bf9473d70e66a..dcc8699c7c951bbdee197d341316fcf8a801cfeb 100644 (file)
@@ -140,18 +140,18 @@ void SVGStyleElement::finishParsingChildren()
     SVGElement::finishParsingChildren();
 }
 
-Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGStyleElement::insertedInto(ContainerNode& rootParent)
 {
     SVGElement::insertedInto(rootParent);
-    if (rootParent->inDocument())
+    if (rootParent.inDocument())
         m_styleSheetOwner.insertedIntoDocument(document(), *this);
     return InsertionDone;
 }
 
-void SVGStyleElement::removedFrom(ContainerNode* rootParent)
+void SVGStyleElement::removedFrom(ContainerNode& rootParent)
 {
     SVGElement::removedFrom(rootParent);
-    if (rootParent->inDocument())
+    if (rootParent.inDocument())
         m_styleSheetOwner.removedFromDocument(document(), *this);
 }
 
index af8b89fbaef2555c348f22fcbd81be737a2ff229..db6fa1f5cf150ea96fc7e1fb1672466a3b87078e 100644 (file)
@@ -52,8 +52,8 @@ private:
 
     bool isSupportedAttribute(const QualifiedName&);
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual void childrenChanged(const ChildChange&) OVERRIDE;
 
     virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE { return false; }
index a0d4a3c219a1f9be3bae8642c4d8b5a298d68bca..b4e64bc7bd1c3e7892e29c685217150d881e9468 100644 (file)
@@ -275,18 +275,18 @@ void SVGTRefElement::buildPendingResource()
     updateReferencedText(target.get());
 }
 
-Node::InsertionNotificationRequest SVGTRefElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGTRefElement::insertedInto(ContainerNode& rootParent)
 {
     SVGElement::insertedInto(rootParent);
-    if (rootParent->inDocument())
+    if (rootParent.inDocument())
         buildPendingResource();
     return InsertionDone;
 }
 
-void SVGTRefElement::removedFrom(ContainerNode* rootParent)
+void SVGTRefElement::removedFrom(ContainerNode& rootParent)
 {
     SVGElement::removedFrom(rootParent);
-    if (rootParent->inDocument())
+    if (rootParent.inDocument())
         m_targetListener->detach();
 }
 
index a5af1d47ffa698ba8ba1aff7baf945a17fe76442..f00cdd27b65d616971b014fe1143852623ffdf51 100644 (file)
@@ -48,8 +48,8 @@ private:
     virtual bool childShouldCreateRenderer(const Node*) const;
     virtual bool rendererIsNeeded(const RenderStyle&);
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     void updateReferencedText(Element*);
 
index 5b18c5e684b6098de0018cd4fc6792455ebcf0aa..a3c8d1fc063193dbb4ea06e301ca12e1acbec876 100644 (file)
@@ -177,17 +177,17 @@ void SVGTextPathElement::buildPendingResource()
     }
 }
 
-Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNode& rootParent)
 {
     SVGTextContentElement::insertedInto(rootParent);
     buildPendingResource();
     return InsertionDone;
 }
 
-void SVGTextPathElement::removedFrom(ContainerNode* rootParent)
+void SVGTextPathElement::removedFrom(ContainerNode& rootParent)
 {
     SVGTextContentElement::removedFrom(rootParent);
-    if (rootParent->inDocument())
+    if (rootParent.inDocument())
         clearResourceReferences();
 }
 
index 932ad768eb5b7040eb412349f77ca641ebec94fe..1ab47cf1ffb83a2d980ab1ab1ffc916b3d605468 100644 (file)
@@ -120,8 +120,8 @@ private:
     void clearResourceReferences();
 
     virtual void buildPendingResource();
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     bool isSupportedAttribute(const QualifiedName&);
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
index 3b3bc8746c08d9a18b160b8d5f20d259345e3cb6..62c634922001cba0577e75cfeea30fe7e3655f6e 100644 (file)
@@ -38,10 +38,10 @@ PassRefPtr<SVGTitleElement> SVGTitleElement::create(const QualifiedName& tagName
     return adoptRef(new SVGTitleElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest SVGTitleElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGTitleElement::insertedInto(ContainerNode& rootParent)
 {
     SVGElement::insertedInto(rootParent);
-    if (!rootParent->inDocument())
+    if (!rootParent.inDocument())
         return InsertionDone;
     if (firstChild())
         // FIXME: does SVG have a title text direction?
@@ -49,10 +49,10 @@ Node::InsertionNotificationRequest SVGTitleElement::insertedInto(ContainerNode*
     return InsertionDone;
 }
 
-void SVGTitleElement::removedFrom(ContainerNode* rootParent)
+void SVGTitleElement::removedFrom(ContainerNode& rootParent)
 {
     SVGElement::removedFrom(rootParent);
-    if (rootParent->inDocument())
+    if (rootParent.inDocument())
         document().removeTitle(this);
 }
 
index 5eed44c289017a5db43887941ec8ce8e55e836d3..feb101d1ba531b21ede30ea84cc3cdc14316724f 100644 (file)
@@ -34,8 +34,8 @@ public:
 private:
     SVGTitleElement(const QualifiedName&, Document&);
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual void childrenChanged(const ChildChange&) OVERRIDE;
 
     virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
index e21808fccac9b3a94fa324d1143442c3c1bc5d7b..cccae8b3b81f93a8cf78dd6f6a7eecfdded7e79e 100644 (file)
@@ -177,11 +177,11 @@ static inline bool isWellFormedDocument(Document& document)
 }
 #endif
 
-Node::InsertionNotificationRequest SVGUseElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGUseElement::insertedInto(ContainerNode& rootParent)
 {
     // This functions exists to assure assumptions made in the code regarding SVGElementInstance creation/destruction are satisfied.
     SVGGraphicsElement::insertedInto(rootParent);
-    if (!rootParent->inDocument())
+    if (!rootParent.inDocument())
         return InsertionDone;
     ASSERT(!m_targetElementInstance || !isWellFormedDocument(document()));
     ASSERT(!hasPendingResources() || !isWellFormedDocument(document()));
@@ -191,10 +191,10 @@ Node::InsertionNotificationRequest SVGUseElement::insertedInto(ContainerNode* ro
     return InsertionDone;
 }
 
-void SVGUseElement::removedFrom(ContainerNode* rootParent)
+void SVGUseElement::removedFrom(ContainerNode& rootParent)
 {
     SVGGraphicsElement::removedFrom(rootParent);
-    if (rootParent->inDocument())
+    if (rootParent.inDocument())
         clearResourceReferences();
 }
 
index 00606abe82984608e3a96d90290c6e3dd6c60820..f2fbfb0cf6c0896718e6d6510a32b15833dc1b76 100644 (file)
@@ -59,8 +59,8 @@ private:
     virtual bool isValid() const { return SVGTests::isValid(); }
     virtual bool supportsFocus() const OVERRIDE { return true; }
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     virtual void buildPendingResource();
 
     bool isSupportedAttribute(const QualifiedName&);
index ff33ff059ef66a555eb6cf0ffe42094705cf6a37..44e09fd79b44c9e3c4158cea8212eecd9149fbdb 100644 (file)
@@ -40,9 +40,9 @@ PassRefPtr<SVGVKernElement> SVGVKernElement::create(const QualifiedName& tagName
     return adoptRef(new SVGVKernElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest SVGVKernElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGVKernElement::insertedInto(ContainerNode& rootParent)
 {
-    if (rootParent->inDocument()) {
+    if (rootParent.inDocument()) {
         ContainerNode* fontNode = parentNode();
         if (fontNode && isSVGFontElement(fontNode))
             toSVGFontElement(fontNode)->invalidateGlyphCache();
@@ -51,7 +51,7 @@ Node::InsertionNotificationRequest SVGVKernElement::insertedInto(ContainerNode*
     return SVGElement::insertedInto(rootParent);
 }
 
-void SVGVKernElement::removedFrom(ContainerNode* rootParent)
+void SVGVKernElement::removedFrom(ContainerNode& rootParent)
 {
     ContainerNode* fontNode = parentNode();
     if (fontNode && isSVGFontElement(fontNode))
index 74a29938a86dc0b923f876889e7301ecb10d1b94..69ca7822af863d09e4d0c8726acd202c2c4639a6 100644 (file)
@@ -35,8 +35,8 @@ public:
 private:
     SVGVKernElement(const QualifiedName&, Document&);
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
 
     virtual bool rendererIsNeeded(const RenderStyle&) { return false; }
 };
index 462aa9236622c9e6ffdee50ed37e6f90391468a6..2102dae379d168108a82c8ef7af4d5e045a61450 100644 (file)
@@ -234,10 +234,10 @@ void SVGSMILElement::reset()
     resolveFirstInterval();
 }
 
-Node::InsertionNotificationRequest SVGSMILElement::insertedInto(ContainerNode* rootParent)
+Node::InsertionNotificationRequest SVGSMILElement::insertedInto(ContainerNode& rootParent)
 {
     SVGElement::insertedInto(rootParent);
-    if (!rootParent->inDocument())
+    if (!rootParent.inDocument())
         return InsertionDone;
 
     // Verify we are not in <use> instance tree.
@@ -267,9 +267,9 @@ Node::InsertionNotificationRequest SVGSMILElement::insertedInto(ContainerNode* r
     return InsertionDone;
 }
 
-void SVGSMILElement::removedFrom(ContainerNode* rootParent)
+void SVGSMILElement::removedFrom(ContainerNode& rootParent)
 {
-    if (rootParent->inDocument()) {
+    if (rootParent.inDocument()) {
         clearResourceReferences();
         disconnectConditions();
         setTargetElement(0);
index fb1d25e0549e86423ef0c6890b8ea79e9df5e04b..30fd7cdb09b59bc86eb4791ed25e146b128b9015 100644 (file)
@@ -47,8 +47,8 @@ public:
     bool isSupportedAttribute(const QualifiedName&);
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
     virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
-    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
-    virtual void removedFrom(ContainerNode*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode&) OVERRIDE;
+    virtual void removedFrom(ContainerNode&) OVERRIDE;
     
     virtual bool hasValidAttributeType() = 0;
     virtual bool hasValidAttributeName();