<?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>32675</bug_id>
          
          <creation_ts>2009-12-17 11:34:19 -0800</creation_ts>
          <short_desc>HTMLInputElement::stepMismatch() uses ambiguous overload of pow()</short_desc>
          <delta_ts>2009-12-17 23:45:36 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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="Steve Block">steveblock</reporter>
          <assigned_to name="Steve Block">steveblock</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>eric</cc>
    
    <cc>mitz</cc>
    
    <cc>steveblock</cc>
    
    <cc>tkent</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>172895</commentid>
    <comment_count>0</comment_count>
    <who name="Steve Block">steveblock</who>
    <bug_when>2009-12-17 11:34:19 -0800</bug_when>
    <thetext>HTMLInputElement::stepMismatch() calls pow() with two integer arguments. This causes a compile error due to an ambiguous overload on Android.

This was added in http://trac.webkit.org/changeset/51159</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172901</commentid>
    <comment_count>1</comment_count>
      <attachid>45099</attachid>
    <who name="Steve Block">steveblock</who>
    <bug_when>2009-12-17 11:46:57 -0800</bug_when>
    <thetext>Created attachment 45099
Patch 1 for Bug 32675

Cast first argument of pow to double to force &apos;double pow(double, int)&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172904</commentid>
    <comment_count>2</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2009-12-17 11:49:48 -0800</bug_when>
    <thetext>style-queue ran check-webkit-style on attachment 45099 without any errors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172917</commentid>
    <comment_count>3</comment_count>
      <attachid>45099</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-17 12:49:48 -0800</bug_when>
    <thetext>Comment on attachment 45099
Patch 1 for Bug 32675

