Chromium Code Reviews| 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..85c32a49b0371c9ca510ed1e7783d71342f33997 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" |
| @@ -67,6 +65,7 @@ |
| #include "core/html/forms/InputType.h" |
| #include "core/html/forms/SearchInputType.h" |
| #include "core/html/parser/HTMLParserIdioms.h" |
| +#include "core/html/shadow/ShadowElementNames.h" |
|
tkent
2016/08/17 01:32:00
This change isn't necessary.
|
| #include "core/layout/LayoutTheme.h" |
| #include "core/page/ChromeClient.h" |
| #include "platform/Language.h" |
| @@ -113,7 +112,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 +399,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 +410,6 @@ void HTMLInputElement::initializeTypeInParsing() |
| m_inputTypeView = m_inputType->createView(); |
| ensureUserAgentShadowRoot(); |
| - updateTouchEventHandlerRegistry(); |
| - |
| setNeedsWillValidateCheck(); |
| m_inputType->warnIfValueIsInvalid(fastGetAttribute(valueAttr).getString()); |
| @@ -465,8 +442,6 @@ void HTMLInputElement::updateType() |
| m_inputTypeView = m_inputType->createView(); |
| m_inputTypeView->createShadowSubtree(); |
| - updateTouchEventHandlerRegistry(); |
| - |
| setNeedsWillValidateCheck(); |
| bool willStoreValue = m_inputType->storesValueSeparateFromAttribute(); |
| @@ -1161,12 +1136,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 +1475,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(); |