<?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>13538</bug_id>
          
          <creation_ts>2007-04-29 01:51:27 -0700</creation_ts>
          <short_desc>Adjacent absolutely positioned element and siblings in CSS table placed below adjacent replaced content (&lt;img&gt;/&lt;object&gt;/etc.)</short_desc>
          <delta_ts>2012-06-21 20:03:44 -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>CSS</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://canvex.lazyilluminati.com/83/play.xhtml</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Elliott Sprehn">esprehn</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>gavin.sharp</cc>
    
    <cc>mitz</cc>
    
    <cc>robert</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11778</commentid>
    <comment_count>0</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-04-29 01:51:27 -0700</bug_when>
    <thetext>On the referenced page the canvas and help content is pushed down below below the two &lt;object&gt;&apos;s on either side of the box in the middle of the page, each of which loads a single svg image.

If the absolutely positioned help section is hidden with #help_bg { display: none; } the page renders as expected.

The help content, which is positioned absolutely over the canvas, renders as expected over the canvas as shown when hovering the &quot;help&quot; link, though the entire section is pushed down below the objects.

It appears as though the inner section is being expanded to 200% height.

The canvas is unrelated as the section&apos;s height still expands and pushes the content down even if the canvas is not present.

Reproducible in Safari 2.0.4 and the latest nightly (Sun Apr 29 3:44:55 GMT 2007).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11779</commentid>
    <comment_count>1</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-04-29 01:52:50 -0700</bug_when>
    <thetext>Needs a reduction; I&apos;ll do it when I get some time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11798</commentid>
    <comment_count>2</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2007-04-29 04:04:16 -0700</bug_when>
    <thetext>Willing to bet the table display types have something to do with this bug.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11577</commentid>
    <comment_count>3</comment_count>
      <attachid>14279</attachid>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-04-30 19:41:38 -0700</bug_when>
    <thetext>Created attachment 14279
Sample Image</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11579</commentid>
    <comment_count>4</comment_count>
      <attachid>14280</attachid>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-04-30 20:07:45 -0700</bug_when>
    <thetext>Created attachment 14280
Reduction

In the attached test case two CSS table cells are placed adjacent to each other, each with a single element of replaced content (in this case an img). An element is placed before the replaced content and positioned absolutely to place it over the img. 

However, Webkit places the entire cell down near the bottom of the replaced content in the second column.

Resizing (-/+) the text causes the dropped element to move up and down.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11572</commentid>
    <comment_count>5</comment_count>
      <attachid>14281</attachid>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-04-30 20:18:36 -0700</bug_when>
    <thetext>Created attachment 14281
Cross Browser Consistency

If a div is used in place of the replaced content in the adjacent element with the absolutely positioned child then Presto and Gecko behave very similarly to Webkit, while webkit remains consistent in both cases.

Webkit still moves the element up an down depending on the size of the text though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11569</commentid>
    <comment_count>6</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-04-30 20:32:14 -0700</bug_when>
    <thetext>It appears that if there&apos;s no content in the absolutely positioned adjacent cell then the cell is not dropped down in Webkit. Still is in Presto and Gecko though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11570</commentid>
    <comment_count>7</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-04-30 20:34:40 -0700</bug_when>
    <thetext>References to Gecko and Presto here are for Firefox 2 and Opera 9.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62769</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-11-30 02:28:01 -0800</bug_when>
    <thetext>When the display:table-cell divs are replaced by real table cells the bug does not reproduce.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63297</commentid>
    <comment_count>9</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2007-12-04 17:24:13 -0800</bug_when>
    <thetext>Real table cells use vertical-align:middle by default.  CSS tables default to vertical-align:baseline. This is an unfortunate difference between the two, especially since the baseline of table cells is actually very poorly defined.

The bug here is that RenderTableCell::baselinePosition always uses the first content it encounters to determine a baseline.  In this case that is the absolutely positioned div.  The behavior of this method is definitely incorrect, since we should be looking for a real baseline (like inline-block does).  In this case the canvas element establishes a real first line baseline, so we should be respecting it.

Changing this method will be kind of dangerous and might break existing tables, but it might be worth trying to improve.  In the meantime, the author could work around the problem with a vertical-align:middle on the table cells.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>445950</commentid>
    <comment_count>10</comment_count>
    <who name="Robert Hogan">robert</who>
    <bug_when>2011-08-03 11:08:14 -0700</bug_when>
    <thetext>Is this still a problem? I get consistent results across Chromium 12, FF4 and Opera 9 for &apos;Reduction&apos;. Consistent results between Chromium 12 and FF4 for &apos;Cross Browser Consistency&apos;, while Opera 9 displays the second cell in a new row. 
Chromium 12 displays different results for each of the results.

QtTestBrowser against trunk is consistent with Chromium 12.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>655187</commentid>
    <comment_count>11</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2012-06-21 20:03:44 -0700</bug_when>
    <thetext>This appears to be fixed now. I&apos;m not sure at what point things changed in there, hyatt@ would have to comment.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>14279</attachid>
            <date>2007-04-30 19:41:38 -0700</date>
            <delta_ts>2007-04-30 19:41:38 -0700</delta_ts>
            <desc>Sample Image</desc>
            <filename>img.png</filename>
            <type>image/png</type>
            <size>1478</size>
            <attacher name="Elliott Sprehn">esprehn</attacher>
            
              <data encoding="base64">iVBORw0KGgoAAAANSUhEUgAAAA0AAADyCAIAAAAZTdjnAAAFE2lDQ1BJQ0MgUHJvZmlsZQAAeJy1
