Reduce uses of PassRefPtr in WebCore/dom - 6
[WebKit-https.git] / Source / WebCore / dom / EventDispatcher.cpp
index ddd769a..1c93a4a 100644 (file)
@@ -41,7 +41,7 @@ namespace WebCore {
 
 class WindowEventContext {
 public:
-    WindowEventContext(PassRefPtr<Node>, const EventContext*);
+    WindowEventContext(Node*, const EventContext*);
 
     DOMWindow* window() const { return m_window.get(); }
     EventTarget* target() const { return m_target.get(); }
@@ -52,14 +52,14 @@ private:
     RefPtr<EventTarget> m_target;
 };
 
-WindowEventContext::WindowEventContext(PassRefPtr<Node> node, const EventContext* topEventContext)
+WindowEventContext::WindowEventContext(Node* node, const EventContext* topEventContext)
 {
-    Node* topLevelContainer = topEventContext ? topEventContext->node() : node.get();
+    Node* topLevelContainer = topEventContext ? topEventContext->node() : node;
     if (!is<Document>(*topLevelContainer))
         return;
 
     m_window = downcast<Document>(*topLevelContainer).domWindow();
-    m_target = topEventContext ? topEventContext->target() : node.get();
+    m_target = topEventContext ? topEventContext->target() : node;
 }
 
 bool WindowEventContext::handleLocalEvents(Event& event)