Remove remaining OILPAN uses from core/events/

R=
BUG=585328

Review URL: https://codereview.chromium.org/1888043003

Cr-Commit-Position: refs/heads/master@{#387549}
diff --git a/third_party/WebKit/Source/core/events/DOMWindowEventQueue.h b/third_party/WebKit/Source/core/events/DOMWindowEventQueue.h
index 8c9b16f..7ca7396 100644
--- a/third_party/WebKit/Source/core/events/DOMWindowEventQueue.h
+++ b/third_party/WebKit/Source/core/events/DOMWindowEventQueue.h
@@ -30,8 +30,6 @@
 #include "core/events/EventQueue.h"
 #include "wtf/HashSet.h"
 #include "wtf/ListHashSet.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/RefCounted.h"
 
 namespace blink {
 
@@ -39,13 +37,7 @@
 class DOMWindowEventQueueTimer;
 class ExecutionContext;
 
-#if ENABLE(OILPAN)
-#define DOMWINDOWEVENTQUEUE_BASE_CLASSES public EventQueue
-#else
-#define DOMWINDOWEVENTQUEUE_BASE_CLASSES public RefCounted<DOMWindowEventQueue>, public EventQueue
-#endif
-
-class DOMWindowEventQueue final : DOMWINDOWEVENTQUEUE_BASE_CLASSES {
+class DOMWindowEventQueue final : public EventQueue {
 public:
     static DOMWindowEventQueue* create(ExecutionContext*);
     ~DOMWindowEventQueue() override;
diff --git a/third_party/WebKit/Source/core/events/EventPath.cpp b/third_party/WebKit/Source/core/events/EventPath.cpp
index 901088c..899b677 100644
--- a/third_party/WebKit/Source/core/events/EventPath.cpp
+++ b/third_party/WebKit/Source/core/events/EventPath.cpp
@@ -131,16 +131,7 @@
             if (m_event && shouldStopAtShadowRoot(*m_event, *toShadowRoot(current), *m_node))
                 break;
             current = current->shadowHost();
-#if !ENABLE(OILPAN)
-            // TODO(kochi): crbug.com/507413 This check is necessary when some asynchronous event
-            // is queued while its shadow host is removed and the shadow root gets the event
-            // immediately after it.  When Oilpan is enabled, this situation does not happen.
-            // Except this case, shadow root's host is assumed to be non-null.
-            if (current)
-                nodesInPath.append(current);
-#else
             nodesInPath.append(current);
-#endif
         } else {
             current = current->parentNode();
             if (current)
@@ -233,11 +224,9 @@
         TreeScopeEventContext* treeScopeEventContext = relatedTargetEventPath->m_treeScopeEventContexts[i].get();
         relatedTargetMap.add(&treeScopeEventContext->treeScope(), treeScopeEventContext->target());
     }
-#if ENABLE(OILPAN)
     // Oilpan: It is important to explicitly clear the vectors to reuse
     // the memory in subsequent event dispatchings.
     relatedTargetEventPath->clear();
-#endif
 }
 
 EventTarget* EventPath::findRelatedNode(TreeScope& scope, RelatedTargetMap& relatedTargetMap)