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

Unified Diff: Source/WebCore/html/HTMLInputElement.cpp

Issue 14296003: Remove TOUCH_EVENTS and TOUCH_EVENT_TRACKING compile-time flags. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
Index: Source/WebCore/html/HTMLInputElement.cpp
diff --git a/Source/WebCore/html/HTMLInputElement.cpp b/Source/WebCore/html/HTMLInputElement.cpp
index cfe9ff5847f79531a3269e204d386a385952d7d2..63e75f7b8b13a7458a71c7601ce3dcf277841699 100644
--- a/Source/WebCore/html/HTMLInputElement.cpp
+++ b/Source/WebCore/html/HTMLInputElement.cpp
@@ -67,6 +67,7 @@
#include "ShadowRoot.h"
#include "ScriptEventListener.h"
#include "StyleResolver.h"
+#include "TouchEvent.h"
#include <wtf/MathExtras.h>
#include <wtf/StdLibExtras.h>
@@ -78,10 +79,6 @@
#include "RuntimeEnabledFeatures.h"
#endif
-#if ENABLE(TOUCH_EVENTS)
-#include "TouchEvent.h"
-#endif
-
using namespace std;
namespace WebCore {
@@ -130,9 +127,7 @@ HTMLInputElement::HTMLInputElement(const QualifiedName& tagName, Document* docum
, m_valueAttributeWasUpdatedAfterParsing(false)
, m_wasModifiedByUser(false)
, m_canReceiveDroppedFiles(false)
-#if ENABLE(TOUCH_EVENTS)
, m_hasTouchEventHandler(false)
-#endif
, m_inputType(InputType::createText(this))
{
ASSERT(hasTagName(inputTag) || hasTagName(isindexTag));
@@ -173,10 +168,8 @@ HTMLInputElement::~HTMLInputElement()
// We should unregister it to avoid accessing a deleted object.
if (isRadioButton())
document()->formController()->checkedRadioButtons().removeButton(this);
-#if ENABLE(TOUCH_EVENTS)
if (m_hasTouchEventHandler)
document()->didRemoveEventTargetNode(this);
-#endif
}
const AtomicString& HTMLInputElement::name() const
@@ -483,7 +476,6 @@ void HTMLInputElement::updateType()
m_inputType = newType.release();
m_inputType->createShadowSubtree();
-#if ENABLE(TOUCH_EVENTS)
bool hasTouchEventHandler = m_inputType->hasTouchEventHandler();
if (hasTouchEventHandler != m_hasTouchEventHandler) {
if (hasTouchEventHandler)
@@ -492,7 +484,6 @@ void HTMLInputElement::updateType()
document()->didRemoveTouchEventHandler(this);
m_hasTouchEventHandler = hasTouchEventHandler;
}
-#endif
setNeedsWillValidateCheck();
@@ -1132,13 +1123,11 @@ void HTMLInputElement::defaultEventHandler(Event* evt)
return;
}
-#if ENABLE(TOUCH_EVENTS)
if (evt->isTouchEvent()) {
m_inputType->handleTouchEvent(static_cast<TouchEvent*>(evt));
if (evt->defaultHandled())
return;
}
-#endif
if (evt->isKeyboardEvent() && evt->type() == eventNames().keydownEvent) {
m_inputType->handleKeydownEvent(static_cast<KeyboardEvent*>(evt));
@@ -1526,19 +1515,15 @@ void HTMLInputElement::didMoveToNewDocument(Document* oldDocument)
oldDocument->unregisterForPageCacheSuspensionCallbacks(this);
if (isRadioButton())
oldDocument->formController()->checkedRadioButtons().removeButton(this);
-#if ENABLE(TOUCH_EVENTS)
if (m_hasTouchEventHandler)
oldDocument->didRemoveEventTargetNode(this);
-#endif
}
if (needsSuspensionCallback)
document()->registerForPageCacheSuspensionCallbacks(this);
-#if ENABLE(TOUCH_EVENTS)
if (m_hasTouchEventHandler)
document()->didAddTouchEventHandler(this);
-#endif
HTMLTextFormControlElement::didMoveToNewDocument(oldDocument);
}

Powered by Google App Engine
This is Rietveld 408576698