Rename insertedInto and removedFrom to insertedIntoAncestor and removedFromAncestor
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Oct 2017 00:49:21 +0000 (00:49 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Oct 2017 00:49:21 +0000 (00:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=178605

Reviewed by Andy Estes.

Renamed insertedInto and removedFrom to insertedIntoAncestor and removedFromAncestor respectively
to make it clear that these functions can be called even when node's immediate parent didn't change.

* dom/ContainerNodeAlgorithms.cpp:
(WebCore::notifyNodeInsertedIntoDocument):
(WebCore::notifyNodeInsertedIntoTree):
(WebCore::notifyNodeRemovedFromDocument):
(WebCore::notifyNodeRemovedFromTree):
(WebCore::notifyChildNodeRemoved):
* dom/ContainerNodeAlgorithms.h:
* dom/Element.cpp:
(WebCore::Element::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::Element::removedFromAncestor): Renamed from removedFrom.
* dom/Element.h:
* dom/Node.cpp:
(WebCore::Node::insertedIntoAncestor):
(WebCore::Node::removedFromAncestor):
(WebCore::Node::removedFrom): Deleted.
* dom/Node.h:
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::ProcessingInstruction::removedFromAncestor): Renamed from removedFrom.
* dom/ProcessingInstruction.h:
* dom/ScriptElement.h:
(WebCore::ScriptElement::insertedIntoAncestor const): Renamed from insertedInto.
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::ShadowRoot::removedFromAncestor): Renamed from removedFrom.
* dom/ShadowRoot.h:
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::FormAssociatedElement::removedFromAncestor): Renamed from removedFrom.
* html/FormAssociatedElement.h:
* html/HTMLBaseElement.cpp:
(WebCore::HTMLBaseElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLBaseElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLBaseElement.h:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedIntoAncestor): Renamed from insertedInto.
* html/HTMLBodyElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLFormControlElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLFormControlElement.h:
* html/HTMLFormControlElementWithState.cpp:
(WebCore::HTMLFormControlElementWithState::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLFormControlElementWithState::removedFromAncestor): Renamed from removedFrom.
* html/HTMLFormControlElementWithState.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLFormElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLFormElement.h:
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::insertedIntoAncestor): Renamed from insertedInto.
* html/HTMLFrameElementBase.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLFrameSetElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLFrameSetElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLImageElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLInputElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLInputElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLLinkElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLLinkElement.h:
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLMapElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLMapElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLMediaElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLMediaElement.h:
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::insertedIntoAncestor): Renamed from insertedInto.
* html/HTMLMetaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLObjectElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLObjectElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::insertedIntoAncestor): Renamed from insertedInto.
* html/HTMLOptionElement.h:
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::insertedIntoAncestor): Renamed from insertedInto.
* html/HTMLScriptElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::insertedIntoAncestor): Renamed from insertedInto.
* html/HTMLSelectElement.h:
* html/HTMLSlotElement.cpp:
(WebCore::HTMLSlotElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLSlotElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLSlotElement.h:
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLSourceElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLSourceElement.h:
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLStyleElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLStyleElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::insertedIntoAncestor): Renamed from insertedInto.
* html/HTMLTextFormControlElement.h:
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLTitleElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLTitleElement.h:
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::HTMLTrackElement::removedFromAncestor): Renamed from removedFrom.
* html/HTMLTrackElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::removedFromAncestor): Renamed from removedFrom.
(WebCore::SVGElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGElement::updateRelativeLengthsInformation):
* svg/SVGElement.h:
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGFEImageElement::removedFromAncestor): Renamed from removedFrom.
* svg/SVGFEImageElement.h:
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGFontFaceElement::removedFromAncestor): Renamed from removedFrom.
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::insertedIntoAncestor): Renamed from insertedInto.
* svg/SVGFontFaceUriElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::insertedIntoAncestor): Renamed from insertedInto.
* svg/SVGImageElement.h:
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGMPathElement::removedFromAncestor): Renamed from removedFrom.
* svg/SVGMPathElement.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGPathElement::removedFromAncestor): Renamed from removedFrom.
* svg/SVGPathElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGSVGElement::removedFromAncestor): Renamed from removedFrom.
* svg/SVGSVGElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::insertedIntoAncestor): Renamed from insertedInto.
* svg/SVGScriptElement.h:
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGStyleElement::removedFromAncestor): Renamed from removedFrom.
* svg/SVGStyleElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::buildPendingResource):
(WebCore::SVGTRefElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGTRefElement::removedFromAncestor): Renamed from removedFrom.
* svg/SVGTRefElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGTextPathElement::removedFromAncestor): Renamed from removedFrom.
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGTitleElement::removedFromAncestor): Renamed from removedFrom.
* svg/SVGTitleElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGUseElement::removedFromAncestor): Renamed from removedFrom.
* svg/SVGUseElement.h:
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::insertedIntoAncestor): Renamed from insertedInto.
(WebCore::SVGSMILElement::removedFromAncestor): Renamed from removedFrom.
* svg/animation/SVGSMILElement.h:

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

90 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/ContainerNodeAlgorithms.cpp
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.h
Source/WebCore/dom/ShadowRoot.cpp
Source/WebCore/dom/ShadowRoot.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/HTMLScriptElement.cpp
Source/WebCore/html/HTMLScriptElement.h
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLSelectElement.h
Source/WebCore/html/HTMLSlotElement.cpp
Source/WebCore/html/HTMLSlotElement.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/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/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/animation/SVGSMILElement.cpp
Source/WebCore/svg/animation/SVGSMILElement.h

index 4a1bbca..9f1ba83 100644 (file)
@@ -1,5 +1,190 @@
 2017-10-20  Ryosuke Niwa  <rniwa@webkit.org>
 
