summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/TreeScopeAdopter.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/TreeScopeAdopter.h')
-rw-r--r--Source/WebCore/dom/TreeScopeAdopter.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/Source/WebCore/dom/TreeScopeAdopter.h b/Source/WebCore/dom/TreeScopeAdopter.h
index da821d4c0..405dafffc 100644
--- a/Source/WebCore/dom/TreeScopeAdopter.h
+++ b/Source/WebCore/dom/TreeScopeAdopter.h
@@ -22,8 +22,8 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#ifndef TreeScopeAdopter_h
-#define TreeScopeAdopter_h
+
+#pragma once
#include "Node.h"
@@ -33,35 +33,33 @@ class TreeScope;
class TreeScopeAdopter {
public:
- explicit TreeScopeAdopter(Node* toAdopt, TreeScope& newScope);
+ explicit TreeScopeAdopter(Node& toAdopt, TreeScope& newScope);
void execute() const { moveTreeToNewScope(m_toAdopt); }
bool needsScopeChange() const { return &m_oldScope != &m_newScope; }
#ifdef NDEBUG
- static void ensureDidMoveToNewDocumentWasCalled(Document*) { }
+ static void ensureDidMoveToNewDocumentWasCalled(Document&) { }
#else
- static void ensureDidMoveToNewDocumentWasCalled(Document*);
+ static void ensureDidMoveToNewDocumentWasCalled(Document&);
#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 moveShadowTreeToNewDocument(ShadowRoot&, Document& oldDocument, Document& newDocument) const;
+ void moveNodeToNewDocument(Node&, Document& oldDocument, Document& newDocument) const;
- Node* m_toAdopt;
+ Node& m_toAdopt;
TreeScope& m_newScope;
TreeScope& m_oldScope;
};
-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())
{
}
-}
-
-#endif
+} // namespace WebCore