<?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>135160</bug_id>
          
          <creation_ts>2006-10-05 17:52:01 +0000</creation_ts>
          <short_desc>[test case] non standard CSS float: right rendering</short_desc>
          <delta_ts>2006-10-26 21:21:21 +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 renderer</component>
          <version>unspecified</version>
          <rep_platform>Debian testing</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 name="Olivier Trichet">nive</reporter>
          <assigned_to name="Konqueror Bugs">konqueror-bugs-null</assigned_to>
          <cc>ana</cc>
          
          <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>474891</commentid>
    <comment_count>0</comment_count>
    <who name="Olivier Trichet">nive</who>
    <bug_when>2006-10-05 17:52:01 +0000</bug_when>
    <thetext>Version:            (using KDE KDE 3.5.4)
Installed from:    Debian testing/unstable Packages

On the test page (that will be submitted latter), the 2 boxes should share the same top and right
edges (cf. CSS 2.1, 9.5.1: The left outer edge of a left-floating box may not be to the left of the left edge of its containing block. An analogous rule holds for right-floating elements.), in konqueror they don&apos;t. Mozilla renders this correctly.

[imported from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=357017]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>474892</commentid>
    <comment_count>1</comment_count>
      <attachid>18022</attachid>
    <who name="Olivier Trichet">nive</who>
    <bug_when>2006-10-05 17:54:37 +0000</bug_when>
    <thetext>Created attachment 18022
HTML test case page</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>474909</commentid>
    <comment_count>2</comment_count>
    <who name="Allan Sandfeld">kde</who>
    <bug_when>2006-10-05 19:21:49 +0000</bug_when>
    <thetext>Confirmed. Might be something to do with adding or subtracting the border width incorrectly..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>478299</commentid>
    <comment_count>3</comment_count>
      <attachid>18194</attachid>
    <who name="Allan Sandfeld">kde</who>
    <bug_when>2006-10-19 20:35:34 +0000</bug_when>
    <thetext>Created attachment 18194
Patch

This patch removes the constraints forcing floats not to make left overflow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>480002</commentid>
    <comment_count>4</comment_count>
    <who name="Allan Sandfeld">kde</who>
    <bug_when>2006-10-26 21:21:20 +0000</bug_when>
    <thetext>SVN commit 599349 by carewolf:

Let floats overflow the left border when they should.
BUG:135160 


 M  +7 -4      render_block.cpp  


--- branches/KDE/3.5/kdelibs/khtml/rendering/render_block.cpp #599348:599349
@@ -1896,7 +1896,6 @@
                 _height = o-&gt;height() + o-&gt;marginTop() + o-&gt;marginBottom();
                 f-&gt;width = o-&gt;width() + o-&gt;marginLeft() + o-&gt;marginRight();
             }
-            if (fx&lt;0) fx=0;
             f-&gt;left = fx;
             //kdDebug( 6040 ) &lt;&lt; &quot;positioning left aligned float at (&quot; &lt;&lt; fx + o-&gt;marginLeft()  &lt;&lt; &quot;/&quot; &lt;&lt; y + o-&gt;marginTop() &lt;&lt; &quot;) fx=&quot; &lt;&lt; fx &lt;&lt; endl;
             o-&gt;setPos(fx + o-&gt;marginLeft(), y + o-&gt;marginTop());
@@ -1921,14 +1920,18 @@
                 _height = o-&gt;height() + o-&gt;marginTop() + o-&gt;marginBottom();
                 f-&gt;width = o-&gt;width() + o-&gt;marginLeft() + o-&gt;marginRight();
             }
-            if (fx&lt;f-&gt;width) fx=f-&gt;width;
             f-&gt;left = fx - f-&gt;width;
             //kdDebug( 6040 ) &lt;&lt; &quot;positioning right aligned float at (&quot; &lt;&lt; fx - o-&gt;marginRight() - o-&gt;width() &lt;&lt; &quot;/&quot; &lt;&lt; y + o-&gt;marginTop() &lt;&lt; &quot;)&quot; &lt;&lt; endl;
             o-&gt;setPos(fx - o-&gt;marginRight() - o-&gt;width(), y + o-&gt;marginTop());
         }
 
