| Index: Source/core/html/shadow/TextControlInnerElements.cpp
|
| diff --git a/Source/core/html/shadow/TextControlInnerElements.cpp b/Source/core/html/shadow/TextControlInnerElements.cpp
|
| index 1c057fa46a85a3b07692a960d46bdcd01a818618..fded6f732ec73fb64cc34f7af3c4bb149bdccda0 100644
|
| --- a/Source/core/html/shadow/TextControlInnerElements.cpp
|
| +++ b/Source/core/html/shadow/TextControlInnerElements.cpp
|
| @@ -230,31 +230,12 @@ void SearchFieldCancelButtonElement::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);
|
| - m_capturing = true;
|
| - }
|
| - }
|
| - input->focus();
|
| - input->select();
|
| +
|
| + if (event->type() == EventTypeNames::click && event->isMouseEvent() && toMouseEvent(event)->button() == LeftButton) {
|
| + input->setValueForUser("");
|
| + input->onSearch();
|
| 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()) {
|
| - String oldValue = input->value();
|
| - input->setValueForUser("");
|
| - input->onSearch();
|
| - event->setDefaultHandled();
|
| - }
|
| - }
|
| - }
|
|
|
| if (!event->defaultHandled())
|
| HTMLDivElement::defaultEventHandler(event);
|
|
|