+        Rename insertedInto and removedFrom to insertedIntoAncestor and removedFromAncestor
+        https://bugs.webkit.org/show_bug.cgi?id=178605
+
+        Reviewed by Andy Estes.
+
+        Renamed insertedInto and removedFrom to insertedIntoAncestor and removedFromAncestor respectively
+        to make it clear that these functions can be called even when node's immediate parent didn't change.
+
+        * dom/ContainerNodeAlgorithms.cpp:
+        (WebCore::notifyNodeInsertedIntoDocument):
+        (WebCore::notifyNodeInsertedIntoTree):
+        (WebCore::notifyNodeRemovedFromDocument):
+        (WebCore::notifyNodeRemovedFromTree):
+        (WebCore::notifyChildNodeRemoved):
+        * dom/ContainerNodeAlgorithms.h:
+        * dom/Element.cpp:
+        (WebCore::Element::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::Element::removedFromAncestor): Renamed from removedFrom.
+        * dom/Element.h:
+        * dom/Node.cpp:
+        (WebCore::Node::insertedIntoAncestor): 
+        (WebCore::Node::removedFromAncestor):
+        (WebCore::Node::removedFrom): Deleted.
+        * dom/Node.h:
+        * dom/ProcessingInstruction.cpp:
+        (WebCore::ProcessingInstruction::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::ProcessingInstruction::removedFromAncestor): Renamed from removedFrom.
+        * dom/ProcessingInstruction.h:
+        * dom/ScriptElement.h:
+        (WebCore::ScriptElement::insertedIntoAncestor const): Renamed from insertedInto.
+        * dom/ShadowRoot.cpp:
+        (WebCore::ShadowRoot::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::ShadowRoot::removedFromAncestor): Renamed from removedFrom.
+        * dom/ShadowRoot.h:
+        * html/FormAssociatedElement.cpp:
+        (WebCore::FormAssociatedElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::FormAssociatedElement::removedFromAncestor): Renamed from removedFrom.
+        * html/FormAssociatedElement.h:
+        * html/HTMLBaseElement.cpp:
+        (WebCore::HTMLBaseElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLBaseElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLBaseElement.h:
+        * html/HTMLBodyElement.cpp:
+        (WebCore::HTMLBodyElement::insertedIntoAncestor): Renamed from insertedInto.
+        * html/HTMLBodyElement.h:
+        * html/HTMLFormControlElement.cpp:
+        (WebCore::HTMLFormControlElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLFormControlElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLFormControlElement.h:
+        * html/HTMLFormControlElementWithState.cpp:
+        (WebCore::HTMLFormControlElementWithState::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLFormControlElementWithState::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLFormControlElementWithState.h:
+        * html/HTMLFormElement.cpp:
+        (WebCore::HTMLFormElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLFormElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLFormElement.h:
+        * html/HTMLFrameElementBase.cpp:
+        (WebCore::HTMLFrameElementBase::insertedIntoAncestor): Renamed from insertedInto.
+        * html/HTMLFrameElementBase.h:
+        * html/HTMLFrameSetElement.cpp:
+        (WebCore::HTMLFrameSetElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLFrameSetElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLFrameSetElement.h:
+        * html/HTMLImageElement.cpp:
+        (WebCore::HTMLImageElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLImageElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLImageElement.h:
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLInputElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLInputElement.h:
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLLinkElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLLinkElement.h:
+        * html/HTMLMapElement.cpp:
+        (WebCore::HTMLMapElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLMapElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLMapElement.h:
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLMediaElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLMediaElement.h:
+        * html/HTMLMetaElement.cpp:
+        (WebCore::HTMLMetaElement::insertedIntoAncestor): Renamed from insertedInto.
+        * html/HTMLMetaElement.h:
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLObjectElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLObjectElement.h:
+        * html/HTMLOptionElement.cpp:
+        (WebCore::HTMLOptionElement::insertedIntoAncestor): Renamed from insertedInto.
+        * html/HTMLOptionElement.h:
+        * html/HTMLScriptElement.cpp:
+        (WebCore::HTMLScriptElement::insertedIntoAncestor): Renamed from insertedInto.
+        * html/HTMLScriptElement.h:
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::insertedIntoAncestor): Renamed from insertedInto.
+        * html/HTMLSelectElement.h:
+        * html/HTMLSlotElement.cpp:
+        (WebCore::HTMLSlotElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLSlotElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLSlotElement.h:
+        * html/HTMLSourceElement.cpp:
+        (WebCore::HTMLSourceElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLSourceElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLSourceElement.h:
+        * html/HTMLStyleElement.cpp:
+        (WebCore::HTMLStyleElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLStyleElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLStyleElement.h:
+        * html/HTMLTextFormControlElement.cpp:
+        (WebCore::HTMLTextFormControlElement::insertedIntoAncestor): Renamed from insertedInto.
+        * html/HTMLTextFormControlElement.h:
+        * html/HTMLTitleElement.cpp:
+        (WebCore::HTMLTitleElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLTitleElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLTitleElement.h:
+        * html/HTMLTrackElement.cpp:
+        (WebCore::HTMLTrackElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::HTMLTrackElement::removedFromAncestor): Renamed from removedFrom.
+        * html/HTMLTrackElement.h:
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::removedFromAncestor): Renamed from removedFrom.
+        (WebCore::SVGElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::SVGElement::updateRelativeLengthsInformation):
+        * svg/SVGElement.h:
+        * svg/SVGFEImageElement.cpp:
+        (WebCore::SVGFEImageElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::SVGFEImageElement::removedFromAncestor): Renamed from removedFrom.
+        * svg/SVGFEImageElement.h:
+        * svg/SVGFontFaceElement.cpp:
+        (WebCore::SVGFontFaceElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::SVGFontFaceElement::removedFromAncestor): Renamed from removedFrom.
+        * svg/SVGFontFaceElement.h:
+        * svg/SVGFontFaceUriElement.cpp:
+        (WebCore::SVGFontFaceUriElement::insertedIntoAncestor): Renamed from insertedInto.
+        * svg/SVGFontFaceUriElement.h:
+        * svg/SVGImageElement.cpp:
+        (WebCore::SVGImageElement::insertedIntoAncestor): Renamed from insertedInto.
+        * svg/SVGImageElement.h:
+        * svg/SVGMPathElement.cpp:
+        (WebCore::SVGMPathElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::SVGMPathElement::removedFromAncestor): Renamed from removedFrom.
+        * svg/SVGMPathElement.h:
+        * svg/SVGPathElement.cpp:
+        (WebCore::SVGPathElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::SVGPathElement::removedFromAncestor): Renamed from removedFrom.
+        * svg/SVGPathElement.h:
+        * svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::SVGSVGElement::removedFromAncestor): Renamed from removedFrom.
+        * svg/SVGSVGElement.h:
+        * svg/SVGScriptElement.cpp:
+        (WebCore::SVGScriptElement::insertedIntoAncestor): Renamed from insertedInto.
+        * svg/SVGScriptElement.h:
+        * svg/SVGStyleElement.cpp:
+        (WebCore::SVGStyleElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::SVGStyleElement::removedFromAncestor): Renamed from removedFrom.
+        * svg/SVGStyleElement.h:
+        * svg/SVGTRefElement.cpp:
+        (WebCore::SVGTRefElement::buildPendingResource):
+        (WebCore::SVGTRefElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::SVGTRefElement::removedFromAncestor): Renamed from removedFrom.
+        * svg/SVGTRefElement.h:
+        * svg/SVGTextPathElement.cpp:
+        (WebCore::SVGTextPathElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::SVGTextPathElement::removedFromAncestor): Renamed from removedFrom.
+        * svg/SVGTextPathElement.h:
+        * svg/SVGTitleElement.cpp:
+        (WebCore::SVGTitleElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::SVGTitleElement::removedFromAncestor): Renamed from removedFrom.
+        * svg/SVGTitleElement.h:
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::SVGUseElement::removedFromAncestor): Renamed from removedFrom.
+        * svg/SVGUseElement.h:
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::SVGSMILElement::insertedIntoAncestor): Renamed from insertedInto.
+        (WebCore::SVGSMILElement::removedFromAncestor): Renamed from removedFrom.
+        * svg/animation/SVGSMILElement.h:
+
+2017-10-20  Ryosuke Niwa  <rniwa@webkit.org>
+
         Fix conditions in HTMLSourceElement and HTMLTrackElement's insertedInto and removedFrom
         https://bugs.webkit.org/show_bug.cgi?id=178607
 
index b1cbf7e..07d8b46 100644 (file)
@@ -41,7 +41,7 @@ static void notifyNodeInsertedIntoDocument(ContainerNode& parentOfInsertedTree,
 {
     ASSERT(parentOfInsertedTree.isConnected());
     ASSERT(!node.isConnected());
-    if (node.insertedInto(Node::InsertionType { /* connectedToDocument */ true, treeScopeChange == TreeScopeChange::Changed }, parentOfInsertedTree) == Node::InsertedIntoResult::NeedsPostInsertionCallback)
+    if (node.insertedIntoAncestor(Node::InsertionType { /* connectedToDocument */ true, treeScopeChange == TreeScopeChange::Changed }, parentOfInsertedTree) == Node::InsertedIntoAncestorResult::NeedsPostInsertionCallback)
         postInsertionNotificationTargets.append(node);
 
     if (!is<ContainerNode>(node))
@@ -66,7 +66,7 @@ static void notifyNodeInsertedIntoTree(ContainerNode& parentOfInsertedTree, Node
     ASSERT(!parentOfInsertedTree.isConnected());
     ASSERT(!node.isConnected());
 
-    if (node.insertedInto(Node::InsertionType { /* connectedToDocument */ false, treeScopeChange == TreeScopeChange::Changed }, parentOfInsertedTree) == Node::InsertedIntoResult::NeedsPostInsertionCallback)
+    if (node.insertedIntoAncestor(Node::InsertionType { /* connectedToDocument */ false, treeScopeChange == TreeScopeChange::Changed }, parentOfInsertedTree) == Node::InsertedIntoAncestorResult::NeedsPostInsertionCallback)
         postInsertionNotificationTargets.append(node);
 
     if (!is<ContainerNode>(node))
@@ -103,18 +103,18 @@ NodeVector notifyChildNodeInserted(ContainerNode& parentOfInsertedTree, Node& no
     return postInsertionNotificationTargets;
 }
 
-static void notifyNodeRemovedFromDocument(ContainerNode& parentOfRemovedTree, TreeScopeChange treeScopeChange, Node& node)
+static void notifyNodeRemovedFromDocument(ContainerNode& oldParentOfRemovedTree, TreeScopeChange treeScopeChange, Node& node)
 {
-    ASSERT(parentOfRemovedTree.isConnected());
+    ASSERT(oldParentOfRemovedTree.isConnected());
     ASSERT(node.isConnected());
-    node.removedFrom(Node::RemovalType { /* disconnectedFromDocument */ true, treeScopeChange == TreeScopeChange::Changed }, parentOfRemovedTree);
+    node.removedFromAncestor(Node::RemovalType { /* disconnectedFromDocument */ true, treeScopeChange == TreeScopeChange::Changed }, oldParentOfRemovedTree);
 
     if (!is<ContainerNode>(node))
         return;
 
     for (RefPtr<Node> child = downcast<ContainerNode>(node).firstChild(); child; child = child->nextSibling()) {
         RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!node.isConnected() && child->parentNode() == &node);
-        notifyNodeRemovedFromDocument(parentOfRemovedTree, treeScopeChange, *child.get());
+        notifyNodeRemovedFromDocument(oldParentOfRemovedTree, treeScopeChange, *child.get());
     }
 
     if (!is<Element>(node))
@@ -122,39 +122,39 @@ static void notifyNodeRemovedFromDocument(ContainerNode& parentOfRemovedTree, Tr
 
     if (RefPtr<ShadowRoot> root = downcast<Element>(node).shadowRoot()) {
         RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!node.isConnected() && root->host() == &node);
-        notifyNodeRemovedFromDocument(parentOfRemovedTree, TreeScopeChange::DidNotChange, *root.get());
+        notifyNodeRemovedFromDocument(oldParentOfRemovedTree, TreeScopeChange::DidNotChange, *root.get());
     }
 }
 
-static void notifyNodeRemovedFromTree(ContainerNode& parentOfRemovedTree, TreeScopeChange treeScopeChange, Node& node)
+static void notifyNodeRemovedFromTree(ContainerNode& oldParentOfRemovedTree, TreeScopeChange treeScopeChange, Node& node)
 {
-    ASSERT(!parentOfRemovedTree.isConnected());
+    ASSERT(!oldParentOfRemovedTree.isConnected());
 
-    node.removedFrom(Node::RemovalType { /* disconnectedFromDocument */ false, treeScopeChange == TreeScopeChange::Changed }, parentOfRemovedTree);
+    node.removedFromAncestor(Node::RemovalType { /* disconnectedFromDocument */ false, treeScopeChange == TreeScopeChange::Changed }, oldParentOfRemovedTree);
 
     if (!is<ContainerNode>(node))
         return;
 
     for (RefPtr<Node> child = downcast<ContainerNode>(node).firstChild(); child; child = child->nextSibling())
-        notifyNodeRemovedFromTree(parentOfRemovedTree, treeScopeChange, *child);
+        notifyNodeRemovedFromTree(oldParentOfRemovedTree, treeScopeChange, *child);
 
     if (!is<Element>(node))
         return;
 
     if (RefPtr<ShadowRoot> root = downcast<Element>(node).shadowRoot())
-        notifyNodeRemovedFromTree(parentOfRemovedTree, TreeScopeChange::DidNotChange, *root);
+        notifyNodeRemovedFromTree(oldParentOfRemovedTree, TreeScopeChange::DidNotChange, *root);
 }
 
-void notifyChildNodeRemoved(ContainerNode& parentOfRemovedTree, Node& child)
+void notifyChildNodeRemoved(ContainerNode& oldParentOfRemovedTree, Node& child)
 {
     NoEventDispatchAssertion assertNoEventDispatch;
 
     // Tree scope has changed if the container node from which "node" is removed is in a document or a shadow root.
-    auto treeScopeChange = parentOfRemovedTree.isInTreeScope() ? TreeScopeChange::Changed : TreeScopeChange::DidNotChange;
+    auto treeScopeChange = oldParentOfRemovedTree.isInTreeScope() ? TreeScopeChange::Changed : TreeScopeChange::DidNotChange;
     if (child.isConnected())
-        notifyNodeRemovedFromDocument(parentOfRemovedTree, treeScopeChange, child);
+        notifyNodeRemovedFromDocument(oldParentOfRemovedTree, treeScopeChange, child);
     else
-        notifyNodeRemovedFromTree(parentOfRemovedTree, treeScopeChange, child);
+        notifyNodeRemovedFromTree(oldParentOfRemovedTree, treeScopeChange, child);
 }
 
 void addChildNodesToDeletionQueue(Node*& head, Node*& tail, ContainerNode& container)
index 7417626..1dd2279 100644 (file)
@@ -27,7 +27,7 @@
 namespace WebCore {
 
 NodeVector notifyChildNodeInserted(ContainerNode& parentOfInsertedTree, Node&);
-void notifyChildNodeRemoved(ContainerNode& parentOfRemovedTree, Node&);
+void notifyChildNodeRemoved(ContainerNode& oldParentOfRemovedTree, Node&);
 void removeDetachedChildrenInContainer(ContainerNode&);
 
 enum SubframeDisconnectPolicy {
index 190934f..c5d7130 100644 (file)
@@ -1629,9 +1629,9 @@ RenderPtr<RenderElement> Element::createElementRenderer(RenderStyle&& style, con
     return RenderElement::createFor(*this, WTFMove(style));
 }
 
-Node::InsertedIntoResult Element::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult Element::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    ContainerNode::insertedInto(insertionType, parentOfInsertedTree);
+    ContainerNode::insertedIntoAncestor(insertionType, parentOfInsertedTree);
 
 #if ENABLE(FULLSCREEN_API)
     if (containsFullScreenElement() && parentElement() && !parentElement()->containsFullScreenElement())
@@ -1644,7 +1644,7 @@ Node::InsertedIntoResult Element::insertedInto(InsertionType insertionType, Cont
     }
 
     if (!parentOfInsertedTree.isInTreeScope())
-        return InsertedIntoResult::Done;
+        return InsertedIntoAncestorResult::Done;
 
     bool becomeConnected = insertionType.connectedToDocument;
     TreeScope* newScope = &parentOfInsertedTree.treeScope();
@@ -1680,10 +1680,10 @@ Node::InsertedIntoResult Element::insertedInto(InsertionType insertionType, Cont
             CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded(*this);
     }
 
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void Element::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void Element::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
 #if ENABLE(FULLSCREEN_API)
     if (containsFullScreenElement())
@@ -1696,8 +1696,8 @@ void Element::removedFrom(RemovalType removalType, ContainerNode& parentOfRemove
 
     setSavedLayerScrollPosition(ScrollPosition());
 
-    if (parentOfRemovedTree.isInTreeScope()) {
-        TreeScope* oldScope = &parentOfRemovedTree.treeScope();
+    if (oldParentOfRemovedTree.isInTreeScope()) {
+        TreeScope* oldScope = &oldParentOfRemovedTree.treeScope();
         Document* oldDocument = removalType.disconnectedFromDocument ? &oldScope->documentScope() : nullptr;
         HTMLDocument* oldHTMLDocument = oldDocument && is<HTMLDocument>(*oldDocument) ? &downcast<HTMLDocument>(*oldDocument) : nullptr;
         if (!removalType.treeScopeChanged)
@@ -1734,11 +1734,11 @@ void Element::removedFrom(RemovalType removalType, ContainerNode& parentOfRemove
     }
 
     if (!parentNode()) {
-        if (auto* shadowRoot = parentOfRemovedTree.shadowRoot())
+        if (auto* shadowRoot = oldParentOfRemovedTree.shadowRoot())
             shadowRoot->hostChildElementDidChange(*this);
     }
 
-    ContainerNode::removedFrom(removalType, parentOfRemovedTree);
+    ContainerNode::removedFromAncestor(removalType, oldParentOfRemovedTree);
 
     if (hasPendingResources())
         document().accessSVGExtensions().removeElementFromPendingResources(this);
index d78b73e..bd4d621 100644 (file)
@@ -551,8 +551,8 @@ public:
 protected:
     Element(const QualifiedName&, Document&, ConstructionType);
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
-    void removedFrom(RemovalType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode&) override;
     void childrenChanged(const ChildChange&) override;
     void removeAllEventListeners() final;
     virtual void parserDidSetAttributes();
index 4a6335d..20f84ab 100644 (file)
@@ -1241,7 +1241,7 @@ Node& Node::getRootNode(const GetRootNodeOptions& options) const
     return options.composed ? shadowIncludingRoot() : rootNode();
 }
 
-Node::InsertedIntoResult Node::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult Node::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
     if (insertionType.connectedToDocument)
         setFlag(IsConnectedFlag);
@@ -1250,10 +1250,10 @@ Node::InsertedIntoResult Node::insertedInto(InsertionType insertionType, Contain
 
     invalidateStyle(Style::Validity::SubtreeAndRenderersInvalid);
 
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void Node::removedFrom(RemovalType removalType, ContainerNode&)
+void Node::removedFromAncestor(RemovalType removalType, ContainerNode&)
 {
     if (removalType.disconnectedFromDocument)
         clearFlag(IsConnectedFlag);
index fd02756..61f866c 100644 (file)
@@ -433,7 +433,7 @@ public:
 
     virtual const RenderStyle* computedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO);
 
-    enum class InsertedIntoResult {
+    enum class InsertedIntoAncestorResult {
         Done,
         NeedsPostInsertionCallback,
     };
@@ -450,7 +450,7 @@ public:
     };
     // Called *after* this node or its ancestor is inserted into a new parent (may or may not be a part of document) by scripts or parser.
     // insertedInto **MUST NOT** invoke scripts. Return NeedsPostInsertionCallback and implement didFinishInsertingNode instead to run scripts.
-    virtual InsertedIntoResult insertedInto(InsertionType, ContainerNode& parentOfInsertedTree);
+    virtual InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode& parentOfInsertedTree);
     virtual void didFinishInsertingNode() { }
 
     struct RemovalType {
@@ -463,7 +463,7 @@ public:
         bool disconnectedFromDocument { false };
         bool treeScopeChanged { false };
     };
-    virtual void removedFrom(RemovalType, ContainerNode& parentOfRemovedTree);
+    virtual void removedFromAncestor(RemovalType, ContainerNode& oldParentOfRemovedTree);
 
 #if ENABLE(TREE_DEBUGGING)
     virtual void formatForDebugger(char* buffer, unsigned length) const;
index fb03851..758dcc2 100644 (file)
@@ -274,13 +274,13 @@ void ProcessingInstruction::addSubresourceAttributeURLs(ListHashSet<URL>& urls)
     addSubresourceURL(urls, sheet()->baseURL());
 }
 
-Node::InsertedIntoResult ProcessingInstruction::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult ProcessingInstruction::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    CharacterData::insertedInto(insertionType, parentOfInsertedTree);
+    CharacterData::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (!insertionType.connectedToDocument)
-        return InsertedIntoResult::Done;
+        return InsertedIntoAncestorResult::Done;
     document().styleScope().addStyleSheetCandidateNode(*this, m_createdByParser);
-    return InsertedIntoResult::NeedsPostInsertionCallback;
+    return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
 }
 
 void ProcessingInstruction::didFinishInsertingNode()
@@ -288,9 +288,9 @@ void ProcessingInstruction::didFinishInsertingNode()
     checkStyleSheet();
 }
 
-void ProcessingInstruction::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void ProcessingInstruction::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    CharacterData::removedFrom(removalType, parentOfRemovedTree);
+    CharacterData::removedFromAncestor(removalType, oldParentOfRemovedTree);
     if (!removalType.disconnectedFromDocument)
         return;
     
index 6b2d8ba..c4b7cf2 100644 (file)
@@ -58,9 +58,9 @@ private:
     NodeType nodeType() const override;
     Ref<Node> cloneNodeInternal(Document&, CloningOperation) override;
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
     void didFinishInsertingNode() override;
-    void removedFrom(RemovalType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode&) override;
 
     void checkStyleSheet();
     void setCSSStyleSheet(const String& href, const URL& baseURL, const String& charset, const CachedCSSStyleSheet*) override;
index 79e88b8..a61dad4 100644 (file)
@@ -81,11 +81,11 @@ protected:
     bool forceAsync() const { return m_forceAsync; }
 
     // Helper functions used by our parent classes.
-    Node::InsertedIntoResult insertedInto(Node::InsertionType insertionType, ContainerNode&) const
+    Node::InsertedIntoAncestorResult insertedIntoAncestor(Node::InsertionType insertionType, ContainerNode&) const
     {
         if (insertionType.connectedToDocument && !m_parserInserted)
-            return Node::InsertedIntoResult::NeedsPostInsertionCallback;
-        return Node::InsertedIntoResult::Done;
+            return Node::InsertedIntoAncestorResult::NeedsPostInsertionCallback;
+        return Node::InsertedIntoAncestorResult::Done;
     }
 
     void didFinishInsertingNode();
index 2cdbb0f..dd23ba7 100644 (file)
@@ -85,17 +85,17 @@ ShadowRoot::~ShadowRoot()
     removeDetachedChildren();
 }
 
-Node::InsertedIntoResult ShadowRoot::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult ShadowRoot::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    DocumentFragment::insertedInto(insertionType, parentOfInsertedTree);
+    DocumentFragment::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument)
         document().didInsertInDocumentShadowRoot(*this);
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void ShadowRoot::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void ShadowRoot::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    DocumentFragment::removedFrom(removalType, parentOfRemovedTree);
+    DocumentFragment::removedFromAncestor(removalType, oldParentOfRemovedTree);
     if (removalType.disconnectedFromDocument)
         document().didRemoveInDocumentShadowRoot(*this);
 }
index 8d97708..d2a4483 100644 (file)
@@ -94,8 +94,8 @@ private:
 
     Ref<Node> cloneNodeInternal(Document&, CloningOperation) override;
 
-    Node::InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
-    void removedFrom(RemovalType, ContainerNode& insertionPoint) override;
+    Node::InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode& insertionPoint) override;
     void didMoveToNewDocument(Document& oldDocument, Document& newDocument) override;
 
     bool m_resetStyleInheritance { false };
index be8a226..0007066 100644 (file)
@@ -68,7 +68,7 @@ void FormAssociatedElement::didMoveToNewDocument(Document&)
         resetFormAttributeTargetObserver();
 }
 
-void FormAssociatedElement::insertedInto(Node::InsertionType insertionType, ContainerNode&)
+void FormAssociatedElement::insertedIntoAncestor(Node::InsertionType insertionType, ContainerNode&)
 {
     HTMLElement& element = asHTMLElement();
     if (m_formSetByParser) {
@@ -88,7 +88,7 @@ void FormAssociatedElement::insertedInto(Node::InsertionType insertionType, Cont
         resetFormAttributeTargetObserver();
 }
 
-void FormAssociatedElement::removedFrom(Node::RemovalType, ContainerNode&)
+void FormAssociatedElement::removedFromAncestor(Node::RemovalType, ContainerNode&)
 {
     m_formAttributeTargetObserver = nullptr;
 
index bbffc17..d7219fc 100644 (file)
@@ -90,8 +90,8 @@ public:
 protected:
     FormAssociatedElement(HTMLFormElement*);
 
-    void insertedInto(Node::InsertionType, ContainerNode&);
-    void removedFrom(Node::RemovalType, ContainerNode&);
+    void insertedIntoAncestor(Node::InsertionType, ContainerNode&);
+    void removedFromAncestor(Node::RemovalType, ContainerNode&);
     void didMoveToNewDocument(Document& oldDocument);
 
     void setForm(HTMLFormElement*);
index 16dfb96..fcedfa2 100644 (file)
@@ -51,17 +51,17 @@ void HTMLBaseElement::parseAttribute(const QualifiedName& name, const AtomicStri
         HTMLElement::parseAttribute(name, value);
 }
 
-Node::InsertedIntoResult HTMLBaseElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLBaseElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument)
         document().processBaseElement();
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void HTMLBaseElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLBaseElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    HTMLElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
     if (removalType.disconnectedFromDocument)
         document().processBaseElement();
 }
index 16dbd54..0527b32 100644 (file)
@@ -39,8 +39,8 @@ private:
     String target() const final;
     bool isURLAttribute(const Attribute&) const final;
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
 };
 
 } // namespace
index 95a7828..404eebd 100644 (file)
@@ -185,20 +185,20 @@ void HTMLBodyElement::parseAttribute(const QualifiedName& name, const AtomicStri
     HTMLElement::parseAttribute(name, value);
 }
 
-Node::InsertedIntoResult HTMLBodyElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLBodyElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (!insertionType.connectedToDocument)
-        return InsertedIntoResult::Done;
+        return InsertedIntoAncestorResult::Done;
 
     // FIXME: It's surprising this is web compatible since it means a marginwidth and marginheight attribute can
     // magically appear on the <body> of all documents embedded through <iframe> or <frame>.
     // FIXME: Perhaps this code should be in attach() instead of here.
     auto* ownerElement = document().ownerElement();
     if (!is<HTMLFrameElementBase>(ownerElement))
-        return InsertedIntoResult::Done;
+        return InsertedIntoAncestorResult::Done;
 
-    return InsertedIntoResult::NeedsPostInsertionCallback;
+    return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
 }
 
 void HTMLBodyElement::didFinishInsertingNode()
index 1d64495..4965fe2 100644 (file)
@@ -44,7 +44,7 @@ private:
     bool isPresentationAttribute(const QualifiedName&) const final;
     void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) final;
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
     void didFinishInsertingNode() final;
 
     bool isURLAttribute(const Attribute&) const final;
index 12da56b..8697a24 100644 (file)
@@ -274,7 +274,7 @@ static void removeInvalidElementToAncestorFromInsertionPoint(const HTMLFormContr
         ancestor.removeInvalidDescendant(element);
 }
 
-Node::InsertedIntoResult HTMLFormControlElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLFormControlElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
     m_dataListAncestorState = Unknown;
     setNeedsWillValidateCheck();
@@ -282,9 +282,9 @@ Node::InsertedIntoResult HTMLFormControlElement::insertedInto(InsertionType inse
         addInvalidElementToAncestorFromInsertionPoint(*this, &parentOfInsertedTree);
     if (document().hasDisabledFieldsetElement())
         setAncestorDisabled(computeIsDisabledByFieldsetAncestor());
-    HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
-    FormAssociatedElement::insertedInto(insertionType, parentOfInsertedTree);
-    return InsertedIntoResult::NeedsPostInsertionCallback;
+    HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
+    FormAssociatedElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
+    return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
 }
 
 void HTMLFormControlElement::didFinishInsertingNode()
@@ -292,7 +292,7 @@ void HTMLFormControlElement::didFinishInsertingNode()
     resetFormOwner();
 }
 
