<?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>18714</bug_id>
          
          <creation_ts>2008-04-24 08:10:16 -0700</creation_ts>
          <short_desc>Sub-elements do not expand when parent elements do if min-width/height is applied to parent</short_desc>
          <delta_ts>2024-11-28 13:28:25 -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>All</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>0</everconfirmed>
          <reporter name="Scott Park">scott</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>brilliand+bugzilla</cc>
    
    <cc>scott</cc>
    
    <cc>sellapinky08</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>78775</commentid>
    <comment_count>0</comment_count>
    <who name="Scott Park">scott</who>
    <bug_when>2008-04-24 08:10:16 -0700</bug_when>
    <thetext>Sub-elements set to 100% width and height do not properly resize with parents if the parent element has min-width/height applied via CSS. Removal of the min-width/height specification returns resizing to normal.

This situation does not occur in Firefox 2.0.0.14 or in IE 7. This occurs in Safari 3.1.1 (10.5, Win XP) and Webkit nightly r32416 (10.5).

&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;
        &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
	&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;
	&lt;title&gt;Untitled&lt;/title&gt;
	&lt;meta name=&quot;generator&quot; content=&quot;BBEdit 8.7&quot;&gt;
	&lt;style type=&quot;text/css&quot;&gt;
&lt;!--
	html,
	body,
	div#test1,
	div#test2 {
		width: 100%;
		height: 100%;
	}
	
	div#test1,
	div#test2 {
		border: 1px black solid;
	}
	
	div#test1 {
		min-height: 1000px;
		min-width: 1000px;
	}
--&gt;
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;div id=&quot;test1&quot;&gt;
		&lt;div id=&quot;test2&quot;&gt;
			&lt;p&gt;Content&lt;/p&gt;
		&lt;/div&gt;
	&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78776</commentid>
    <comment_count>1</comment_count>
      <attachid>20792</attachid>
    <who name="Scott Park">scott</who>
    <bug_when>2008-04-24 08:13:39 -0700</bug_when>
    <thetext>Created attachment 20792
Test-case

This is a test-case for the bug. Start the window out small, load, then increase its size. Sub-element will not increase.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78777</commentid>
    <comment_count>2</comment_count>
      <attachid>20793</attachid>
    <who name="Scott Park">scott</who>
    <bug_when>2008-04-24 08:27:31 -0700</bug_when>
    <thetext>Created attachment 20793
Correct test case

The previous test case had a typo. It removed the min-x attribute making it work. This attachment should demonstrate the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>540807</commentid>
    <comment_count>3</comment_count>
      <attachid>123614</attachid>
    <who name="Silas Brill">brilliand+bugzilla</who>
    <bug_when>2012-01-23 13:50:07 -0800</bug_when>
    <thetext>Created attachment 123614
Testcase for min-height with html and body

I recently ran into this problem when adding size styles to html and body.  The min-width problem (but not the min-height problem) seems to have been fixed since this bug was posted, and the behavior is different depending on whether the elements being styled are html and body.  This attachment demonstrates the problem for html and body.  Firefox handles this situation correctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>540814</commentid>
    <comment_count>4</comment_count>
      <attachid>123616</attachid>
    <who name="Silas Brill">brilliand+bugzilla</who>
    <bug_when>2012-01-23 13:56:15 -0800</bug_when>
    <thetext>Created attachment 123616
Testcase for min-height and min-width with other elements

Here&apos;s a testcase for min-height and min-width using divs instead of html and body.  The min-width behavior appears to be completely correct.  The min-height behavior matches Firefox in this case, but it still appears the be wrong (the element with class=&quot;body&quot; should expand to fill the element with class=&quot;html&quot;, but appears to be sizing to enclose its child element instead, for some reason).  IE9 has the same behavior as Firefox for both of these testcases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>540818</commentid>
    <comment_count>5</comment_count>
    <who name="Silas Brill">brilliand+bugzilla</who>
    <bug_when>2012-01-23 14:03:54 -0800</bug_when>
    <thetext>I just realized that I&apos;m not having the same problem that this bug was about, although it&apos;s triggered under approximately the same conditions.  I&apos;ll file a separate bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1942235</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-03-17 18:39:01 -0700</bug_when>
    <thetext>All browsers (WebKit ToT [261814@main], Chrome Canary 113 and Firefox Nightly 113) match each other.

