Index: Source/core/dom/TreeScopeAdopter.h |
diff --git a/Source/core/dom/TreeScopeAdopter.h b/Source/core/dom/TreeScopeAdopter.h |
index a83d178482ac68bd7d6f3d0f2906163ac1abeebd..17742ba25532b0f9ad92bbb93e48828a40c9c0c3 100644 |
--- a/Source/core/dom/TreeScopeAdopter.h |
+++ b/Source/core/dom/TreeScopeAdopter.h |
@@ -33,7 +33,7 @@ class TreeScope; |
class TreeScopeAdopter { |
public: |
- explicit TreeScopeAdopter(Node* toAdopt, TreeScope* newScope); |
+ TreeScopeAdopter(Node& toAdopt, TreeScope& newScope); |
void execute() const { moveTreeToNewScope(m_toAdopt); } |
bool needsScopeChange() const { return m_oldScope != m_newScope; } |
@@ -45,23 +45,21 @@ public: |
#endif |
private: |
- void updateTreeScope(Node*) const; |
- void moveTreeToNewScope(Node*) const; |
- void moveTreeToNewDocument(Node*, Document* oldDocument, Document* newDocument) const; |
- void moveNodeToNewDocument(Node*, Document* oldDocument, Document* newDocument) const; |
+ void updateTreeScope(Node&) const; |
+ void moveTreeToNewScope(Node&) const; |
+ void moveTreeToNewDocument(Node&, Document& oldDocument, Document* newDocument) const; |
+ void moveNodeToNewDocument(Node&, Document& oldDocument, Document* newDocument) const; |
- Node* m_toAdopt; |
- TreeScope* m_newScope; |
- TreeScope* m_oldScope; |
+ Node& m_toAdopt; |
+ TreeScope& m_newScope; |
+ TreeScope& m_oldScope; |
}; |
-// FIXME: Should take |TreeScope&| instead of |TreeScope*|. |
-inline TreeScopeAdopter::TreeScopeAdopter(Node* toAdopt, TreeScope* newScope) |
+inline TreeScopeAdopter::TreeScopeAdopter(Node& toAdopt, TreeScope& newScope) |
: m_toAdopt(toAdopt) |
, m_newScope(newScope) |
- , m_oldScope(&toAdopt->treeScope()) |
+ , m_oldScope(toAdopt.treeScope()) |
{ |
- ASSERT(newScope); |
} |
} |