-void HTMLFormControlElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLFormControlElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
     bool wasMatchingInvalidPseudoClass = willValidate() && !isValidFormControlElement();
 
@@ -300,11 +300,11 @@ void HTMLFormControlElement::removedFrom(RemovalType removalType, ContainerNode&
     if (m_disabledByAncestorFieldset)
         setAncestorDisabled(computeIsDisabledByFieldsetAncestor());
     m_dataListAncestorState = Unknown;
-    HTMLElement::removedFrom(removalType, parentOfRemovedTree);
-    FormAssociatedElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
+    FormAssociatedElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
 
     if (wasMatchingInvalidPseudoClass)
-        removeInvalidElementToAncestorFromInsertionPoint(*this, &parentOfRemovedTree);
+        removeInvalidElementToAncestorFromInsertionPoint(*this, &oldParentOfRemovedTree);
 }
 
 void HTMLFormControlElement::setChangedSinceLastFormControlChangeEvent(bool changed)
index ae5a70a..6fb1b15 100644 (file)
@@ -136,9 +136,9 @@ protected:
     virtual void readOnlyAttributeChanged();
     virtual void requiredAttributeChanged();
     void didAttachRenderers() override;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
     void didFinishInsertingNode() override;
-    void removedFrom(RemovalType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode&) override;
     void didMoveToNewDocument(Document& oldDocument, Document& newDocument) override;
 
     bool supportsFocus() const override;