Marking this as “RESOLVED WONTFIX” because this bug was never confirmed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>20792</attachid>
            <date>2008-04-24 08:13:39 -0700</date>
            <delta_ts>2008-04-24 08:27:31 -0700</delta_ts>
            <desc>Test-case</desc>
            <filename>test-case.html</filename>
            <type>text/html</type>
            <size>601</size>
            <attacher name="Scott Park">scott</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIgogICAgICAg
ICJodHRwOi8vd3d3LnczLm9yZy9UUi9odG1sNC9zdHJpY3QuZHRkIj4KPGh0bWwgbGFuZz0iZW4i
Pgo8aGVhZD4KCTxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9o
dG1sOyBjaGFyc2V0PXV0Zi04Ij4KCTx0aXRsZT5VbnRpdGxlZDwvdGl0bGU+Cgk8bWV0YSBuYW1l
PSJnZW5lcmF0b3IiIGNvbnRlbnQ9IkJCRWRpdCA4LjciPgoJPHN0eWxlIHR5cGU9InRleHQvY3Nz
Ij4KPCEtLQoJaHRtbCwKCWJvZHksCglkaXYjdGVzdDEsCglkaXYjdGVzdDIgewoJCXdpZHRoOiAx
MDAlOwoJCWhlaWdodDogMTAwJTsKCX0KCQoJZGl2I3Rlc3QxLAoJZGl2I3Rlc3QyIHsKCQlib3Jk
ZXI6IDFweCBibGFjayBzb2xpZDsKCX0KCQoJZGl2I2F0ZXN0MSB7CgkJbWluLWhlaWdodDogMTAw
MHB4OwoJCW1pbi13aWR0aDogMTAwMHB4OwoJfQotLT4KPC9zdHlsZT4KPC9oZWFkPgo8Ym9keT4K
CTxkaXYgaWQ9InRlc3QxIj4KCQk8ZGl2IGlkPSJ0ZXN0MiI+CgkJCTxwPkNvbnRlbnQ8L3A+CgkJ
PC9kaXY+Cgk8L2Rpdj4KPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>20793</attachid>
            <date>2008-04-24 08:27:31 -0700</date>
            <delta_ts>2008-04-24 08:27:31 -0700</delta_ts>
            <desc>Correct test case</desc>
            <filename>test-case.html</filename>
            <type>text/html</type>
            <size>600</size>
            <attacher name="Scott Park">scott</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIgogICAgICAg
ICJodHRwOi8vd3d3LnczLm9yZy9UUi9odG1sNC9zdHJpY3QuZHRkIj4KPGh0bWwgbGFuZz0iZW4i
Pgo8aGVhZD4KCTxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9o
dG1sOyBjaGFyc2V0PXV0Zi04Ij4KCTx0aXRsZT5VbnRpdGxlZDwvdGl0bGU+Cgk8bWV0YSBuYW1l
PSJnZW5lcmF0b3IiIGNvbnRlbnQ9IkJCRWRpdCA4LjciPgoJPHN0eWxlIHR5cGU9InRleHQvY3Nz
Ij4KPCEtLQoJaHRtbCwKCWJvZHksCglkaXYjdGVzdDEsCglkaXYjdGVzdDIgewoJCXdpZHRoOiAx
MDAlOwoJCWhlaWdodDogMTAwJTsKCX0KCQoJZGl2I3Rlc3QxLAoJZGl2I3Rlc3QyIHsKCQlib3Jk
ZXI6IDFweCBibGFjayBzb2xpZDsKCX0KCQoJZGl2I3Rlc3QxIHsKCQltaW4taGVpZ2h0OiAxMDAw
cHg7CgkJbWluLXdpZHRoOiAxMDAwcHg7Cgl9Ci0tPgo8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5PgoJ
PGRpdiBpZD0idGVzdDEiPgoJCTxkaXYgaWQ9InRlc3QyIj4KCQkJPHA+Q29udGVudDwvcD4KCQk8
L2Rpdj4KCTwvZGl2Pgo8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>123614</attachid>
            <date>2012-01-23 13:50:07 -0800</date>
            <delta_ts>2012-01-23 13:50:07 -0800</delta_ts>
            <desc>Testcase for min-height with html and body</desc>
            <filename>body.html</filename>
            <type>text/html</type>
            <size>372</size>
            <attacher name="Silas Brill">brilliand+bugzilla</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgoJPGhlYWQ+CgkJPHRpdGxlPldlYmtpdCBidWc6IG1pbi1o
