Chromium Code Reviews| Index: Source/core/html/shadow/ClearButtonElement.cpp |
| diff --git a/Source/core/html/shadow/ClearButtonElement.cpp b/Source/core/html/shadow/ClearButtonElement.cpp |
| index 71e922a54bc9145cd8b301d2c2ee86119b16c023..3f87c763d2f6618ef1c7ac712131cdfc018dc3a5 100644 |
| --- a/Source/core/html/shadow/ClearButtonElement.cpp |
| +++ b/Source/core/html/shadow/ClearButtonElement.cpp |
| @@ -85,26 +85,12 @@ void ClearButtonElement::defaultEventHandler(Event* event) |
| return; |
| } |
| - if (event->type() == EventTypeNames::mousedown && event->isMouseEvent() && toMouseEvent(event)->button() == LeftButton) { |
| - if (renderer() && renderer()->visibleToHitTesting()) { |
| - if (LocalFrame* frame = document().frame()) { |
| - frame->eventHandler().setCapturingMouseEventsNode(this); |
|
Habib Virji
2014/09/26 13:59:13
setCapturingMouseEventsNode and m_capturing are no
|
| - m_capturing = true; |
| - } |
| - } |
| + if (event->type() == EventTypeNames::click) { |
| m_clearButtonOwner->focusAndSelectClearButtonOwner(); |
| event->setDefaultHandled(); |
| - } |
| - if (event->type() == EventTypeNames::mouseup && event->isMouseEvent() && toMouseEvent(event)->button() == LeftButton) { |
| - if (m_capturing) { |
| - if (LocalFrame* frame = document().frame()) { |
| - frame->eventHandler().setCapturingMouseEventsNode(nullptr); |
| - m_capturing = false; |
| - } |
| - if (hovered()) { |
| - m_clearButtonOwner->clearValue(); |
| - event->setDefaultHandled(); |
| - } |
| + if (hovered()) { |
| + m_clearButtonOwner->clearValue(); |
| + event->setDefaultHandled(); |
| } |
| } |