index 965b2c5..ac3455a 100644 (file)
@@ -38,18 +38,18 @@ HTMLFormControlElementWithState::HTMLFormControlElementWithState(const Qualified
 
 HTMLFormControlElementWithState::~HTMLFormControlElementWithState() = default;
 
-Node::InsertedIntoResult HTMLFormControlElementWithState::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLFormControlElementWithState::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
     if (insertionType.connectedToDocument && !containingShadowRoot())
         document().formController().registerFormElementWithState(this);
-    return HTMLFormControlElement::insertedInto(insertionType, parentOfInsertedTree);
+    return HTMLFormControlElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
 }
 
-void HTMLFormControlElementWithState::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLFormControlElementWithState::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    if (removalType.disconnectedFromDocument && !containingShadowRoot() && !parentOfRemovedTree.containingShadowRoot())
+    if (removalType.disconnectedFromDocument && !containingShadowRoot() && !oldParentOfRemovedTree.containingShadowRoot())
         document().formController().unregisterFormElementWithState(this);
-    HTMLFormControlElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLFormControlElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
 }
 
 bool HTMLFormControlElementWithState::shouldAutocomplete() const
index 712d1d2..1aa4ce0 100644 (file)
@@ -45,8 +45,8 @@ protected:
 
     virtual bool shouldAutocomplete() const;
     void finishParsingChildren() override;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
-    void removedFrom(RemovalType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode&) override;
     bool isFormControlElementWithState() const override;
 };
 
index dd42d4c..c5d2b76 100644 (file)
@@ -121,21 +121,21 @@ bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style)
     return formIsTablePart;
 }
 
-Node::InsertedIntoResult HTMLFormElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLFormElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument)
         document().didAssociateFormControl(this);
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void HTMLFormElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLFormElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
     Node& root = traverseToRootNode(); // Do not rely on rootNode() because our IsInTreeScope is outdated.
     Vector<FormAssociatedElement*> associatedElements(m_associatedElements);
     for (auto& associatedElement : associatedElements)
         associatedElement->formOwnerRemovedFromTree(root);
-    HTMLElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
 }
 
 void HTMLFormElement::handleLocalEvents(Event& event)
index 5d4fb1f..56ad807 100644 (file)
@@ -124,8 +124,8 @@ private:
     HTMLFormElement(const QualifiedName&, Document&);
 
     bool rendererIsNeeded(const RenderStyle&) final;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
     void finishParsingChildren() final;
 
     void handleLocalEvents(Event&) final;
index d4d539b..a6e824a 100644 (file)
@@ -138,12 +138,12 @@ void HTMLFrameElementBase::setNameAndOpenURL()
     openURL();
 }
 
-Node::InsertedIntoResult HTMLFrameElementBase::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLFrameElementBase::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    HTMLFrameOwnerElement::insertedInto(insertionType, parentOfInsertedTree);
+    HTMLFrameOwnerElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument)
-        return InsertedIntoResult::NeedsPostInsertionCallback;
-    return InsertedIntoResult::Done;
+        return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
+    return InsertedIntoAncestorResult::Done;
 }
 
 void HTMLFrameElementBase::didFinishInsertingNode()
index 6751ebd..4128056 100644 (file)
@@ -56,7 +56,7 @@ protected:
     bool isURLAllowed() const;
 
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
     void didFinishInsertingNode() final;
     void didAttachRenderers() override;
 
index 9a0a575..c9f6f0c 100644 (file)
@@ -208,20 +208,20 @@ void HTMLFrameSetElement::willRecalcStyle(Style::Change)
         renderer()->setNeedsLayout();
 }
 
