| Index: third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| index dd60325e359704461bc601ac3a7ba95e1048314c..d6d17f7524a41ac22e319a50fc2908a5889c0a01 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
|
| @@ -47,9 +47,7 @@
|
| #include "core/events/KeyboardEvent.h"
|
| #include "core/events/MouseEvent.h"
|
| #include "core/events/ScopedEventQueue.h"
|
| -#include "core/events/TouchEvent.h"
|
| #include "core/frame/Deprecation.h"
|
| -#include "core/frame/EventHandlerRegistry.h"
|
| #include "core/frame/FrameHost.h"
|
| #include "core/frame/FrameView.h"
|
| #include "core/frame/LocalFrame.h"
|
| @@ -113,7 +111,6 @@ HTMLInputElement::HTMLInputElement(Document& document, HTMLFormElement* form, bo
|
| , m_parsingInProgress(createdByParser)
|
| , m_valueAttributeWasUpdatedAfterParsing(false)
|
| , m_canReceiveDroppedFiles(false)
|
| - , m_hasTouchEventHandler(false)
|
| , m_shouldRevealPassword(false)
|
| , m_needsToUpdateViewValue(true)
|
| , m_isPlaceholderVisible(false)
|
| @@ -401,25 +398,6 @@ void HTMLInputElement::setType(const AtomicString& type)
|
| setAttribute(typeAttr, type);
|
| }
|
|
|
| -void HTMLInputElement::updateTouchEventHandlerRegistry()
|
| -{
|
| - ASSERT(m_inputTypeView);
|
| -
|
| - bool hasTouchEventHandler = m_inputTypeView->hasTouchEventHandler();
|
| - if (hasTouchEventHandler == !!m_hasTouchEventHandler)
|
| - return;
|
| - // If the Document is being or has been stopped, don't register any handlers.
|
| - if (document().frameHost() && document().lifecycle().state() < DocumentLifecycle::Stopping) {
|
| - EventHandlerRegistry& registry = document().frameHost()->eventHandlerRegistry();
|
| - // TODO(dtapuska): Make this passive touch listener see crbug.com/584438
|
| - if (hasTouchEventHandler)
|
| - registry.didAddEventHandler(*this, EventHandlerRegistry::TouchStartOrMoveEventBlocking);
|
| - else
|
| - registry.didRemoveEventHandler(*this, EventHandlerRegistry::TouchStartOrMoveEventBlocking);
|
| - m_hasTouchEventHandler = hasTouchEventHandler;
|
| - }
|
| -}
|
| -
|
| void HTMLInputElement::initializeTypeInParsing()
|
| {
|
| ASSERT(m_parsingInProgress);
|
| @@ -431,8 +409,6 @@ void HTMLInputElement::initializeTypeInParsing()
|
| m_inputTypeView = m_inputType->createView();
|
| ensureUserAgentShadowRoot();
|
|
|
| - updateTouchEventHandlerRegistry();
|
| -
|
| setNeedsWillValidateCheck();
|
|
|
| m_inputType->warnIfValueIsInvalid(fastGetAttribute(valueAttr).getString());
|
| @@ -465,8 +441,6 @@ void HTMLInputElement::updateType()
|
| m_inputTypeView = m_inputType->createView();
|
| m_inputTypeView->createShadowSubtree();
|
|
|
| - updateTouchEventHandlerRegistry();
|
| -
|
| setNeedsWillValidateCheck();
|
|
|
| bool willStoreValue = m_inputType->storesValueSeparateFromAttribute();
|
| @@ -1161,12 +1135,6 @@ void HTMLInputElement::defaultEventHandler(Event* evt)
|
| return;
|
| }
|
|
|
| - if (evt->isTouchEvent() && m_inputTypeView->hasTouchEventHandler()) {
|
| - m_inputTypeView->handleTouchEvent(toTouchEvent(evt));
|
| - if (evt->defaultHandled())
|
| - return;
|
| - }
|
| -
|
| if (evt->isKeyboardEvent() && evt->type() == EventTypeNames::keydown) {
|
| m_inputTypeView->handleKeydownEvent(toKeyboardEvent(evt));
|
| if (evt->defaultHandled())
|
| @@ -1506,17 +1474,9 @@ void HTMLInputElement::didMoveToNewDocument(Document& oldDocument)
|
| if (type() == InputTypeNames::radio)
|
| treeScope().radioButtonGroupScope().removeButton(this);
|
|
|
| - updateTouchEventHandlerRegistry();
|
| -
|
| HTMLTextFormControlElement::didMoveToNewDocument(oldDocument);
|
| }
|
|
|
| -void HTMLInputElement::removeAllEventListeners()
|
| -{
|
| - HTMLTextFormControlElement::removeAllEventListeners();
|
| - m_hasTouchEventHandler = false;
|
| -}
|
| -
|
| bool HTMLInputElement::recalcWillValidate() const
|
| {
|
| return m_inputType->supportsValidation() && HTMLTextFormControlElement::recalcWillValidate();
|
|
|