<?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>19123</bug_id>
          
          <creation_ts>2008-05-18 22:47:07 -0700</creation_ts>
          <short_desc>An element with block formatting context adjacent to a floated block has phantom right margin.</short_desc>
          <delta_ts>2012-02-21 09:18:45 -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>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>79046</dup_id>
          
          <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="Philippe Wittenbergh">phiw2</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bonbons67</cc>
    
    <cc>hyatt</cc>
    
    <cc>info</cc>
    
    <cc>mitz</cc>
    
    <cc>oded</cc>
    
    <cc>paranoid.android.dev</cc>
    
    <cc>priyajeet.hora</cc>
    
    <cc>zapperlott</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80882</commentid>
    <comment_count>0</comment_count>
    <who name="Philippe Wittenbergh">phiw2</who>
    <bug_when>2008-05-18 22:47:07 -0700</bug_when>
    <thetext>An element that establishes a new block formatting context – overflow:hidden in testcase – (per CSS2.1:9.4.1), has a left-margin, and is adjacent to a left floated block, has a phantom margin on the right side, equivalent in width to its left-margin.

Actual result: a 20px gap at the right of the element.

Expected result: no gap. Compare rendering in (recent) Gecko 1.9 builds.

tested with WebKit-SVN-r33561, Safari 3.1.1 and anything older

Note: with a right floated element and a right-margin on the element with block formatting, the margin is applied between the float and element, contradicting CSS2.1:9.5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80883</commentid>
    <comment_count>1</comment_count>
      <attachid>21225</attachid>
    <who name="Philippe Wittenbergh">phiw2</who>
    <bug_when>2008-05-18 22:47:53 -0700</bug_when>
    <thetext>Created attachment 21225
testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80893</commentid>
    <comment_count>2</comment_count>
      <attachid>21227</attachid>
    <who name="Philippe Wittenbergh">phiw2</who>
    <bug_when>2008-05-19 06:11:04 -0700</bug_when>
    <thetext>Created attachment 21227
testcase2

for completeness&apos; sake, a testcase with float:right and margin right on the main block. The margin-box should slide under the floated block (per CSS2.1:9.5)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80896</commentid>
    <comment_count>3</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-05-19 07:51:44 -0700</bug_when>
    <thetext>I think this is a duplicate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124373</commentid>
    <comment_count>4</comment_count>
    <who name="Oded Arbel">oded</who>
    <bug_when>2009-06-04 13:26:41 -0700</bug_when>
    <thetext>I think this is the same issue I have - a floated element causes the elements it floats next to, if they have both margin and   overflow set to non-visible, to have a phantom right margin: http://geek.co.il/articles/webkit-margin-with-float-bug.html

As the testcase in this URL shows, the phantom margin is sized according to the size of the floated element.

I can reproduce this with all webkit installations (Safari/Win, Safari/MacOSX, Chrome/Win, Chromium/Linux and even Konqueror), including nightlies. Bug #22089 may also be related.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>132984</commentid>
    <comment_count>5</comment_count>
    <who name="Paranoid Android">paranoid.android.dev</who>
    <bug_when>2009-07-19 03:27:41 -0700</bug_when>
    <thetext>Same as bug 22089 (which has a somewhat clearer test case).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172294</commentid>
    <comment_count>6</comment_count>
      <attachid>44977</attachid>
    <who name="Jonas Munk">jonasmunk</who>
    <bug_when>2009-12-16 07:50:10 -0800</bug_when>
    <thetext>Created attachment 44977
Test case showing float-overflow-margin bug

Thought i might as well attach this test case since I already made it, hope it helps :-)

