Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Unified Diff: Source/core/dom/Node.cpp

Issue 14296003: Remove TOUCH_EVENTS and TOUCH_EVENT_TRACKING compile-time flags. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/Touch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 06c6ed464a7e91a0d9d6e48ee014764dc7cb3f86..45e73632856460df8d356abd01de73387d7e3f44 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -424,10 +424,8 @@ Node::~Node()
void Node::willBeDeletedFrom(Document* document)
{
if (hasEventTargetData()) {
-#if ENABLE(TOUCH_EVENT_TRACKING)
if (document)
document->didRemoveEventTargetNode(this);
-#endif
clearEventTargetData();
}
@@ -2355,10 +2353,8 @@ bool Node::dispatchEvent(PassRefPtr<Event> event)
{
if (event->isMouseEvent())
return EventDispatcher::dispatchEvent(this, MouseEventDispatchMediator::create(adoptRef(toMouseEvent(event.leakRef())), MouseEventDispatchMediator::SyntheticMouseEvent));
-#if ENABLE(TOUCH_EVENTS)
if (event->isTouchEvent())
return dispatchTouchEvent(adoptRef(toTouchEvent(event.leakRef())));
-#endif
return EventDispatcher::dispatchEvent(this, EventDispatchMediator::create(event));
}
@@ -2417,12 +2413,10 @@ bool Node::dispatchGestureEvent(const PlatformGestureEvent& event)
return EventDispatcher::dispatchEvent(this, GestureEventDispatchMediator::create(gestureEvent));
}
-#if ENABLE(TOUCH_EVENTS)
bool Node::dispatchTouchEvent(PassRefPtr<TouchEvent> event)
{
return EventDispatcher::dispatchEvent(this, TouchEventDispatchMediator::create(event));
}
-#endif
void Node::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEventOptions eventOptions, SimulatedClickVisualOptions visualOptions)
{
@@ -2546,13 +2540,9 @@ bool Node::willRespondToMouseClickEvents()
bool Node::willRespondToTouchEvents()
{
-#if ENABLE(TOUCH_EVENTS)
if (isDisabledFormControl(this))
return false;
return hasEventListeners(eventNames().touchstartEvent) || hasEventListeners(eventNames().touchmoveEvent) || hasEventListeners(eventNames().touchcancelEvent) || hasEventListeners(eventNames().touchendEvent);
-#else
- return false;
-#endif
}
// This is here for inlining
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/Touch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698