-Node::InsertedIntoResult HTMLFrameSetElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLFrameSetElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument) {
         if (RefPtr<Frame> frame = document().frame())
             frame->loader().client().dispatchDidBecomeFrameset(document().isFrameSet());
     }
 
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void HTMLFrameSetElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLFrameSetElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    HTMLElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
     if (removalType.disconnectedFromDocument) {
         if (RefPtr<Frame> frame = document().frame())
             frame->loader().client().dispatchDidBecomeFrameset(document().isFrameSet());
index 8e96e0b..d54cddc 100644 (file)
@@ -64,8 +64,8 @@ private:
 
     void willRecalcStyle(Style::Change) final;
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
 
     std::unique_ptr<Length[]> m_rowLengths;
     std::unique_ptr<Length[]> m_colLengths;
index f77f401..bd05682 100644 (file)
@@ -293,7 +293,7 @@ void HTMLImageElement::didAttachRenderers()
         renderImage.setImageSizeForAltText();
 }
 
-Node::InsertedIntoResult HTMLImageElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLImageElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
     if (m_formSetByParser) {
         m_form = m_formSetByParser;
@@ -313,7 +313,7 @@ Node::InsertedIntoResult HTMLImageElement::insertedInto(InsertionType insertionT
     }
     // Insert needs to complete first, before we start updating the loader. Loader dispatches events which could result
     // in callbacks back to this node.
-    Node::InsertedIntoResult insertNotificationRequest = HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    Node::InsertedIntoAncestorResult insertNotificationRequest = HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
 
     if (insertionType.connectedToDocument && !m_parsedUsemap.isNull())
         document().addImageElementByUsemap(*m_parsedUsemap.impl(), *this);
@@ -331,7 +331,7 @@ Node::InsertedIntoResult HTMLImageElement::insertedInto(InsertionType insertionT
     return insertNotificationRequest;
 }
 
-void HTMLImageElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLImageElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
     if (m_form)
         m_form->removeImgElement(this);
@@ -343,7 +343,7 @@ void HTMLImageElement::removedFrom(RemovalType removalType, ContainerNode& paren
         setPictureElement(nullptr);
 
     m_form = nullptr;
-    HTMLElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
 }
 
 HTMLPictureElement* HTMLImageElement::pictureElement() const
index 1414c04..5b4702e 100644 (file)
@@ -120,8 +120,8 @@ private:
 
     void addSubresourceAttributeURLs(ListHashSet<URL>&) const override;
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
-    void removedFrom(RemovalType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode&) override;
 
     bool isFormAssociatedElement() const final { return false; }
     FormNamedItem* asFormNamedItem() final { return this; }
index 72e762a..f5ea733 100644 (file)
@@ -1503,13 +1503,13 @@ void HTMLInputElement::didChangeForm()
     addToRadioButtonGroup();
 }
 
-Node::InsertedIntoResult HTMLInputElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLInputElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    HTMLTextFormControlElement::insertedInto(insertionType, parentOfInsertedTree);
+    HTMLTextFormControlElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
 #if ENABLE(DATALIST_ELEMENT)
     resetListAttributeTargetObserver();
 #endif
-    return InsertedIntoResult::NeedsPostInsertionCallback;
+    return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
 }
 
 void HTMLInputElement::didFinishInsertingNode()
@@ -1519,11 +1519,11 @@ void HTMLInputElement::didFinishInsertingNode()
         addToRadioButtonGroup();
 }
 
-void HTMLInputElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLInputElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
     if (removalType.disconnectedFromDocument && !form())
         removeFromRadioButtonGroup();
-    HTMLTextFormControlElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLTextFormControlElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
     ASSERT(!isConnected());
 #if ENABLE(DATALIST_ELEMENT)
     resetListAttributeTargetObserver();
index 9f49a8c..eca803d 100644 (file)
@@ -350,9 +350,9 @@ private:
 
     void willChangeForm() final;
     void didChangeForm() final;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
     void didFinishInsertingNode() final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
     void didMoveToNewDocument(Document& oldDocument, Document& newDocument) final;
 
     bool hasCustomFocusLogic() const final;
index 9c23a1c..6926721 100644 (file)
@@ -340,16 +340,16 @@ void HTMLLinkElement::clearSheet()
     m_sheet = nullptr;
 }
 
-Node::InsertedIntoResult HTMLLinkElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLLinkElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (!insertionType.connectedToDocument)
-        return InsertedIntoResult::Done;
+        return InsertedIntoAncestorResult::Done;
 
     m_styleScope = &Style::Scope::forNode(*this);
     m_styleScope->addStyleSheetCandidateNode(*this, m_createdByParser);
 
-    return InsertedIntoResult::NeedsPostInsertionCallback;
+    return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
 }
 
 void HTMLLinkElement::didFinishInsertingNode()
@@ -357,9 +357,9 @@ void HTMLLinkElement::didFinishInsertingNode()
     process();
 }
 
-void HTMLLinkElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLLinkElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    HTMLElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
     if (!removalType.disconnectedFromDocument)
         return;
 
index 3517dde..c4b68cc 100644 (file)
@@ -81,9 +81,9 @@ private:
     static void processCallback(Node*);
     void clearSheet();
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
     void didFinishInsertingNode() final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
 
     void initializeStyleSheet(Ref<StyleSheetContents>&&, const CachedCSSStyleSheet&);
 
index 3eb8186..ad376b8 100644 (file)
@@ -112,19 +112,19 @@ Ref<HTMLCollection> HTMLMapElement::areas()
     return ensureRareData().ensureNodeLists().addCachedCollection<GenericCachedHTMLCollection<CollectionTypeTraits<MapAreas>::traversalType>>(*this, MapAreas);
 }
 
-Node::InsertedIntoResult HTMLMapElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLMapElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    Node::InsertedIntoResult request = HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    Node::InsertedIntoAncestorResult request = HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument)
         treeScope().addImageMap(*this);
     return request;
 }
 
-void HTMLMapElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLMapElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
     if (removalType.disconnectedFromDocument)
         treeScope().removeImageMap(*this);
-    HTMLElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
 }
 
 }
index 0187594..cc77ea0 100644 (file)
@@ -47,8 +47,8 @@ private:
 
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
 
     AtomicString m_name;
 };
index a9a3eff..1f2dcc0 100644 (file)
@@ -872,11 +872,11 @@ bool HTMLMediaElement::childShouldCreateRenderer(const Node& child) const
 #endif
 }
 
-Node::InsertedIntoResult HTMLMediaElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLMediaElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
     INFO_LOG(LOGIDENTIFIER);
 
-    HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument) {
         m_inActiveDocument = true;
 
@@ -894,7 +894,7 @@ Node::InsertedIntoResult HTMLMediaElement::insertedInto(InsertionType insertionT
         m_mediaSession->canProduceAudioChanged();
     }
 
-    return InsertedIntoResult::NeedsPostInsertionCallback;
+    return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
 }
 
 void HTMLMediaElement::didFinishInsertingNode()
@@ -931,7 +931,7 @@ void HTMLMediaElement::pauseAfterDetachedTask()
     }
 }
 
-void HTMLMediaElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLMediaElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
     INFO_LOG(LOGIDENTIFIER);
 
@@ -941,7 +941,7 @@ void HTMLMediaElement::removedFrom(RemovalType removalType, ContainerNode& paren
         m_pauseAfterDetachedTaskQueue.enqueueTask(std::bind(&HTMLMediaElement::pauseAfterDetachedTask, this));
     }
 
-    HTMLElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
 }
 
 void HTMLMediaElement::willAttachRenderers()
index 8d31518..d7d0fb1 100644 (file)
@@ -588,9 +588,9 @@ private:
     bool isMouseFocusable() const override;
     bool rendererIsNeeded(const RenderStyle&) override;
     bool childShouldCreateRenderer(const Node&) const override;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
     void didFinishInsertingNode() override;
-    void removedFrom(RemovalType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode&) override;
     void didRecalcStyle(Style::Change) override;
 
     void willBecomeFullscreenElement() override;
index b22e8cd..3106dc3 100644 (file)
@@ -60,12 +60,12 @@ void HTMLMetaElement::parseAttribute(const QualifiedName& name, const AtomicStri
         HTMLElement::parseAttribute(name, value);
 }
 
-Node::InsertedIntoResult HTMLMetaElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLMetaElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument)
         process();
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
 void HTMLMetaElement::process()
index e0ef4cf..4086e54 100644 (file)
@@ -39,7 +39,7 @@ private:
     HTMLMetaElement(const QualifiedName&, Document&);
 
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
 
     void process();
 };
index 4cd57cf..f317506 100644 (file)
@@ -313,11 +313,11 @@ void HTMLObjectElement::updateWidget(CreatePlugins createPlugins)
         renderFallbackContent();
 }
 
-Node::InsertedIntoResult HTMLObjectElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLObjectElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    HTMLPlugInImageElement::insertedInto(insertionType, parentOfInsertedTree);
-    FormAssociatedElement::insertedInto(insertionType, parentOfInsertedTree);
-    return InsertedIntoResult::NeedsPostInsertionCallback;
+    HTMLPlugInImageElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
+    FormAssociatedElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
+    return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
 }
 
 void HTMLObjectElement::didFinishInsertingNode()
@@ -325,10 +325,10 @@ void HTMLObjectElement::didFinishInsertingNode()
     resetFormOwner();
 }
 
-void HTMLObjectElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLObjectElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    HTMLPlugInImageElement::removedFrom(removalType, parentOfRemovedTree);
-    FormAssociatedElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLPlugInImageElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
+    FormAssociatedElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
 }
 
 void HTMLObjectElement::childrenChanged(const ChildChange& change)
index 46dbb94..5fbf9ec 100644 (file)
@@ -62,9 +62,9 @@ private:
     bool isPresentationAttribute(const QualifiedName&) const final;
     void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) final;
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
     void didFinishInsertingNode() final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
 
     void didMoveToNewDocument(Document& oldDocument, Document& newDocument) final;
 
index 3f21dfb..ad7ebf8 100644 (file)
@@ -317,7 +317,7 @@ bool HTMLOptionElement::isDisabledFormControl() const
     return downcast<HTMLOptGroupElement>(*parentNode()).isDisabledFormControl();
 }
 
-Node::InsertedIntoResult HTMLOptionElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLOptionElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
     if (RefPtr<HTMLSelectElement> select = ownerSelectElement()) {
         select->setRecalcListItems();
@@ -331,7 +331,7 @@ Node::InsertedIntoResult HTMLOptionElement::insertedInto(InsertionType insertion
         select->scrollToSelection();
     }
 
-    return HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    return HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
 }
 
 String HTMLOptionElement::collectOptionInnerText() const