This technique is very common so I would consider it to be fairly critical.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>342192</commentid>
    <comment_count>7</comment_count>
    <who name="Darth">priyajeet.hora</who>
    <bug_when>2011-01-29 20:59:29 -0800</bug_when>
    <thetext>Similar downstream bug http://code.google.com/p/chromium/issues/detail?id=69052</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>560946</commentid>
    <comment_count>8</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2012-02-21 09:18:45 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 79046 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>21225</attachid>
            <date>2008-05-18 22:47:53 -0700</date>
            <delta_ts>2008-05-18 22:47:53 -0700</delta_ts>
            <desc>testcase</desc>
            <filename>bfc-webkit.html</filename>
            <type>text/html</type>
            <size>811</size>
            <attacher name="Philippe Wittenbergh">phiw2</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+CjxtZXRhIGh0dHAtZXF1aXY9
ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sO2NoYXJzZXQ9dXRmLTgiPgoKCjxzdHls
ZSB0eXBlPSJ0ZXh0L2NzcyI+Cmh0bWwge2ZvbnQtc2l6ZToxMDAlOyBjb2xvcjojMjIyOyBiYWNr
Z3JvdW5kOiNmZWZlZmUgdXJsKC4uL19pbWcvbGF5b3V0X2dyaWQucG5nKSByZXBlYXQgMCAwOyBt
YXJnaW46MDt9CmJvZHkge2ZvbnQ6IDFlbS8xLjUgSGVsdmV0aWNhLCBzYW5zLXNlcmlmOyBtYXJn
aW46MWVtIDUlOyBiYWNrZ3JvdW5kOnRyYW5zcGFyZW50OyB9CgouZmxvYXQgewoJCWZsb2F0OiBs
ZWZ0OwoJCWJhY2tncm91bmQ6ICM5Zjk7CgkJYm9yZGVyOiAzcHggc29saWQgIzBmMDsKCX0KCi5i
ZmMgewoJCW92ZXJmbG93OiBoaWRkZW47ICAgIAoJCW1hcmdpbjogMCAwIDAgMjBweDsKCQliYWNr
Z3JvdW5kOiAjZjlmOwoJCWJvcmRlcjogM3B4IHNvbGlkICNmMGY7Cgl9Cgoud3JhcCB7CgkJYm9y
ZGVyOiAzcHggc29saWQgYmxhY2s7CgkJZm9udC1zaXplOjJlbTsKCX0KCjwvc3R5bGU+Cjx0aXRs
ZT50ZXN0PC90aXRsZT4KPC9oZWFkPgo8Ym9keT4KPGRpdiBjbGFzcz0id3JhcCI+CgkJPGRpdiBj
bGFzcz0iZmxvYXQiPkZsb2F0PC9kaXY+CgkJPGRpdiBjbGFzcz0iYmZjIj5vdmVyZmxvdzpoaWRk
ZW48YnI+QW5kIHNvbWUgbm9u4oCTc2Vuc2ljYWwgdGV4dCB0byBmb3JjZSB0aGUgZWxlbWVudCB0
byBoYXZlIGNvbnRlbnRzIHRvIHNwYW4gbXVsdGlwbGUgbGluZXMuPC9kaXY+CjwvZGl2PgoKCjwv
Ym9keT4KPC9odG1sPg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>21227</attachid>
            <date>2008-05-19 06:11:04 -0700</date>
            <delta_ts>2008-05-19 06:11:04 -0700</delta_ts>
            <desc>testcase2</desc>
            <filename>bfc-webkit2.html</filename>
            <type>text/html</type>
            <size>772</size>
            <attacher name="Philippe Wittenbergh">phiw2</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+CjxtZXRhIGh0dHAtZXF1aXY9
ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sO2NoYXJzZXQ9dXRmLTgiPgoKCjxzdHls
ZSB0eXBlPSJ0ZXh0L2NzcyI+Cmh0bWwge2ZvbnQtc2l6ZToxMDAlOyBjb2xvcjojMjIyOyBiYWNr
Z3JvdW5kOiNmZWZlZmU7IG1hcmdpbjowO30KYm9keSB7Zm9udDogMWVtLzEuNSBIZWx2ZXRpY2Es
IHNhbnMtc2VyaWY7IG1hcmdpbjoxZW0gNSU7IGJhY2tncm91bmQ6dHJhbnNwYXJlbnQ7IH0KCi5m
bG9hdCB7CgkJZmxvYXQ6IHJpZ2h0OwoJCWJhY2tncm91bmQ6ICM5Zjk7CgkJYm9yZGVyOiAzcHgg
c29saWQgIzBmMDsKCX0KCi5iZmMgewoJCW92ZXJmbG93OiBoaWRkZW47ICAgIAoJCW1hcmdpbjog
MCAyMHB4IDAgMDsKCQliYWNrZ3JvdW5kOiAjZjlmOwoJCWJvcmRlcjogM3B4IHNvbGlkICNmMGY7
Cgl9Cgoud3JhcCB7CgkJYm9yZGVyOiAzcHggc29saWQgYmxhY2s7CgkJZm9udC1zaXplOjJlbTsK
CX0KCjwvc3R5bGU+Cjx0aXRsZT50ZXN0PC90aXRsZT4KPC9oZWFkPgo8Ym9keT4KPGRpdiBjbGFz
cz0id3JhcCI+CgkJPGRpdiBjbGFzcz0iZmxvYXQiPkZsb2F0PC9kaXY+CgkJPGRpdiBjbGFzcz0i
YmZjIj5vdmVyZmxvdzpoaWRkZW48YnI+QW5kIHNvbWUgbm9u4oCTc2Vuc2ljYWwgdGV4dCB0byBm
b3JjZSB0aGUgZWxlbWVudCB0byBoYXZlIGNvbnRlbnRzIHRvIHNwYW4gbXVsdGlwbGUgbGluZXMu
PC9kaXY+CjwvZGl2PgoKCjwvYm9keT4KPC9odG1sPg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>44977</attachid>
            <date>2009-12-16 07:50:10 -0800</date>
            <delta_ts>2009-12-16 07:50:10 -0800</delta_ts>
            <desc>Test case showing float-overflow-margin bug</desc>
            <filename>overflow-margin-bug.html</filename>
            <type>text/html</type>
            <size>933</size>
            <attacher name="Jonas Munk">jonasmunk</attacher>
            
              <data encoding="base64">PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIGh0bWwgUFVC