1HlYFGUcB/Dv7MFiIq6whLeDeCaHkCkkzCyg4kEKmxbQYXu5uynsOoyKmTljHqWmdqpoeFBZHmWl
lZmpWabgDYJyihZyqKECi4DoHzMLbED+1fs88zy/33vM+/4+8+4CrjVam22OBEBSMstooiPJ+IRE
UpEDCRTwRCB8tPoUW0RsbAw6bXW5IAAg219nZEx+ds/dGZq4ZrWtutvwtb1TO18HAHAzGFP0AKEC
EKG3MSxAxAPwY+ITEgFiGQCVSYg3AlDphHgPANUC1sYCxFEAKt1sGwsQOQBUzHRNFECUA3A3CXE9
AHfddE0UIHEF4D5fb2IBSU9A6qEzMmZA7gdITwrnAQB4xVoXGJlIq3U2GT2KDAr2tyTrzW3O3uk4
a0xlASDKalvIWExmlgwKDQ3xDx45MojUGRmTwZhiMSWTlmR9AOITEknhdZYuQNhAoGtta5+xK7Bl
NeB7vLVv2CFgaAKQMa+1r3oxCACE9/jWvtamn8fMF0NCwj0+F2zEJiUgfF8AIAhCIpX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kJt5ZahXkH/ncHkiSdHGZ1W0Ols1YqOyuTVjZLaHpFBj2jbymtvbvosQ7pSeucHLLP
Bjo5KJv7OTnQ5fHtHIR5IU4O9PX9nTk8Ar5qj+seGySZAAAAbklEQVRoge3YIQ7CABQD0P5lyVAo
FPc/2uwSAgqzjyPbxBQC8aqa9J2g1d05SVWSdA9naBOO4ziO4ziO4ziO4ziO+6Ubv+39mqvGw9zX
TM+9W5bHcLkd3LrmniQpfxjHcRzHcRzHcRzHcRz3x+4D+0kVu1NWfBAAAAAASUVORK5CYII=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>14280</attachid>
            <date>2007-04-30 20:07:45 -0700</date>
            <delta_ts>2007-04-30 20:07:45 -0700</delta_ts>
            <desc>Reduction</desc>
            <filename>Reduction.html</filename>
            <type>text/html</type>
            <size>1411</size>
            <attacher name="Elliott Sprehn">esprehn</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDov
L3d3dy53My5vcmcvVFIvaHRtbDQvc3RyaWN0LmR0ZCI+Cgo8aHRtbD4KPGhlYWQ+Cgk8dGl0bGU+
Q2FudmV4IFJlZHVjdGlvbjwvdGl0bGU+CgoJPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCQkvKiBG
aXJzdCB0d28gcnVsZXMgYXJlIGhlcmUgc28gd2UgY2FuIHNlZSB3aGVyZSB0aGUgZWRnZXMgYXJl
LiAKCQkgICBOb3QgcmVsYXRlZCB0byB0aGUgYnVnLgoJCSovCgkJYm9keSAqIHsgCgkJCWJvcmRl
cjogMXB4IHNvbGlkIGJsdWU7IAoJCQlwYWRkaW5nOiA1cHg7IAoJCX0KCQkjaW5uZXIgeyBib3Jk
ZXI6IDJweCBzb2xpZCBncmVlbjsgfQoJCQoJCQoJCS8qIEJlbG93IGlzIHJlcXVpcmVkIHRvIGRp
c3BsYX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pcyBwbGFjZWQKCQkJCQlj
b3JyZWN0bHkgb3ZlciB0aGUgaW1hZ2UgYW5kIG5vIHNwYWNlIGFib3ZlIHRoZSBwYXJlbnQgY2Vs
bAoJCQkJCWlzIGdlbmVyYXRlZC4KCQkJCS0tPgoJCQkJY29udGVudAoJCQk8L2Rpdj4JCQkKCQkJ
PGltZyBzcmM9Imh0dHA6Ly9idWdzLndlYmtpdC5vcmcvYXR0YWNobWVudC5jZ2k/aWQ9MTQyNzki
IGFsdD0iIj4KCQk8L2Rpdj4KCTwvZGl2PgoKPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>14281</attachid>
            <date>2007-04-30 20:18:36 -0700</date>
            <delta_ts>2007-04-30 20:18:36 -0700</delta_ts>
            <desc>Cross Browser Consistency</desc>
            <filename>Consistency.html</filename>
            <type>text/html</type>
            <size>1146</size>
            <attacher name="Elliott Sprehn">esprehn</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiAiaHR0cDov
L3d3dy53My5vcmcvVFIvaHRtbDQvc3RyaWN0LmR0ZCI+Cgo8aHRtbD4KPGhlYWQ+Cgk8dGl0bGU+
Q2FudmV4IFJlZHVjdGlvbjwvdGl0bGU+CgoJPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCQkvKiBG
aXJzdCB0d28gcnVsZXMgYXJlIGhlcmUgc28gd2UgY2FuIHNlZSB3aGVyZSB0aGUgZWRnZXMgYXJl
LiAKCQkgICBOb3QgcmVsYXRlZCB0byB0aGUgYnVnLgoJCSovCgkJYm9keSAqIHsgCgkJCWJvcmRl
cjogMXB4IHNvbGlkIGJsdWU7IAoJCQlwYWRkaW5nOiA1cHg7IAoJCX0KCQkjaW5uZXIgeyBib3Jk
ZXI6IDJweCBzb2xpZCBncmVlbjsgfQoJCQoJCS8qIEJlbG93I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