index cb5e1f4..50869b6 100644 (file)
@@ -74,7 +74,7 @@ private:
 
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
     void accessKeyAction(bool) final;
 
     void childrenChanged(const ChildChange&) final;
index 77b6052..2ed0c74 100644 (file)
@@ -68,10 +68,10 @@ void HTMLScriptElement::parseAttribute(const QualifiedName& name, const AtomicSt
         HTMLElement::parseAttribute(name, value);
 }
 
-Node::InsertedIntoResult HTMLScriptElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLScriptElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
-    return ScriptElement::insertedInto(insertionType, parentOfInsertedTree);
+    HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
+    return ScriptElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
 }
 
 void HTMLScriptElement::didFinishInsertingNode()
index ddec401..a8b4d58 100644 (file)
@@ -50,7 +50,7 @@ private:
     HTMLScriptElement(const QualifiedName&, Document&, bool wasInsertedByParser, bool alreadyStarted);
 
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
     void didFinishInsertingNode() final;
     void childrenChanged(const ChildChange&) final;
 
index ad5a8ab..6b3aaa9 100644 (file)
@@ -1560,13 +1560,13 @@ void HTMLSelectElement::typeAheadFind(KeyboardEvent& event)
         listBoxOnChange();
 }
 
-Node::InsertedIntoResult HTMLSelectElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLSelectElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
     // 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
     // after the whole subtree is constructed.
     recalcListItems();
-    return HTMLFormControlElementWithState::insertedInto(insertionType, parentOfInsertedTree);
+    return HTMLFormControlElementWithState::insertedIntoAncestor(insertionType, parentOfInsertedTree);
 }
 
 void HTMLSelectElement::accessKeySetSelectedIndex(int index)
index 15fac69..40435f9 100644 (file)
@@ -147,7 +147,7 @@ private:
     void typeAheadFind(KeyboardEvent&);
     void saveLastSelection();
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
 
     bool isOptionalFormControl() const final { return !isRequiredFormControl(); }
     bool isRequiredFormControl() const final;
index 4a4af44..42181a3 100644 (file)
@@ -48,28 +48,28 @@ HTMLSlotElement::HTMLSlotElement(const QualifiedName& tagName, Document& documen
     ASSERT(hasTagName(slotTag));
 }
 
-HTMLSlotElement::InsertedIntoResult HTMLSlotElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+HTMLSlotElement::InsertedIntoAncestorResult HTMLSlotElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    auto insertionResult = HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
-    ASSERT_UNUSED(insertionResult, insertionResult == InsertedIntoResult::Done);
+    auto insertionResult = HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
+    ASSERT_UNUSED(insertionResult, insertionResult == InsertedIntoAncestorResult::Done);
 
     if (insertionType.treeScopeChanged && isInShadowTree()) {
         if (auto shadowRoot = containingShadowRoot())
             shadowRoot->addSlotElementByName(attributeWithoutSynchronization(nameAttr), *this);
     }
 
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void HTMLSlotElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLSlotElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    if (removalType.treeScopeChanged && parentOfRemovedTree.isInShadowTree()) {
-        auto* oldShadowRoot = parentOfRemovedTree.containingShadowRoot();
+    if (removalType.treeScopeChanged && oldParentOfRemovedTree.isInShadowTree()) {
+        auto* oldShadowRoot = oldParentOfRemovedTree.containingShadowRoot();
         ASSERT(oldShadowRoot);
         oldShadowRoot->removeSlotElementByName(attributeWithoutSynchronization(nameAttr), *this);
     }
 
-    HTMLElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
 }
 
 void HTMLSlotElement::attributeChanged(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& newValue, AttributeModificationReason reason)
index e58fee2..df489b4 100644 (file)
@@ -48,8 +48,8 @@ public:
 private:
     HTMLSlotElement(const QualifiedName&, Document&);
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
     void attributeChanged(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue, AttributeModificationReason) final;
 
     bool m_inSignalSlotList { false };
index 5ba6052..38b8516 100644 (file)
@@ -63,9 +63,9 @@ Ref<HTMLSourceElement> HTMLSourceElement::create(Document& document)
     return create(sourceTag, document);
 }
 
-Node::InsertedIntoResult HTMLSourceElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLSourceElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     RefPtr<Element> parent = parentElement();
     if (parent == &parentOfInsertedTree) {
 #if ENABLE(VIDEO)
@@ -76,20 +76,20 @@ Node::InsertedIntoResult HTMLSourceElement::insertedInto(InsertionType insertion
         if (is<HTMLPictureElement>(*parent))
             downcast<HTMLPictureElement>(*parent).sourcesChanged();
     }
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void HTMLSourceElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLSourceElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {        
-    HTMLElement::removedFrom(removalType, parentOfRemovedTree);
-    if (!parentNode() && is<Element>(parentOfRemovedTree)) {
+    HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
+    if (!parentNode() && is<Element>(oldParentOfRemovedTree)) {
 #if ENABLE(VIDEO)
-        if (is<HTMLMediaElement>(parentOfRemovedTree))
-            downcast<HTMLMediaElement>(parentOfRemovedTree).sourceWasRemoved(*this);
+        if (is<HTMLMediaElement>(oldParentOfRemovedTree))
+            downcast<HTMLMediaElement>(oldParentOfRemovedTree).sourceWasRemoved(*this);
         else
 #endif
-        if (is<HTMLPictureElement>(parentOfRemovedTree))
-            downcast<HTMLPictureElement>(parentOfRemovedTree).sourcesChanged();
+        if (is<HTMLPictureElement>(oldParentOfRemovedTree))
+            downcast<HTMLPictureElement>(oldParentOfRemovedTree).sourcesChanged();
     }
 }
 
index 8b28944..6219029 100644 (file)
@@ -45,8 +45,8 @@ public:
 private:
     HTMLSourceElement(const QualifiedName&, Document&);
     
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
     bool isURLAttribute(const Attribute&) const final;
 
     // ActiveDOMObject.
index 0ea0cb9..e5d4dfd 100644 (file)
@@ -96,17 +96,17 @@ void HTMLStyleElement::finishParsingChildren()
     HTMLElement::finishParsingChildren();
 }
 
-Node::InsertedIntoResult HTMLStyleElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLStyleElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    auto result = HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    auto result = HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument)
         m_styleSheetOwner.insertedIntoDocument(*this);
     return result;
 }
 
-void HTMLStyleElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLStyleElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    HTMLElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
     if (removalType.disconnectedFromDocument)
         m_styleSheetOwner.removedFromDocument(*this);
 }
index cbae6dc..a9b0ad2 100644 (file)
@@ -54,8 +54,8 @@ private:
     HTMLStyleElement(const QualifiedName&, Document&, bool createdByParser);
 
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
     void childrenChanged(const ChildChange&) final;
 
     bool isLoading() const { return m_styleSheetOwner.isLoading(); }
index 3520439..691e1d5 100644 (file)
@@ -78,14 +78,14 @@ bool HTMLTextFormControlElement::childShouldCreateRenderer(const Node& child) co
     return hasShadowRootParent(child) && HTMLFormControlElementWithState::childShouldCreateRenderer(child);
 }
 
-Node::InsertedIntoResult HTMLTextFormControlElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLTextFormControlElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    InsertedIntoResult InsertedIntoResult = HTMLFormControlElementWithState::insertedInto(insertionType, parentOfInsertedTree);
+    InsertedIntoAncestorResult InsertedIntoAncestorResult = HTMLFormControlElementWithState::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument) {
         String initialValue = value();
         setTextAsOfLastFormControlChangeEvent(initialValue.isNull() ? emptyString() : initialValue);
     }
-    return InsertedIntoResult;
+    return InsertedIntoAncestorResult;
 }
 
 void HTMLTextFormControlElement::dispatchFocusEvent(RefPtr<Element>&& oldFocusedElement, FocusDirection direction)
index 4f209a4..85078a3 100644 (file)
@@ -52,7 +52,7 @@ public:
     int minLength() const { return m_minLength; }
     ExceptionOr<void> setMinLength(int);
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
 
     // The derived class should return true if placeholder processing is needed.
     bool isPlaceholderVisible() const { return m_isPlaceholderVisible; }
index 84ba353..cd07b6f 100644 (file)
@@ -50,16 +50,16 @@ Ref<HTMLTitleElement> HTMLTitleElement::create(const QualifiedName& tagName, Doc
     return adoptRef(*new HTMLTitleElement(tagName, document));
 }
 
-Node::InsertedIntoResult HTMLTitleElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLTitleElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     document().titleElementAdded(*this);
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void HTMLTitleElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLTitleElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    HTMLElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
     document().titleElementRemoved(*this);
 }
 
index 02ca9ea..cb14d4f 100644 (file)
@@ -39,8 +39,8 @@ public:
 private:
     HTMLTitleElement(const QualifiedName&, Document&);
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
     void childrenChanged(const ChildChange&) final;
 
     StringWithDirection computedTextWithDirection();
index d3d3726..3ae337c 100644 (file)
@@ -76,24 +76,24 @@ Ref<HTMLTrackElement> HTMLTrackElement::create(const QualifiedName& tagName, Doc
     return adoptRef(*new HTMLTrackElement(tagName, document));
 }
 
-Node::InsertedIntoResult HTMLTrackElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult HTMLTrackElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    HTMLElement::insertedInto(insertionType, parentOfInsertedTree);
+    HTMLElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
 
     if (parentNode() == &parentOfInsertedTree && is<HTMLMediaElement>(parentOfInsertedTree)) {
         downcast<HTMLMediaElement>(parentOfInsertedTree).didAddTextTrack(*this);
         scheduleLoad();
     }
 
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void HTMLTrackElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void HTMLTrackElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    HTMLElement::removedFrom(removalType, parentOfRemovedTree);
+    HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
 