This looks OK to me.  It would be nice if you could post the error in the bug for posterity, or even in the ChangeLog.  It&apos;s not clear to me what other signature on Andriod would be causing this error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172919</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-17 12:51:03 -0800</bug_when>
    <thetext>(I CC&apos;d darin adler just because he was one of the primary driving forces behind our MathExtras.h and similar WTF files which deal with x-platform issues similar to this one.  I figured he might like to see this go by.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172949</commentid>
    <comment_count>5</comment_count>
    <who name="Steve Block">steveblock</who>
    <bug_when>2009-12-17 14:19:03 -0800</bug_when>
    <thetext>The build error is ...

external/webkit/WebCore/html/HTMLInputElement.cpp:343: error: call of overloaded &apos;pow(int, int)&apos; is ambiguous
bionic/libm/include/math.h:222: note: candidates are: double pow(double, double)
external/webkit/WebKit/android/stlport/stl/_cmath.h:443: note:                 float pow(float, float)
external/webkit/WebKit/android/stlport/stl/_cmath.h:443: note:                 long double pow(long double, long double)
external/webkit/WebKit/android/stlport/stl/_cmath.h:448: note:                 float pow(float, int)
external/webkit/WebKit/android/stlport/stl/_cmath.h:455: note:                 double pow(double, int)
external/webkit/WebKit/android/stlport/stl/_cmath.h:468: note:                 long double pow(long double, int)

The problem is that pow(int, int) isn&apos;t defined, nor is it in the c standard or c98.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172951</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-17 14:26:43 -0800</bug_when>
    <thetext>We have a pow() in MathExtras:
http://trac.webkit.org/browser/trunk/JavaScriptCore/wtf/MathExtras.h

We also seem to try hard to avoid use of cmath:
http://trac.webkit.org/changeset/13104
http://trac.webkit.org/changeset/11667
http://trac.webkit.org/changeset/12225

And sometimes add it?
http://trac.webkit.org/changeset/10511

I&apos;m not convinced this is the right work-around.  It would be nice if someone who is more familiar with our historical header troubles could comment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172952</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-17 14:28:12 -0800</bug_when>
    <thetext>Actually, I take that back.  This change has nothing really to do with cmath.  I think it&apos;s still fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172955</commentid>
    <comment_count>8</comment_count>
      <attachid>45099</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-12-17 14:37:26 -0800</bug_when>
    <thetext>Comment on attachment 45099
Patch 1 for Bug 32675

Clearing flags on attachment: 45099

Committed r52292: &lt;http://trac.webkit.org/changeset/52292&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172956</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-12-17 14:37:31 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172988</commentid>
    <comment_count>10</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-12-17 16:48:12 -0800</bug_when>
    <thetext>I would have preferred the use of the constant, 2.0, which is a double rather than writing it as static_cast&lt;double&gt;(2), which seems less elegant to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172992</commentid>
    <comment_count>11</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-17 16:58:45 -0800</bug_when>
    <thetext>Bah!  Agreed.  Clearly i wans&apos;t thinking.  I&apos;ll fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>173055</commentid>
    <comment_count>12</comment_count>
      <attachid>45126</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-17 23:01:43 -0800</bug_when>
    <thetext>Created attachment 45126
constant fix as recommended by Darin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>173059</commentid>
    <comment_count>13</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-17 23:08:12 -0800</bug_when>
    <thetext>Going to have the commit-queue land this for me to make sure I didn&apos;t make any stupid typos.  This laptop is too slow to build on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>173060</commentid>
    <comment_count>14</comment_count>
      <attachid>45126</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-17 23:08:52 -0800</bug_when>
    <thetext>Comment on attachment 45126
constant fix as recommended by Darin

Make the commit-queue land this.  Since I already filled in the reviewer the commit-queue won&apos;t get confused by me marking this r+.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>173062</commentid>
    <comment_count>15</comment_count>
    <who name="">mitz</who>
    <bug_when>2009-12-17 23:16:31 -0800</bug_when>
    <thetext>And since it’s C++, you could also use numeric_limits&lt;double&gt;::digits() instead of DBL_MANT_DIG</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>173063</commentid>
    <comment_count>16</comment_count>
      <attachid>45126</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-12-17 23:17:20 -0800</bug_when>
    <thetext>Comment on attachment 45126
constant fix as recommended by Darin

Clearing flags on attachment: 45126

Committed r52302: &lt;http://trac.webkit.org/changeset/52302&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>173064</commentid>
    <comment_count>17</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-12-17 23:17:26 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>173066</commentid>
    <comment_count>18</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-17 23:45:36 -0800</bug_when>
    <thetext>Nifty.  I don&apos;t actually know what either of those values do. :)  But that&apos;s OK.  That part of this function wasn&apos;t touched by either patch.  I&apos;m not going to go back and do the limits conversion now, but if I&apos;m ever in that code again I&apos;d be happy to!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>45099</attachid>
            <date>2009-12-17 11:46:57 -0800</date>
            <delta_ts>2009-12-17 23:01:31 -0800</delta_ts>
            <desc>Patch 1 for Bug 32675</desc>
            <filename>pow.txt</filename>
            <type>text/plain</type>
            <size>1755</size>
            <attacher name="Steve Block">steveblock</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA1MjI3MCkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTUgQEAKKzIwMDktMTItMTcgIFN0ZXZlIEJsb2NrICA8c3RldmVibG9ja0Bnb29n