ZWlnaHQgYW5kIHBlcmNlbnRhZ2UgaGVpZ2h0IG9uIGNoaWxkPC90aXRsZT4KCQk8c3R5bGUgdHlw
ZT0idGV4dC9jc3MiPgoJCQlodG1sIHtoZWlnaHQ6MSU7bWluLWhlaWdodDoyMDBweDtib3JkZXI6
IDFweCBzb2xpZCBibHVlOyBiYWNrZ3JvdW5kOndoaXRlO30KCQkJYm9keSB7aGVpZ2h0OiAxMDAl
O2JhY2tncm91bmQ6cmVkfQoJCQlkaXYge2hlaWdodDogMTAwcHg7IHdpZHRoOiA1MHB4OyBtYXJn
aW46IGF1dG87IGJhY2tncm91bmQ6Z3JlZW47fQoJCTwvc3R5bGU+Cgk8L2hlYWQ+Cgk8Ym9keT4K
CQk8ZGl2PjwvZGl2PgoJPC9ib2R5Pgo8L2h0bWw+
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>123616</attachid>
            <date>2012-01-23 13:56:15 -0800</date>
            <delta_ts>2012-01-23 13:56:15 -0800</delta_ts>
            <desc>Testcase for min-height and min-width with other elements</desc>
            <filename>divs.html</filename>
            <type>text/html</type>
            <size>447</size>
            <attacher name="Silas Brill">brilliand+bugzilla</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgoJPGhlYWQ+CgkJPHRpdGxlPldlYmtpdCBidWc6IG1pbi1o
ZWlnaHQgYW5kIHBlcmNlbnRhZ2UgaGVpZ2h0IG9uIGNoaWxkPC90aXRsZT4KCQk8c3R5bGUgdHlw
ZT0idGV4dC9jc3MiPgoJCQkuaHRtbCB7aGVpZ2h0OjElO21pbi1oZWlnaHQ6MjAwcHg7d2lkdGg6
MSU7bWluLXdpZHRoOiAyMDBweDtiYWNrZ3JvdW5kOmJsdWV9CgkJCS5ib2R5IHtoZWlnaHQ6IDEw
MCU7d2lkdGg6MTAwJTtiYWNrZ3JvdW5kOnJlZH0KCQkJLmRpdiB7aGVpZ2h0OiAxMDBweDsgd2lk
dGg6IDEwMHB4OyBtYXJnaW46IGF1dG87IGJhY2tncm91bmQ6Z3JlZW47fQoJCTwvc3R5bGU+Cgk8
L2hlYWQ+Cgk8Ym9keT4KCQk8ZGl2IGNsYXNzPSJodG1sIj48ZGl2IGNsYXNzPSJib2R5Ij48ZGl2
IGNsYXNzPSJkaXYiPjwvZGl2PjwvZGl2PjwvZGl2PgoJPC9ib2R5Pgo8L2h0bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>