RESOLVED FIXED 145780
Simplify event handling logic for search cancel button
https://bugs.webkit.org/show_bug.cgi?id=145780
Summary Simplify event handling logic for search cancel button
Daniel Bates
Reported 2015-06-08 18:18:01 PDT
Following the patch for bug #145774, we can take advantage of the click event to simplify the event handling logic for the search cancel button.
Attachments
Patch (26.38 KB, patch)
2015-06-08 18:26 PDT, Daniel Bates
darin: review+
Daniel Bates
Comment 1 2015-06-08 18:26:29 PDT
Darin Adler
Comment 2 2015-06-09 11:31:41 PDT
Comment on attachment 254534 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254534&action=review r=me if you figure out how to make this work or compile it out on iOS > Source/WebCore/html/shadow/TextControlInnerElements.cpp:176 > + setAttribute(aria_labelAttr, AtomicString(AXSearchFieldCancelButtonText())); iOS build failure: html/shadow/TextControlInnerElements.cpp:176:47: error: use of undeclared identifier 'AXSearchFieldCancelButtonText' setAttribute(aria_labelAttr, AtomicString(AXSearchFieldCancelButtonText())); That is in a !PLATFORM(IOS) block. Separate question: Is the explicit AtomicString construction required here? > Source/WebCore/html/shadow/TextControlInnerElements.cpp:201 > + input->setValueForUser(""); Please use emptyString() rather than "".
Daniel Bates
Comment 3 2015-06-11 10:16:45 PDT
(In reply to comment #2) > > Source/WebCore/html/shadow/TextControlInnerElements.cpp:176 > > + setAttribute(aria_labelAttr, AtomicString(AXSearchFieldCancelButtonText())); > > iOS build failure: > > html/shadow/TextControlInnerElements.cpp:176:47: error: use of undeclared > identifier 'AXSearchFieldCancelButtonText' > setAttribute(aria_labelAttr, > AtomicString(AXSearchFieldCancelButtonText())); > > That is in a !PLATFORM(IOS) block. Will add !PLATFORM(IOS)-guard around this code. > > Separate question: Is the explicit AtomicString construction required here? No, it is not required. Will remove. > > > Source/WebCore/html/shadow/TextControlInnerElements.cpp:201 > > + input->setValueForUser(""); > > Please use emptyString() rather than "". Will substitute emptyString() for "".
Daniel Bates
Comment 4 2015-06-11 10:21:28 PDT
Note You need to log in before you can comment on or make changes to this bug.