<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>133183</bug_id>
          
          <creation_ts>2014-05-22 10:02:43 -0700</creation_ts>
          <short_desc>REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com</short_desc>
          <delta_ts>2014-05-22 11:04:34 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Enrica Casucci">enrica</reporter>
          <assigned_to name="Enrica Casucci">enrica</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1011002</commentid>
    <comment_count>0</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2014-05-22 10:02:43 -0700</bug_when>
    <thetext>Open Safari and navigate to duckduckgo.com.
Tap on the input field.
The keyboard has the Go button instead of Search.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1011003</commentid>
    <comment_count>1</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2014-05-22 10:04:22 -0700</bug_when>
    <thetext>&lt;rdar://problem/17004207&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1011008</commentid>
    <comment_count>2</comment_count>
      <attachid>231894</attachid>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2014-05-22 10:17:13 -0700</bug_when>
    <thetext>Created attachment 231894
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1011011</commentid>
    <comment_count>3</comment_count>
      <attachid>231894</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-05-22 10:38:24 -0700</bug_when>
    <thetext>Comment on attachment 231894
Patch

r=me

Might be nice to share this code in a helper function, if it matches WK1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1011012</commentid>
    <comment_count>4</comment_count>
      <attachid>231894</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2014-05-22 10:44:35 -0700</bug_when>
    <thetext>Comment on attachment 231894
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=231894&amp;action=review

&gt; Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1860
&gt; +            if (element-&gt;getAttribute(&quot;pattern&quot;) == &quot;\\d*&quot; || element-&gt;getAttribute(&quot;pattern&quot;) == &quot;[0-9]*&quot;)

This could be done slightly more efficiently:

const AtomicString&amp; pattern = element-&gt;fastGetAttribute(HTMLNames::patternAttr);
if (pattern == &quot;\\d*&quot; || pattern == &quot;[0-9]*&quot;)
    ....

&gt; Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1865
&gt; +                    &amp;&amp; (element-&gt;getNameAttribute().contains(&quot;search&quot;) || element-&gt;getIdAttribute().contains(&quot;search&quot;) || element-&gt;fastGetAttribute(HTMLNames::titleAttr).string().contains(&quot;search&quot;)))

I think you can call .contains() directly on the return value from fastGetAttribute().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1011015</commentid>
    <comment_count>5</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2014-05-22 10:55:58 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 231894 [details])
&gt; r=me
&gt; 
&gt; Might be nice to share this code in a helper function, if it matches WK1.

Unfortunately the WK1 is in UIKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1011016</commentid>
    <comment_count>6</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2014-05-22 10:56:21 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 231894 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=231894&amp;action=review
&gt; 
&gt; &gt; Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1860
&gt; &gt; +            if (element-&gt;getAttribute(&quot;pattern&quot;) == &quot;\\d*&quot; || element-&gt;getAttribute(&quot;pattern&quot;) == &quot;[0-9]*&quot;)
&gt; 
&gt; This could be done slightly more efficiently:
&gt; 
&gt; const AtomicString&amp; pattern = element-&gt;fastGetAttribute(HTMLNames::patternAttr);
&gt; if (pattern == &quot;\\d*&quot; || pattern == &quot;[0-9]*&quot;)
&gt;     ....
&gt; 
&gt; &gt; Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1865
&gt; &gt; +                    &amp;&amp; (element-&gt;getNameAttribute().contains(&quot;search&quot;) || element-&gt;getIdAttribute().contains(&quot;search&quot;) || element-&gt;fastGetAttribute(HTMLNames::titleAttr).string().contains(&quot;search&quot;)))
&gt; 
&gt; I think you can call .contains() directly on the return value from fastGetAttribute().

Will do. thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1011019</commentid>
    <comment_count>7</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2014-05-22 11:04:34 -0700</bug_when>
    <thetext>Committed revision 169207.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>231894</attachid>
            <date>2014-05-22 10:17:13 -0700</date>
            <delta_ts>2014-05-22 10:44:35 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>showsearchkb.txt</filename>
            <type>text/plain</type>
            <size>2350</size>
            <attacher name="Enrica Casucci">enrica</attacher>
            
              <data encoding="base64">SW5k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gIGVsc2UgaWYgKGVsZW1lbnQtPmlzVGV4dCgp
KSB7CisgICAgICAgICAgICBpZiAoZWxlbWVudC0+Z2V0QXR0cmlidXRlKCJwYXR0ZXJuIikgPT0g
IlxcZCoiIHx8IGVsZW1lbnQtPmdldEF0dHJpYnV0ZSgicGF0dGVybiIpID09ICJbMC05XSoiKQor
ICAgICAgICAgICAgICAgIGluZm9ybWF0aW9uLmVsZW1lbnRUeXBlID0gV0tUeXBlTnVtYmVyUGFk
OworICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgaW5mb3JtYXRpb24uZWxlbWVu
dFR5cGUgPSBXS1R5cGVUZXh0OworICAgICAgICAgICAgICAgIGlmICghaW5mb3JtYXRpb24uZm9y
bUFjdGlvbi5pc0VtcHR5KCkKKyAgICAgICAgICAgICAgICAgICAgJiYgKGVsZW1lbnQtPmdldE5h
bWVBdHRyaWJ1dGUoKS5jb250YWlucygic2VhcmNoIikgfHwgZWxlbWVudC0+Z2V0SWRBdHRyaWJ1
dGUoKS5jb250YWlucygic2VhcmNoIikgfHwgZWxlbWVudC0+ZmFzdEdldEF0dHJpYnV0ZShIVE1M
TmFtZXM6OnRpdGxlQXR0cikuc3RyaW5nKCkuY29udGFpbnMoInNlYXJjaCIpKSkKKyAgICAgICAg
ICAgICAgICAgICAgaW5mb3JtYXRpb24uZWxlbWVudFR5cGUgPSBXS1R5cGVTZWFyY2g7CisgICAg
ICAgICAgICB9CisgICAgICAgIH0KIAogICAgICAgICBpbmZvcm1hdGlvbi5pc1JlYWRPbmx5ID0g
ZWxlbWVudC0+aXNSZWFkT25seSgpOwogICAgICAgICBpbmZvcm1hdGlvbi52YWx1ZSA9IGVsZW1l
bnQtPnZhbHVlKCk7Cg==
</data>
<flag name="review"
          id="256358"
          type_id="1"
          status="+"
          setter="ggaren"
    />
          </attachment>
      

    </bug>

</bugzilla>