TElDICItLy9XM0MvL0RURCBYSFRNTCAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIveGh0
bWwxMS9EVEQveGh0bWwxMS5kdGQiPgo8aHRtbCB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5
OS94aHRtbCIgeG1sOmxhbmc9ImVuIj4KPGhlYWQ+Cgk8dGl0bGU+VGVzdDwvdGl0bGU+CjwvaGVh
ZD4KPGJvZHk+Cgk8aDE+VGVzdCBjYXNlIGZvciBwb3NzaWJsZSB3ZWJraXQgYnVnPC9oMT4KCTxw
PlJlcHJvZHVjZWQgd2l0aCBzYWZhcmkgNCxjaHJvbWUgcGx1cyB3ZWJraXQgbmlnaHRseSBtYWM8
L3A+Cgk8ZGl2IGhyZWY9IiIgc3R5bGU9ImZsb2F0OiBsZWZ0OyB3aWR0aDogMTAwcHg7IGJhY2tn
cm91bmQ6IGdyZWVuOyBoZWlnaHQ6IDIwcHg7Ij48L2Rpdj4KCTxkaXYgc3R5bGU9Im1hcmdpbi1s
ZWZ0OiAzMDBweDsgb3ZlcmZsb3c6IGhpZGRlbjsgYmFja2dyb3VuZDogcmVkOyI+CgkJCgkJPHA+
PHN0cm9uZz5UaGlzIGhhcyBvdmVyZmxvdyBoaWRkZW48L3N0cm9uZz48L3A+CgkJPHA+SXQgc2Vl
bXMgdGhlIHdpZHRoIG9mIHRoZSBmbG9hdGluZyBncmVlbiB0aGluZyBpcyBhZGRlZCBhcyBtYXJn
aW4tcmlnaHQgb2YgdGhlIHJlZCBvbmU8L3A+Cgk8L2Rpdj4KCQoJPGhyLz4KCQoJPGRpdiBocmVm
PSIiIHN0eWxlPSJmbG9hdDogbGVmdDsgd2lkdGg6IDEwMHB4OyBiYWNrZ3JvdW5kOiBncmVlbjsg
aGVpZ2h0OiAyMHB4OyI+PC9kaXY+Cgk8ZGl2IHN0eWxlPSJtYXJnaW4tbGVmdDogMzAwcHg7IGJh
Y2tncm91bmQ6IHJlZDsiPgoJCTxwPjxzdHJvbmc+VGhpcyBoYXMgTk9UIG92ZXJmbG93IGhpZGRl
bjwvc3Ryb25nPjwvcD4KCQk8cD5NYXliZSBzb21lIG1hcmdpbi1jb2xsYXBzaW5nPzwvcD4KCTwv
ZGl2Pgo8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>