| 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);
|
| }
|
|
|