Diff
Modified: trunk/Source/WebCore/ChangeLog (185812 => 185813)
--- trunk/Source/WebCore/ChangeLog 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/ChangeLog 2015-06-21 21:14:51 UTC (rev 185813)
@@ -1,3 +1,70 @@
+2015-06-19 Andy Estes <[email protected]>
+
+ Give Node::didNotifySubtreeInsertions() a better name
+ https://bugs.webkit.org/show_bug.cgi?id=146170
+
+ Reviewed by Darin Adler.
+
+ didNotifySubtreeInsertions() is not a good name. It sounds like we are notifying the subtree insertions, which doesn't make sense.
+
+ This function is really about notifying the Node that the subtree it's a part of has finished being inserted into the DOM
+ (i.e. all nodes have received their call to insertedInto()). Change the name to finishedInsertingSubtree() to better reflect this.
+
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::notifyChildInserted):
+ * dom/ContainerNodeAlgorithms.h:
+ (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
+ (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
+ * dom/Element.cpp:
+ (WebCore::Element::addShadowRoot):
+ * dom/Node.h:
+ (WebCore::Node::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
+ (WebCore::Node::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
+ * dom/ScriptElement.cpp:
+ (WebCore::ScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
+ (WebCore::ScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
+ * dom/ScriptElement.h:
+ * html/HTMLFrameElementBase.cpp:
+ (WebCore::HTMLFrameElementBase::insertedInto):
+ (WebCore::HTMLFrameElementBase::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
+ (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
+ * html/HTMLFrameElementBase.h:
+ * html/HTMLScriptElement.cpp:
+ (WebCore::HTMLScriptElement::insertedInto):
+ (WebCore::HTMLScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
+ (WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
+ * html/HTMLScriptElement.h:
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::insertedInto):
+ (WebCore::SVGFEImageElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
+ (WebCore::SVGFEImageElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
+ * svg/SVGFEImageElement.h:
+ * svg/SVGMPathElement.cpp:
+ (WebCore::SVGMPathElement::insertedInto):
+ (WebCore::SVGMPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
+ (WebCore::SVGMPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
+ * svg/SVGMPathElement.h:
+ * svg/SVGScriptElement.cpp:
+ (WebCore::SVGScriptElement::insertedInto):
+ (WebCore::SVGScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
+ (WebCore::SVGScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
+ * svg/SVGScriptElement.h:
+ * svg/SVGTRefElement.cpp:
+ (WebCore::SVGTRefElement::insertedInto):
+ (WebCore::SVGTRefElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
+ (WebCore::SVGTRefElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
+ * svg/SVGTRefElement.h:
+ * svg/SVGTextPathElement.cpp:
+ (WebCore::SVGTextPathElement::insertedInto):
+ (WebCore::SVGTextPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
+ (WebCore::SVGTextPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
+ * svg/SVGTextPathElement.h:
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::SVGSMILElement::insertedInto):
+ (WebCore::SVGSMILElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
+ (WebCore::SVGSMILElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
+ * svg/animation/SVGSMILElement.h:
+
2015-06-21 Philip Chimento <[email protected]>
libwebkit2gtk fails to link without opengl
Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (185812 => 185813)
--- trunk/Source/WebCore/dom/ContainerNode.cpp 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp 2015-06-21 21:14:51 UTC (rev 185813)
@@ -347,7 +347,7 @@
childrenChanged(change);
for (auto& target : postInsertionNotificationTargets)
- target->didNotifySubtreeInsertions();
+ target->finishedInsertingSubtree();
}
void ContainerNode::notifyChildRemoved(Node& child, Node* previousSibling, Node* nextSibling, ChildChangeSource source)
Modified: trunk/Source/WebCore/dom/ContainerNodeAlgorithms.h (185812 => 185813)
--- trunk/Source/WebCore/dom/ContainerNodeAlgorithms.h 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/dom/ContainerNodeAlgorithms.h 2015-06-21 21:14:51 UTC (rev 185813)
@@ -195,7 +195,7 @@
inline void ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument(Node& node, NodeVector& postInsertionNotificationTargets)
{
ASSERT(m_insertionPoint.inDocument());
- if (Node::InsertionShouldCallDidNotifySubtreeInsertions == node.insertedInto(m_insertionPoint))
+ if (Node::InsertionShouldCallFinishedInsertingSubtree == node.insertedInto(m_insertionPoint))
postInsertionNotificationTargets.append(node);
if (is<ContainerNode>(node))
notifyDescendantInsertedIntoDocument(downcast<ContainerNode>(node), postInsertionNotificationTargets);
@@ -206,7 +206,7 @@
NoEventDispatchAssertion assertNoEventDispatch;
ASSERT(!m_insertionPoint.inDocument());
- if (Node::InsertionShouldCallDidNotifySubtreeInsertions == node.insertedInto(m_insertionPoint))
+ if (Node::InsertionShouldCallFinishedInsertingSubtree == node.insertedInto(m_insertionPoint))
postInsertionNotificationTargets.append(node);
notifyDescendantInsertedIntoTree(node, postInsertionNotificationTargets);
}
Modified: trunk/Source/WebCore/dom/Element.cpp (185812 => 185813)
--- trunk/Source/WebCore/dom/Element.cpp 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/dom/Element.cpp 2015-06-21 21:14:51 UTC (rev 185813)
@@ -1636,7 +1636,7 @@
ChildNodeInsertionNotifier(*this).notify(shadowRoot, postInsertionNotificationTargets);
for (auto& target : postInsertionNotificationTargets)
- target->didNotifySubtreeInsertions();
+ target->finishedInsertingSubtree();
resetNeedsNodeRenderingTraversalSlowPath();
Modified: trunk/Source/WebCore/dom/Node.h (185812 => 185813)
--- trunk/Source/WebCore/dom/Node.h 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/dom/Node.h 2015-06-21 21:14:51 UTC (rev 185813)
@@ -468,17 +468,17 @@
// Implementation can determine the type of subtree by seeing insertionPoint->inDocument().
// For a performance reason, notifications are delivered only to ContainerNode subclasses if the insertionPoint is out of document.
//
- // There are another callback named didNotifyDescendantInsertions(), which is called after all the descendant is notified.
- // Only a few subclasses actually need this. To utilize this, the node should return InsertionShouldCallDidNotifyDescendantInsertions
+ // There is another callback named finishedInsertingSubtree(), which is called after all descendants are notified.
+ // Only a few subclasses actually need this. To utilize this, the node should return InsertionShouldCallFinishedInsertingSubtree
// from insrtedInto().
//
enum InsertionNotificationRequest {
InsertionDone,
- InsertionShouldCallDidNotifySubtreeInsertions
+ InsertionShouldCallFinishedInsertingSubtree
};
virtual InsertionNotificationRequest insertedInto(ContainerNode& insertionPoint);
- virtual void didNotifySubtreeInsertions() { }
+ virtual void finishedInsertingSubtree() { }
// Notifies the node that it is no longer part of the tree.
//
Modified: trunk/Source/WebCore/dom/ScriptElement.cpp (185812 => 185813)
--- trunk/Source/WebCore/dom/ScriptElement.cpp 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/dom/ScriptElement.cpp 2015-06-21 21:14:51 UTC (rev 185813)
@@ -79,12 +79,12 @@
stopLoadRequest();
}
-bool ScriptElement::shouldNotifySubtreeInsertions(ContainerNode& insertionPoint)
+bool ScriptElement::shouldCallFinishedInsertingSubtree(ContainerNode& insertionPoint)
{
return insertionPoint.inDocument() && !m_parserInserted;
}
-void ScriptElement::didNotifySubtreeInsertions()
+void ScriptElement::finishedInsertingSubtree()
{
ASSERT(!m_parserInserted);
prepareScript(); // FIXME: Provide a real starting line number here.
Modified: trunk/Source/WebCore/dom/ScriptElement.h (185812 => 185813)
--- trunk/Source/WebCore/dom/ScriptElement.h 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/dom/ScriptElement.h 2015-06-21 21:14:51 UTC (rev 185813)
@@ -69,8 +69,8 @@
bool forceAsync() const { return m_forceAsync; }
// Helper functions used by our parent classes.
- bool shouldNotifySubtreeInsertions(ContainerNode&);
- void didNotifySubtreeInsertions();
+ bool shouldCallFinishedInsertingSubtree(ContainerNode&);
+ void finishedInsertingSubtree();
void childrenChanged();
void handleSourceAttribute(const String& sourceUrl);
void handleAsyncAttribute();
Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.cpp (185812 => 185813)
--- trunk/Source/WebCore/html/HTMLFrameElementBase.cpp 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.cpp 2015-06-21 21:14:51 UTC (rev 185813)
@@ -133,11 +133,11 @@
{
HTMLFrameOwnerElement::insertedInto(insertionPoint);
if (insertionPoint.inDocument())
- return InsertionShouldCallDidNotifySubtreeInsertions;
+ return InsertionShouldCallFinishedInsertingSubtree;
return InsertionDone;
}
-void HTMLFrameElementBase::didNotifySubtreeInsertions()
+void HTMLFrameElementBase::finishedInsertingSubtree()
{
if (!inDocument())
return;
Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.h (185812 => 185813)
--- trunk/Source/WebCore/html/HTMLFrameElementBase.h 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.h 2015-06-21 21:14:51 UTC (rev 185813)
@@ -52,7 +52,7 @@
virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
virtual InsertionNotificationRequest insertedInto(ContainerNode&) override final;
- virtual void didNotifySubtreeInsertions() override final;
+ virtual void finishedInsertingSubtree() override final;
virtual void didAttachRenderers() override;
private:
Modified: trunk/Source/WebCore/html/HTMLScriptElement.cpp (185812 => 185813)
--- trunk/Source/WebCore/html/HTMLScriptElement.cpp 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/html/HTMLScriptElement.cpp 2015-06-21 21:14:51 UTC (rev 185813)
@@ -70,12 +70,12 @@
Node::InsertionNotificationRequest HTMLScriptElement::insertedInto(ContainerNode& insertionPoint)
{
HTMLElement::insertedInto(insertionPoint);
- return shouldNotifySubtreeInsertions(insertionPoint) ? InsertionShouldCallDidNotifySubtreeInsertions : InsertionDone;
+ return shouldCallFinishedInsertingSubtree(insertionPoint) ? InsertionShouldCallFinishedInsertingSubtree : InsertionDone;
}
-void HTMLScriptElement::didNotifySubtreeInsertions()
+void HTMLScriptElement::finishedInsertingSubtree()
{
- ScriptElement::didNotifySubtreeInsertions();
+ ScriptElement::finishedInsertingSubtree();
}
void HTMLScriptElement::setText(const String &value)
Modified: trunk/Source/WebCore/html/HTMLScriptElement.h (185812 => 185813)
--- trunk/Source/WebCore/html/HTMLScriptElement.h 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/html/HTMLScriptElement.h 2015-06-21 21:14:51 UTC (rev 185813)
@@ -46,7 +46,7 @@
virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
virtual InsertionNotificationRequest insertedInto(ContainerNode&) override;
- virtual void didNotifySubtreeInsertions() override;
+ virtual void finishedInsertingSubtree() override;
virtual void childrenChanged(const ChildChange&) override;
virtual bool isURLAttribute(const Attribute&) const override;
Modified: trunk/Source/WebCore/svg/SVGFEImageElement.cpp (185812 => 185813)
--- trunk/Source/WebCore/svg/SVGFEImageElement.cpp 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/svg/SVGFEImageElement.cpp 2015-06-21 21:14:51 UTC (rev 185813)
@@ -143,10 +143,10 @@
Node::InsertionNotificationRequest SVGFEImageElement::insertedInto(ContainerNode& rootParent)
{
SVGFilterPrimitiveStandardAttributes::insertedInto(rootParent);
- return InsertionShouldCallDidNotifySubtreeInsertions;
+ return InsertionShouldCallFinishedInsertingSubtree;
}
-void SVGFEImageElement::didNotifySubtreeInsertions()
+void SVGFEImageElement::finishedInsertingSubtree()
{
buildPendingResource();
}
Modified: trunk/Source/WebCore/svg/SVGFEImageElement.h (185812 => 185813)
--- trunk/Source/WebCore/svg/SVGFEImageElement.h 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/svg/SVGFEImageElement.h 2015-06-21 21:14:51 UTC (rev 185813)
@@ -45,7 +45,7 @@
private:
SVGFEImageElement(const QualifiedName&, Document&);
- virtual void didNotifySubtreeInsertions() override;
+ virtual void finishedInsertingSubtree() override;
virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
virtual void svgAttributeChanged(const QualifiedName&) override;
Modified: trunk/Source/WebCore/svg/SVGMPathElement.cpp (185812 => 185813)
--- trunk/Source/WebCore/svg/SVGMPathElement.cpp 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/svg/SVGMPathElement.cpp 2015-06-21 21:14:51 UTC (rev 185813)
@@ -90,11 +90,11 @@
{
SVGElement::insertedInto(rootParent);
if (rootParent.inDocument())
- return InsertionShouldCallDidNotifySubtreeInsertions;
+ return InsertionShouldCallFinishedInsertingSubtree;
return InsertionDone;
}
-void SVGMPathElement::didNotifySubtreeInsertions()
+void SVGMPathElement::finishedInsertingSubtree()
{
buildPendingResource();
}
Modified: trunk/Source/WebCore/svg/SVGMPathElement.h (185812 => 185813)
--- trunk/Source/WebCore/svg/SVGMPathElement.h 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/svg/SVGMPathElement.h 2015-06-21 21:14:51 UTC (rev 185813)
@@ -53,7 +53,7 @@
virtual void svgAttributeChanged(const QualifiedName&) override;
virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
- virtual void didNotifySubtreeInsertions() override;
+ virtual void finishedInsertingSubtree() override;
void notifyParentOfPathChange(ContainerNode*);
Modified: trunk/Source/WebCore/svg/SVGScriptElement.cpp (185812 => 185813)
--- trunk/Source/WebCore/svg/SVGScriptElement.cpp 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/svg/SVGScriptElement.cpp 2015-06-21 21:14:51 UTC (rev 185813)
@@ -79,12 +79,12 @@
SVGElement::insertedInto(rootParent);
if (rootParent.inDocument())
SVGExternalResourcesRequired::insertedIntoDocument(this);
- return shouldNotifySubtreeInsertions(rootParent) ? InsertionShouldCallDidNotifySubtreeInsertions : InsertionDone;
+ return shouldCallFinishedInsertingSubtree(rootParent) ? InsertionShouldCallFinishedInsertingSubtree : InsertionDone;
}
-void SVGScriptElement::didNotifySubtreeInsertions()
+void SVGScriptElement::finishedInsertingSubtree()
{
- ScriptElement::didNotifySubtreeInsertions();
+ ScriptElement::finishedInsertingSubtree();
}
void SVGScriptElement::childrenChanged(const ChildChange& change)
Modified: trunk/Source/WebCore/svg/SVGScriptElement.h (185812 => 185813)
--- trunk/Source/WebCore/svg/SVGScriptElement.h 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/svg/SVGScriptElement.h 2015-06-21 21:14:51 UTC (rev 185813)
@@ -42,7 +42,7 @@
virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
virtual InsertionNotificationRequest insertedInto(ContainerNode&) override;
- virtual void didNotifySubtreeInsertions() override;
+ virtual void finishedInsertingSubtree() override;
virtual void childrenChanged(const ChildChange&) override;
virtual void svgAttributeChanged(const QualifiedName&) override;
Modified: trunk/Source/WebCore/svg/SVGTRefElement.cpp (185812 => 185813)
--- trunk/Source/WebCore/svg/SVGTRefElement.cpp 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/svg/SVGTRefElement.cpp 2015-06-21 21:14:51 UTC (rev 185813)
@@ -258,11 +258,11 @@
{
SVGElement::insertedInto(rootParent);
if (rootParent.inDocument())
- return InsertionShouldCallDidNotifySubtreeInsertions;
+ return InsertionShouldCallFinishedInsertingSubtree;
return InsertionDone;
}
-void SVGTRefElement::didNotifySubtreeInsertions()
+void SVGTRefElement::finishedInsertingSubtree()
{
buildPendingResource();
}
Modified: trunk/Source/WebCore/svg/SVGTRefElement.h (185812 => 185813)
--- trunk/Source/WebCore/svg/SVGTRefElement.h 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/svg/SVGTRefElement.h 2015-06-21 21:14:51 UTC (rev 185813)
@@ -47,7 +47,7 @@
virtual InsertionNotificationRequest insertedInto(ContainerNode&) override;
virtual void removedFrom(ContainerNode&) override;
- virtual void didNotifySubtreeInsertions() override;
+ virtual void finishedInsertingSubtree() override;
virtual void clearTarget() override;
Modified: trunk/Source/WebCore/svg/SVGTextPathElement.cpp (185812 => 185813)
--- trunk/Source/WebCore/svg/SVGTextPathElement.cpp 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/svg/SVGTextPathElement.cpp 2015-06-21 21:14:51 UTC (rev 185813)
@@ -176,10 +176,10 @@
Node::InsertionNotificationRequest SVGTextPathElement::insertedInto(ContainerNode& rootParent)
{
SVGTextContentElement::insertedInto(rootParent);
- return InsertionShouldCallDidNotifySubtreeInsertions;
+ return InsertionShouldCallFinishedInsertingSubtree;
}
-void SVGTextPathElement::didNotifySubtreeInsertions()
+void SVGTextPathElement::finishedInsertingSubtree()
{
buildPendingResource();
}
Modified: trunk/Source/WebCore/svg/SVGTextPathElement.h (185812 => 185813)
--- trunk/Source/WebCore/svg/SVGTextPathElement.h 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/svg/SVGTextPathElement.h 2015-06-21 21:14:51 UTC (rev 185813)
@@ -112,7 +112,7 @@
static Ref<SVGTextPathElement> create(const QualifiedName&, Document&);
protected:
- virtual void didNotifySubtreeInsertions() override;
+ virtual void finishedInsertingSubtree() override;
private:
SVGTextPathElement(const QualifiedName&, Document&);
Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (185812 => 185813)
--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp 2015-06-21 21:14:51 UTC (rev 185813)
@@ -260,10 +260,10 @@
if (m_timeContainer)
m_timeContainer->notifyIntervalsChanged();
- return InsertionShouldCallDidNotifySubtreeInsertions;
+ return InsertionShouldCallFinishedInsertingSubtree;
}
-void SVGSMILElement::didNotifySubtreeInsertions()
+void SVGSMILElement::finishedInsertingSubtree()
{
buildPendingResource();
}
Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.h (185812 => 185813)
--- trunk/Source/WebCore/svg/animation/SVGSMILElement.h 2015-06-21 16:44:41 UTC (rev 185812)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.h 2015-06-21 21:14:51 UTC (rev 185813)
@@ -119,7 +119,7 @@
virtual void setTargetElement(SVGElement*);
virtual void setAttributeName(const QualifiedName&);
- virtual void didNotifySubtreeInsertions() override;
+ virtual void finishedInsertingSubtree() override;
private:
void buildPendingResource() override;