-        if ( m_layer &amp;&amp; style()-&gt;hidesOverflow() &amp;&amp; (o-&gt;xPos()+o-&gt;width() &gt; m_overflowWidth) )
-            m_overflowWidth = o-&gt;xPos()+o-&gt;width();
+        if ( m_layer &amp;&amp; style()-&gt;hidesOverflow()) {
+            if (o-&gt;xPos()+o-&gt;width() &gt; m_overflowWidth)
+                m_overflowWidth = o-&gt;xPos()+o-&gt;width();
+            else
+            if (o-&gt;xPos() &lt; m_overflowLeft)
+                m_overflowLeft = o-&gt;xPos();
+        }
 
         f-&gt;startY = y;
         f-&gt;endY = f-&gt;startY + _height;
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>18022</attachid>
            <date>2006-10-05 17:54:37 +0000</date>
            <delta_ts>2006-10-05 17:54:37 +0000</delta_ts>
            <desc>HTML test case page</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>302</size>
            <attacher name="Olivier Trichet">nive</attacher>
            
              <data encoding="base64">PGh0bWw+Cgo8aGVhZD4KCTxzdHlsZT4KCQlkaXYuYm94MiB7CgkJCWJvcmRlcjogc29saWQgMnB4
IGdyZWVuOwoJCQl3aWR0aDoxMDBweDsKCQkJaGVpZ2h0Ojc1cHg7CgkJfQoJCWRpdi5ib3gzIHsK
CQkJYm9yZGVyOiBzb2xpZCAycHggZ3JleTsKCQkJZmxvYXQ6IHJpZ2h0OwoJCQl3aWR0aDoxNTBw
eDsKCQkJaGVpZ2h0OjUwcHg7CgkJfQoJPC9zdHlsZT4KPC9oZWFkPgoKPGJvZHk+Cgk8ZGl2IGNs
YXNzPSJib3gyIj4KCQk8ZGl2IGNsYXNzPSJib3gzIj4KCQkJbWV1aAoJCTwvZGl2PgoJPC9kaXY+
CjwvYm9keT4KCjwvaHRtbD4=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>18194</attachid>
            <date>2006-10-19 20:35:34 +0000</date>
            <delta_ts>2006-10-19 20:35:34 +0000</delta_ts>
            <desc>Patch</desc>
            <filename>float-patch.diff</filename>
            <type>text/plain</type>
            <size>1686</size>
            <attacher name="Allan Sandfeld">kde</attacher>
            
              <data encoding="base64">SW5kZXg6IHJlbmRlcmluZy9yZW5kZXJfYmxvY2suY3BwCj09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHJlbmRlcmlu
Zy9yZW5kZXJfYmxvY2suY3BwCShyZXZpc2lvbiA1OTcyMTYpCisrKyByZW5kZXJpbmcvcmVuZGVy
X2Jsb2NrLmNwcAkod29ya2luZyBjb3B5KQpAQCAtMTg5Niw3ICsxODk2LDYgQEAKICAgICAgICAg
ICAgICAgICBfaGVpZ2h0ID0gby0+aGVpZ2h0KCkgKyBvLT5tYXJnaW5Ub3AoKSArIG8tPm1hcmdp
bkJvdHRvbSgpOwogICAgICAgICAgICAgICAgIGYtPndpZHRoID0gby0+d2lkdGgoKSArIG8tPm1h
cmdpbkxlZnQoKSArIG8tPm1hcmdpblJpZ2h0KCk7CiAgICAgICAgICAgICB9Ci0gICAgICAgICAg
ICBpZiAoZng8MCkgZng9MDsKICAgICAgICAgICAgIGYtPmxlZnQgPSBmeDsKICAgICAgICAgICAg
IC8va2REZWJ1ZyggNjA0MCApIDw8ICJwb3NpdGlvbmluZyBsZWZ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9
IG8tPnhQb3MoKStvLT53aWR0aCgpOworICAgICAgICBpZiAoIG1fbGF5ZXIgJiYgc3R5bGUoKS0+
aGlkZXNPdmVyZmxvdygpKSB7CisgICAgICAgICAgICBpZiAoby0+eFBvcygpK28tPndpZHRoKCkg
PiBtX292ZXJmbG93V2lkdGgpCisgICAgICAgICAgICAgICAgbV9vdmVyZmxvd1dpZHRoID0gby0+
eFBvcygpK28tPndpZHRoKCk7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICBpZiAoby0+
eFBvcygpIDwgbV9vdmVyZmxvd0xlZnQpCisgICAgICAgICAgICAgICAgbV9vdmVyZmxvd0xlZnQg
PSBvLT54UG9zKCk7CisgICAgICAgIH0KIAogICAgICAgICBmLT5zdGFydFkgPSB5OwogICAgICAg
ICBmLT5lbmRZID0gZi0+c3RhcnRZICsgX2hlaWdodDsK
</data>

          </attachment>
      

    </bug>

</bugzilla>