-    if (!parentNode() && is<HTMLMediaElement>(parentOfRemovedTree))
-        downcast<HTMLMediaElement>(parentOfRemovedTree).didRemoveTextTrack(*this);
+    if (!parentNode() && is<HTMLMediaElement>(oldParentOfRemovedTree))
+        downcast<HTMLMediaElement>(oldParentOfRemovedTree).didRemoveTextTrack(*this);
 }
 
 void HTMLTrackElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
index 1bbdbee..f386df2 100644 (file)
@@ -65,8 +65,8 @@ private:
 
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
 
     bool isURLAttribute(const Attribute&) const final;
 
index 1d74d12..2921194 100644 (file)
@@ -365,12 +365,12 @@ void SVGElement::reportAttributeParsingError(SVGParsingError error, const Qualif
     ASSERT_NOT_REACHED();
 }
 
-void SVGElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void SVGElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
     if (removalType.disconnectedFromDocument)
         updateRelativeLengthsInformation(false, this);
 
-    StyledElement::removedFrom(removalType, parentOfRemovedTree);
+    StyledElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
 
     if (removalType.disconnectedFromDocument) {
         document().accessSVGExtensions().clearTargetDependencies(*this);
@@ -981,12 +981,12 @@ void SVGElement::svgAttributeChanged(const QualifiedName& attrName)
     }
 }
 
-Node::InsertedIntoResult SVGElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    StyledElement::insertedInto(insertionType, parentOfInsertedTree);
+    StyledElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     updateRelativeLengthsInformation();
     buildPendingResourcesIfNeeded();
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
 void SVGElement::buildPendingResourcesIfNeeded()
@@ -1063,7 +1063,7 @@ AffineTransform SVGElement::localCoordinateSpaceTransform(SVGLocatable::CTMScope
 
 void SVGElement::updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement* element)
 {
-    // If we're not yet in a document, this function will be called again from insertedInto(). Do nothing now.
+    // If we're not yet in a document, this function will be called again from insertedIntoAncestor(). Do nothing now.
     if (!isConnected())
         return;
 
index 366368f..bbdcc5f 100644 (file)
@@ -159,8 +159,8 @@ protected:
 
     bool isPresentationAttribute(const QualifiedName&) const override;
     void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
-    void removedFrom(RemovalType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode&) override;
     void childrenChanged(const ChildChange&) override;
     virtual bool selfHasRelativeLengths() const { return false; }
     void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(selfHasRelativeLengths(), this); }
index d516f4d..6f9a271 100644 (file)
@@ -150,10 +150,10 @@ void SVGFEImageElement::svgAttributeChanged(const QualifiedName& attrName)
     SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
 }
 
-Node::InsertedIntoResult SVGFEImageElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGFEImageElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    SVGFilterPrimitiveStandardAttributes::insertedInto(insertionType, parentOfInsertedTree);
-    return InsertedIntoResult::NeedsPostInsertionCallback;
+    SVGFilterPrimitiveStandardAttributes::insertedIntoAncestor(insertionType, parentOfInsertedTree);
+    return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
 }
 
 void SVGFEImageElement::didFinishInsertingNode()
@@ -161,9 +161,9 @@ void SVGFEImageElement::didFinishInsertingNode()
     buildPendingResource();
 }
 
-void SVGFEImageElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void SVGFEImageElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    SVGFilterPrimitiveStandardAttributes::removedFrom(removalType, parentOfRemovedTree);
+    SVGFilterPrimitiveStandardAttributes::removedFromAncestor(removalType, oldParentOfRemovedTree);
     if (removalType.disconnectedFromDocument)
         clearResourceReferences();
 }
index 3436899..9f136a7 100644 (file)
@@ -58,8 +58,8 @@ private:
     void requestImageResource();
 
     void buildPendingResource() override;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
-    void removedFrom(RemovalType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode&) override;
 
     BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEImageElement)
         DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio)
index a4bed43..7dbe000 100644 (file)
@@ -271,22 +271,22 @@ void SVGFontFaceElement::rebuildFontFace()
     document().styleScope().didChangeStyleSheetEnvironment();
 }
 
-Node::InsertedIntoResult SVGFontFaceElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGFontFaceElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    SVGElement::insertedInto(insertionType, parentOfInsertedTree);
+    SVGElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (!insertionType.connectedToDocument) {
         ASSERT(!m_fontElement);
-        return InsertedIntoResult::Done;
+        return InsertedIntoAncestorResult::Done;
     }
     document().accessSVGExtensions().registerSVGFontFaceElement(this);
 
     rebuildFontFace();
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void SVGFontFaceElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void SVGFontFaceElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    SVGElement::removedFrom(removalType, parentOfRemovedTree);
+    SVGElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
 
     if (removalType.disconnectedFromDocument) {
         m_fontElement = nullptr;
index c1195e6..8714335 100644 (file)
@@ -58,8 +58,8 @@ private:
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
 
     void childrenChanged(const ChildChange&) final;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
 
     bool rendererIsNeeded(const RenderStyle&) final { return false; }
 
index bfd891e..4149f66 100644 (file)
@@ -81,10 +81,10 @@ void SVGFontFaceUriElement::childrenChanged(const ChildChange& change)
         downcast<SVGFontFaceElement>(*grandparent).rebuildFontFace();
 }
 
-Node::InsertedIntoResult SVGFontFaceUriElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGFontFaceUriElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
     loadFont();
-    return SVGElement::insertedInto(insertionType, parentOfInsertedTree);
+    return SVGElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
 }
 
 static bool isSVGFontTarget(const SVGFontFaceUriElement& element)
index 5ed3d9b..e4991ff 100644 (file)
@@ -42,7 +42,7 @@ private:
     
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
     void childrenChanged(const ChildChange&) final;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
     bool rendererIsNeeded(const RenderStyle&) final { return false; }
 
     void loadFont();
index b460a6f..1d135e4 100644 (file)
@@ -186,15 +186,15 @@ void SVGImageElement::didAttachRenderers()
     }
 }
 
-Node::InsertedIntoResult SVGImageElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGImageElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    SVGGraphicsElement::insertedInto(insertionType, parentOfInsertedTree);
+    SVGGraphicsElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (!insertionType.connectedToDocument)
-        return InsertedIntoResult::Done;
+        return InsertedIntoAncestorResult::Done;
     // Update image loader, as soon as we're living in the tree.
     // We can only resolve base URIs properly, after that!
     m_imageLoader.updateFromElement();
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
 const AtomicString& SVGImageElement::imageSourceURL() const
index 8b5b675..97af034 100644 (file)
@@ -49,7 +49,7 @@ private:
     void svgAttributeChanged(const QualifiedName&) final;
 
     void didAttachRenderers() final;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
 
     RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
 
index a16f292..0e01c7f 100644 (file)
@@ -86,12 +86,12 @@ void SVGMPathElement::clearResourceReferences()
     document().accessSVGExtensions().removeAllTargetReferencesForElement(this);
 }
 
-Node::InsertedIntoResult SVGMPathElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGMPathElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    SVGElement::insertedInto(insertionType, parentOfInsertedTree);
+    SVGElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument)
-        return InsertedIntoResult::NeedsPostInsertionCallback;
-    return InsertedIntoResult::Done;
+        return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
+    return InsertedIntoAncestorResult::Done;
 }
 
 void SVGMPathElement::didFinishInsertingNode()
@@ -99,10 +99,10 @@ void SVGMPathElement::didFinishInsertingNode()
     buildPendingResource();
 }
 
-void SVGMPathElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void SVGMPathElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    SVGElement::removedFrom(removalType, parentOfRemovedTree);
-    notifyParentOfPathChange(&parentOfRemovedTree);
+    SVGElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
+    notifyParentOfPathChange(&oldParentOfRemovedTree);
     if (removalType.disconnectedFromDocument)
         clearResourceReferences();
 }
index 51f4e57..1a2ac6a 100644 (file)
@@ -45,8 +45,8 @@ private:
 
     void buildPendingResource() final;
     void clearResourceReferences();
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
 
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
     void svgAttributeChanged(const QualifiedName&) final;
index 4941177..40a0ca7 100644 (file)
@@ -279,16 +279,16 @@ void SVGPathElement::invalidateMPathDependencies()
     }
 }
 
-Node::InsertedIntoResult SVGPathElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGPathElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    SVGGraphicsElement::insertedInto(insertionType, parentOfInsertedTree);
+    SVGGraphicsElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     invalidateMPathDependencies();
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void SVGPathElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void SVGPathElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    SVGGraphicsElement::removedFrom(removalType, parentOfRemovedTree);
+    SVGGraphicsElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
     invalidateMPathDependencies();
 }
 
index b31721b..647c7d4 100644 (file)
@@ -124,8 +124,8 @@ private:
 
     RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
 
-    Node::InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    Node::InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
 
     void invalidateMPathDependencies();
 
index 629dce9..4357037 100644 (file)
@@ -467,7 +467,7 @@ RenderPtr<RenderElement> SVGSVGElement::createElementRenderer(RenderStyle&& styl
     return createRenderer<RenderSVGViewportContainer>(*this, WTFMove(style));
 }
 
-Node::InsertedIntoResult SVGSVGElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGSVGElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
     if (insertionType.connectedToDocument) {
         document().accessSVGExtensions().addTimeContainer(this);
@@ -480,16 +480,16 @@ Node::InsertedIntoResult SVGSVGElement::insertedInto(InsertionType insertionType
         if (!document().parsing() && !document().processingLoadEvent() && document().loadEventFinished() && !m_timeContainer->isStarted())
             m_timeContainer->begin();
     }
-    return SVGGraphicsElement::insertedInto(insertionType, parentOfInsertedTree);
+    return SVGGraphicsElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
 }
 
-void SVGSVGElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void SVGSVGElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
     if (removalType.disconnectedFromDocument) {
         document().accessSVGExtensions().removeTimeContainer(this);
         pauseAnimations();
     }
-    SVGGraphicsElement::removedFrom(removalType, parentOfRemovedTree);
+    SVGGraphicsElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
 }
 
 void SVGSVGElement::pauseAnimations()