bGUuY29tPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAg
IEZpeGVzIEhUTUxJbnB1dEVsZW1lbnQ6OnN0ZXBNaXNtYXRjaCgpIHRvIGF2b2lkIGFtYmlndW91
cyBvdmVybG9hZCBvZ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gICAgICAgIGlmIChk
b3VibGVWYWx1ZSAvIHBvdygyLCBEQkxfTUFOVF9ESUcpID4gc3RlcCkKKyAgICAgICAgaWYgKGRv
dWJsZVZhbHVlIC8gcG93KHN0YXRpY19jYXN0PGRvdWJsZT4oMiksIERCTF9NQU5UX0RJRykgPiBz
dGVwKQogICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICBkb3VibGUgcmVtYWluZGVy
ID0gZm1vZChkb3VibGVWYWx1ZSwgc3RlcCk7CiAgICAgICAgIC8vIEFjY2VwdHMgZXJyb3JzIGlu
IGxvd2VyIDctYml0LgotICAgICAgICBkb3VibGUgYWNjZXB0YWJsZUVycm9yID0gc3RlcCAvIHBv
dygyLCBEQkxfTUFOVF9ESUcgLSA3KTsKKyAgICAgICAgZG91YmxlIGFjY2VwdGFibGVFcnJvciA9
IHN0ZXAgLyBwb3coc3RhdGljX2Nhc3Q8ZG91YmxlPigyKSwgREJMX01BTlRfRElHIC0gNyk7CiAg
ICAgICAgIHJldHVybiBhY2NlcHRhYmxlRXJyb3IgPCByZW1haW5kZXIgJiYgcmVtYWluZGVyIDwg
KHN0ZXAgLSBhY2NlcHRhYmxlRXJyb3IpOwogICAgIH0KICAgICAvLyBOb24tUkFOR0UgdHlwZXMg
c2hvdWxkIGJlIHJlamVjdGVkIGJ5IGdldEFsbG93ZWRWYWx1ZVN0ZXAoKS4K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>45126</attachid>
            <date>2009-12-17 23:01:43 -0800</date>
            <delta_ts>2009-12-17 23:17:20 -0800</delta_ts>
            <desc>constant fix as recommended by Darin</desc>
            <filename>bug-32675-20091218010140.patch</filename>
            <type>text/plain</type>
            <size>1628</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
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6c3RlcE1p
c21hdGNoKCkgY29uc3QKICAgICAgICAgLy8gZG91YmxlJ3MgZnJhY3Rpb25hbCBwYXJ0IHNpemUg
aXMgREJMX01BTl9ESUctYml0LiAgSWYgdGhlIGN1cnJlbnQKICAgICAgICAgLy8gdmFsdWUgaXMg
Z3JlYXRlciB0aGFuIHN0ZXAqMl5EQkxfTUFOVF9ESUcsIHRoZSBmb2xsb3dpbmcgZm1vZCgpIG1h
a2VzCiAgICAgICAgIC8vIG5vIHNlbnNlLgotICAgICAgICBpZiAoZG91YmxlVmFsdWUgLyBwb3co
c3RhdGljX2Nhc3Q8ZG91YmxlPigyKSwgREJMX01BTlRfRElHKSA+IHN0ZXApCisgICAgICAgIGlm
IChkb3VibGVWYWx1ZSAvIHBvdygyLjAsIERCTF9NQU5UX0RJRykgPiBzdGVwKQogICAgICAgICAg
ICAgcmV0dXJuIGZhbHNlOwogICAgICAgICBkb3VibGUgcmVtYWluZGVyID0gZm1vZChkb3VibGVW
YWx1ZSwgc3RlcCk7CiAgICAgICAgIC8vIEFjY2VwdHMgZXJyb3JzIGluIGxvd2VyIDctYml0Lgot
ICAgICAgICBkb3VibGUgYWNjZXB0YWJsZUVycm9yID0gc3RlcCAvIHBvdyhzdGF0aWNfY2FzdDxk
b3VibGU+KDIpLCBEQkxfTUFOVF9ESUcgLSA3KTsKKyAgICAgICAgZG91YmxlIGFjY2VwdGFibGVF
cnJvciA9IHN0ZXAgLyBwb3coMi4wLCBEQkxfTUFOVF9ESUcgLSA3KTsKICAgICAgICAgcmV0dXJu
IGFjY2VwdGFibGVFcnJvciA8IHJlbWFpbmRlciAmJiByZW1haW5kZXIgPCAoc3RlcCAtIGFjY2Vw
dGFibGVFcnJvcik7CiAgICAgfQogICAgIC8vIE5vbi1SQU5HRSB0eXBlcyBzaG91bGQgYmUgcmVq
ZWN0ZWQgYnkgZ2V0QWxsb3dlZFZhbHVlU3RlcCgpLgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>