RESOLVED FIXED 133183
REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com
https://bugs.webkit.org/show_bug.cgi?id=133183
Summary REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com
Enrica Casucci
Reported 2014-05-22 10:02:43 PDT
Open Safari and navigate to duckduckgo.com. Tap on the input field. The keyboard has the Go button instead of Search.
Attachments
Patch (2.29 KB, patch)
2014-05-22 10:17 PDT, Enrica Casucci
ggaren: review+
Enrica Casucci
Comment 1 2014-05-22 10:04:22 PDT
Enrica Casucci
Comment 2 2014-05-22 10:17:13 PDT
Geoffrey Garen
Comment 3 2014-05-22 10:38:24 PDT
Comment on attachment 231894 [details] Patch r=me Might be nice to share this code in a helper function, if it matches WK1.
Andreas Kling
Comment 4 2014-05-22 10:44:35 PDT
Comment on attachment 231894 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=231894&action=review > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1860 > + if (element->getAttribute("pattern") == "\\d*" || element->getAttribute("pattern") == "[0-9]*") This could be done slightly more efficiently: const AtomicString& pattern = element->fastGetAttribute(HTMLNames::patternAttr); if (pattern == "\\d*" || pattern == "[0-9]*") .... > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1865 > + && (element->getNameAttribute().contains("search") || element->getIdAttribute().contains("search") || element->fastGetAttribute(HTMLNames::titleAttr).string().contains("search"))) I think you can call .contains() directly on the return value from fastGetAttribute().
Enrica Casucci
Comment 5 2014-05-22 10:55:58 PDT
(In reply to comment #3) > (From update of attachment 231894 [details]) > r=me > > Might be nice to share this code in a helper function, if it matches WK1. Unfortunately the WK1 is in UIKit.
Enrica Casucci
Comment 6 2014-05-22 10:56:21 PDT
(In reply to comment #4) > (From update of attachment 231894 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=231894&action=review > > > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1860 > > + if (element->getAttribute("pattern") == "\\d*" || element->getAttribute("pattern") == "[0-9]*") > > This could be done slightly more efficiently: > > const AtomicString& pattern = element->fastGetAttribute(HTMLNames::patternAttr); > if (pattern == "\\d*" || pattern == "[0-9]*") > .... > > > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1865 > > + && (element->getNameAttribute().contains("search") || element->getIdAttribute().contains("search") || element->fastGetAttribute(HTMLNames::titleAttr).string().contains("search"))) > > I think you can call .contains() directly on the return value from fastGetAttribute(). Will do. thanks!
Enrica Casucci
Comment 7 2014-05-22 11:04:34 PDT
Committed revision 169207.
Note You need to log in before you can comment on or make changes to this bug.