Chromium Code Reviews| Index: Source/core/html/HTMLInputElement.cpp |
| diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp |
| index 53526f27867af0be1eb798fe217be25a152efd8b..527fa45be130c6b55205f7ce09f3fd07fdc58dcc 100644 |
| --- a/Source/core/html/HTMLInputElement.cpp |
| +++ b/Source/core/html/HTMLInputElement.cpp |
| @@ -37,6 +37,7 @@ |
| #include "bindings/v8/ScriptEventListener.h" |
| #include "core/accessibility/AXObjectCache.h" |
| #include "core/dom/Document.h" |
| +#include "core/dom/EventHandlerRegistry.h" |
| #include "core/dom/ExceptionCode.h" |
| #include "core/dom/IdTargetObserver.h" |
| #include "core/dom/shadow/ElementShadow.h" |
| @@ -168,7 +169,7 @@ HTMLInputElement::~HTMLInputElement() |
| if (isRadioButton()) |
| document().formController().radioButtonGroupScope().removeButton(this); |
| if (m_hasTouchEventHandler) |
| - document().didRemoveTouchEventHandler(this); |
| + EventHandlerRegistry::from(document())->didRemoveEventHandler(*this, EventTypeNames::touchstart); |
|
Rick Byers
2014/03/27 16:43:31
It's a bit of a lie here to pass just touchstart (
Sami
2014/04/02 19:58:05
Done.
|
| } |
| const AtomicString& HTMLInputElement::name() const |
| @@ -432,9 +433,9 @@ void HTMLInputElement::updateType() |
| bool hasTouchEventHandler = m_inputTypeView->hasTouchEventHandler(); |
| if (hasTouchEventHandler != m_hasTouchEventHandler) { |
| if (hasTouchEventHandler) |
| - document().didAddTouchEventHandler(this); |
| + EventHandlerRegistry::from(document())->didAddEventHandler(*this, EventTypeNames::touchstart); |
| else |
| - document().didRemoveTouchEventHandler(this); |
| + EventHandlerRegistry::from(document())->didRemoveEventHandler(*this, EventTypeNames::touchstart); |
| m_hasTouchEventHandler = hasTouchEventHandler; |
| } |
| @@ -1445,10 +1446,10 @@ void HTMLInputElement::didMoveToNewDocument(Document& oldDocument) |
| if (isRadioButton()) |
| oldDocument.formController().radioButtonGroupScope().removeButton(this); |
| if (m_hasTouchEventHandler) |
| - oldDocument.didRemoveTouchEventHandler(this); |
| + EventHandlerRegistry::from(oldDocument)->didRemoveEventHandler(*this, EventTypeNames::touchstart); |
| if (m_hasTouchEventHandler) |
| - document().didAddTouchEventHandler(this); |
| + EventHandlerRegistry::from(document())->didAddEventHandler(*this, EventTypeNames::touchstart); |
| HTMLTextFormControlElement::didMoveToNewDocument(oldDocument); |
| } |