index 68b0f52..20ae178 100644 (file)
@@ -143,8 +143,8 @@ private:
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     bool rendererIsNeeded(const RenderStyle&) override;
     RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
-    void removedFrom(RemovalType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode&) override;
     void svgAttributeChanged(const QualifiedName&) override;
     bool selfHasRelativeLengths() const override;
     void prepareForDocumentSuspension() override;
index a342d1b..2f4e336 100644 (file)
@@ -71,12 +71,12 @@ void SVGScriptElement::svgAttributeChanged(const QualifiedName& attrName)
     SVGElement::svgAttributeChanged(attrName);
 }
 
-Node::InsertedIntoResult SVGScriptElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGScriptElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    SVGElement::insertedInto(insertionType, parentOfInsertedTree);
+    SVGElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument)
         SVGExternalResourcesRequired::insertedIntoDocument(this);
-    return ScriptElement::insertedInto(insertionType, parentOfInsertedTree);
+    return ScriptElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
 }
 
 void SVGScriptElement::didFinishInsertingNode()
index 88f9692..33b8af5 100644 (file)
@@ -41,7 +41,7 @@ private:
     SVGScriptElement(const QualifiedName&, Document&, bool wasInsertedByParser, bool alreadyStarted);
 
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
     void didFinishInsertingNode() final;
     void childrenChanged(const ChildChange&) final;
 
index a043828..99ea4ed 100644 (file)
@@ -113,17 +113,17 @@ void SVGStyleElement::finishParsingChildren()
     SVGElement::finishParsingChildren();
 }
 
-Node::InsertedIntoResult SVGStyleElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGStyleElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    auto result = SVGElement::insertedInto(insertionType, parentOfInsertedTree);
+    auto result = SVGElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument)
         m_styleSheetOwner.insertedIntoDocument(*this);
     return result;
 }
 
-void SVGStyleElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void SVGStyleElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    SVGElement::removedFrom(removalType, parentOfRemovedTree);
+    SVGElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
     if (removalType.disconnectedFromDocument)
         m_styleSheetOwner.removedFromDocument(*this);
 }
index 20db440..f751568 100644 (file)
@@ -46,8 +46,8 @@ private:
     SVGStyleElement(const QualifiedName&, Document&, bool createdByParser);
 
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
     void childrenChanged(const ChildChange&) final;
 
     bool rendererIsNeeded(const RenderStyle&) final { return false; }
index 0cc1f12..e3c77e9 100644 (file)
@@ -231,7 +231,7 @@ void SVGTRefElement::buildPendingResource()
     // Remove any existing event listener.
     m_targetListener->detach();
 
-    // If we're not yet in a document, this function will be called again from insertedInto().
+    // If we're not yet in a document, this function will be called again from insertedIntoAncestor().
     if (!isConnected())
         return;
 
@@ -256,12 +256,12 @@ void SVGTRefElement::buildPendingResource()
     updateReferencedText(target.get());
 }
 
-Node::InsertedIntoResult SVGTRefElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGTRefElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    SVGElement::insertedInto(insertionType, parentOfInsertedTree);
+    SVGElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument)
-        return InsertedIntoResult::NeedsPostInsertionCallback;
-    return InsertedIntoResult::Done;
+        return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
+    return InsertedIntoAncestorResult::Done;
 }
 
 void SVGTRefElement::didFinishInsertingNode()
@@ -269,9 +269,9 @@ void SVGTRefElement::didFinishInsertingNode()
     buildPendingResource();
 }
 
-void SVGTRefElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void SVGTRefElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    SVGElement::removedFrom(removalType, parentOfRemovedTree);
+    SVGElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
     if (removalType.disconnectedFromDocument)
         m_targetListener->detach();
 }
index 4c9a52e..bf3afa0 100644 (file)
@@ -44,8 +44,8 @@ private:
     bool childShouldCreateRenderer(const Node&) const override;
     bool rendererIsNeeded(const RenderStyle&) override;
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
-    void removedFrom(RemovalType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode&) override;
     void didFinishInsertingNode() override;
 
     void clearTarget() override;
index da6f99b..dec3ef6 100644 (file)
@@ -173,10 +173,10 @@ void SVGTextPathElement::buildPendingResource()
     }
 }
 
-Node::InsertedIntoResult SVGTextPathElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGTextPathElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    SVGTextContentElement::insertedInto(insertionType, parentOfInsertedTree);
-    return InsertedIntoResult::NeedsPostInsertionCallback;
+    SVGTextContentElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
+    return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
 }
 
 void SVGTextPathElement::didFinishInsertingNode()
@@ -184,9 +184,9 @@ void SVGTextPathElement::didFinishInsertingNode()
     buildPendingResource();
 }
 
-void SVGTextPathElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void SVGTextPathElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    SVGTextContentElement::removedFrom(removalType, parentOfRemovedTree);
+    SVGTextContentElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
     if (removalType.disconnectedFromDocument)
         clearResourceReferences();
 }
index b807dc6..5ed19f2 100644 (file)
@@ -121,8 +121,8 @@ private:
     void clearResourceReferences();
 
     void buildPendingResource() override;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
-    void removedFrom(RemovalType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode&) override;
 
     static bool isSupportedAttribute(const QualifiedName&);
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
index 3b3979c..3f6b127 100644 (file)
@@ -38,16 +38,16 @@ Ref<SVGTitleElement> SVGTitleElement::create(const QualifiedName& tagName, Docum
     return adoptRef(*new SVGTitleElement(tagName, document));
 }
 
-Node::InsertedIntoResult SVGTitleElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGTitleElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    SVGElement::insertedInto(insertionType, parentOfInsertedTree);
+    SVGElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     document().titleElementAdded(*this);
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void SVGTitleElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void SVGTitleElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    SVGElement::removedFrom(removalType, parentOfRemovedTree);
+    SVGElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
     document().titleElementRemoved(*this);
 }
 
index c914698..bb76ffa 100644 (file)
@@ -32,8 +32,8 @@ public:
 private:
     SVGTitleElement(const QualifiedName&, Document&);
 
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) final;
-    void removedFrom(RemovalType, ContainerNode&) final;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
+    void removedFromAncestor(RemovalType, ContainerNode&) final;
     void childrenChanged(const ChildChange&) final;
 
     bool rendererIsNeeded(const RenderStyle&) final { return false; }
index 21ecd00..8554240 100644 (file)
@@ -104,20 +104,20 @@ void SVGUseElement::parseAttribute(const QualifiedName& name, const AtomicString
     SVGURIReference::parseAttribute(name, value);
 }
 
-Node::InsertedIntoResult SVGUseElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGUseElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    SVGGraphicsElement::insertedInto(insertionType, parentOfInsertedTree);
+    SVGGraphicsElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (insertionType.connectedToDocument) {
         SVGExternalResourcesRequired::insertedIntoDocument(this);
         invalidateShadowTree();
         updateExternalDocument();
     }
-    return InsertedIntoResult::Done;
+    return InsertedIntoAncestorResult::Done;
 }
 
-void SVGUseElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void SVGUseElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
-    SVGGraphicsElement::removedFrom(removalType, parentOfRemovedTree);
+    SVGGraphicsElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
     clearShadowTree();
     updateExternalDocument();
 }
index 5f26dd9..c5c93a9 100644 (file)
@@ -57,8 +57,8 @@ private:
     SVGUseElement(const QualifiedName&, Document&);
 
     bool isValid() const override;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
-    void removedFrom(RemovalType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode&) override;
     void buildPendingResource() override;
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     void svgAttributeChanged(const QualifiedName&) override;
index f691d14..3ee697f 100644 (file)
@@ -252,11 +252,11 @@ void SVGSMILElement::reset()
     resolveFirstInterval();
 }
 
-Node::InsertedIntoResult SVGSMILElement::insertedInto(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
+Node::InsertedIntoAncestorResult SVGSMILElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
-    SVGElement::insertedInto(insertionType, parentOfInsertedTree);
+    SVGElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
     if (!insertionType.connectedToDocument)
-        return InsertedIntoResult::Done;
+        return InsertedIntoAncestorResult::Done;
 
     // Verify we are not in <use> instance tree.
     ASSERT(!isInShadowTree());
@@ -265,7 +265,7 @@ Node::InsertedIntoResult SVGSMILElement::insertedInto(InsertionType insertionTyp
 
     SVGSVGElement* owner = ownerSVGElement();
     if (!owner)
-        return InsertedIntoResult::Done;
+        return InsertedIntoAncestorResult::Done;
 
     m_timeContainer = &owner->timeContainer();
     m_timeContainer->setDocumentOrderIndexesDirty();
@@ -280,7 +280,7 @@ Node::InsertedIntoResult SVGSMILElement::insertedInto(InsertionType insertionTyp
     if (m_timeContainer)
         m_timeContainer->notifyIntervalsChanged();
 
-    return InsertedIntoResult::NeedsPostInsertionCallback;
+    return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
 }
 
 void SVGSMILElement::didFinishInsertingNode()
@@ -288,7 +288,7 @@ void SVGSMILElement::didFinishInsertingNode()
     buildPendingResource();
 }
 
-void SVGSMILElement::removedFrom(RemovalType removalType, ContainerNode& parentOfRemovedTree)
+void SVGSMILElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
 {
     if (removalType.disconnectedFromDocument) {
         clearResourceReferences();
@@ -299,7 +299,7 @@ void SVGSMILElement::removedFrom(RemovalType removalType, ContainerNode& parentO
         m_timeContainer = nullptr;
     }
 
-    SVGElement::removedFrom(removalType, parentOfRemovedTree);
+    SVGElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
 }
 
 bool SVGSMILElement::hasValidAttributeName()
index 16271db..74bbc05 100644 (file)
@@ -47,8 +47,8 @@ public:
 
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     void svgAttributeChanged(const QualifiedName&) override;
-    InsertedIntoResult insertedInto(InsertionType, ContainerNode&) override;
-    void removedFrom(RemovalType, ContainerNode&) override;
+    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
+    void removedFromAncestor(RemovalType, ContainerNode&) override;
     
     virtual bool hasValidAttributeType() = 0;
     virtual bool hasValidAttributeName();