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

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>115141</bug_id>
          
          <creation_ts>2005-10-26 19:54:27 +0000</creation_ts>
          <short_desc>input type=&quot;file&quot; and type=&quot;text&quot; get wrong size</short_desc>
          <delta_ts>2007-01-06 18:04:04 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konqueror</product>
          <component>khtml</component>
          <version>unspecified</version>
          <rep_platform>Gentoo Packages</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>hanno</reporter>
          <assigned_to name="Konqueror Bugs">konqueror-bugs-null</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>384804</commentid>
    <comment_count>0</comment_count>
    <who name="">hanno</who>
    <bug_when>2005-10-26 19:54:27 +0000</bug_when>
    <thetext>Version:            (using KDE KDE 3.4.92)
Installed from:    Gentoo Packages

HTML-Code:
&lt;form&gt;
&lt;input type=&quot;file&quot; size=&quot;10&quot;&gt;&lt;br/&gt;
&lt;input type=&quot;text&quot; size=&quot;10&quot;&gt;
&lt;/form&gt;

Both input-fields should have the same size, but the file-field has more than twice the size of the text-field.
According to the html-spec, 
&quot;The width is given in pixels except when  type attribute has the value &quot;text&quot; or &quot;password&quot;. In that case, its value refers to the (integer) number of characters.&quot;

First, the behaviour for text and file should be the same.
Second, meeting the spec exactly seems to be impossible without fixed-width fonts. But at least 10 Digits should fit in it (in Firefox, it is the case, exactly place for 10 Digits).

http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#adef-size-INPUT</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>498537</commentid>
    <comment_count>1</comment_count>
    <who name="Juan Carlos Torres">carlosdgtorres</who>
    <bug_when>2007-01-06 11:40:27 +0000</bug_when>
    <thetext>I can confirm this behavior on Kubuntu 6.10. using KDE 3.5.5.
Firefox 2.0 displays the sizes correctly, and so does Internet Explorer 6 (ies4linux). Strangely enough, Opera 9.02 doesn&apos;t seem to get this correct either.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>498759</commentid>
    <comment_count>2</comment_count>
    <who name="Germain Garand">germain</who>
    <bug_when>2007-01-06 18:04:03 +0000</bug_when>
    <thetext>SVN commit 620582 by ggarand:

fix RenderFileButton minmaxwidth calculation

BUG: 115141


 M  +2 -2      render_form.cpp  


--- trunk/KDE/kdelibs/khtml/rendering/render_form.cpp #620581:620582
@@ -843,7 +843,7 @@
     int size = element()-&gt;size();
 
     int h = fm.lineSpacing();
-    int w = fm.width( &apos;x&apos; ) * (size &gt; 0 ? size : 17); // &quot;some&quot;
+    int w = fm.width( &apos;x&apos; ) * (size &gt; 0 ? size+1 : 17); // &quot;some&quot;
     KLineEdit* edit = static_cast&lt;KUrlRequester*&gt;( m_widget )-&gt;lineEdit();
 
     QStyleOption opt;
@@ -852,7 +852,7 @@
                                              &amp;opt,
           QSize(w + 2 + 2, qMax(h, 14) + 2 + 2), edit)
         .expandedTo(QApplication::globalStrut());
-    QSize bs = static_cast&lt;KUrlRequester*&gt;( m_widget )-&gt;sizeHint();
+    QSize bs = static_cast&lt;KUrlRequester*&gt;( m_widget )-&gt;minimumSizeHint() - edit-&gt;minimumSizeHint();
 
     setIntrinsicWidth( s.width() + bs.width() );
     setIntrinsicHeight( qMax(s.height(), bs.height()) );
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>