<?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>115039</bug_id>
          
          <creation_ts>2013-04-23 07:50:01 -0700</creation_ts>
          <short_desc>[CSSRegions]Flex items auto-height regions have wrong height</short_desc>
          <delta_ts>2013-07-31 13:08:42 -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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>AdobeTracked</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>118057</dependson>
          <blocked>57312</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Mihnea Ovidenie">mihnea</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>badea</cc>
    
    <cc>mibalan</cc>
    
    <cc>WebkitBugTracker</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>879842</commentid>
    <comment_count>0</comment_count>
      <attachid>199234</attachid>
    <who name="Mihnea Ovidenie">mihnea</who>
    <bug_when>2013-04-23 07:50:01 -0700</bug_when>
    <thetext>Created attachment 199234
Test case

If an auto-height region is a flex item, its height is not computed properly as it does not take the flowed content height into account (see attached sample).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>879859</commentid>
    <comment_count>1</comment_count>
    <who name="Mihnea Ovidenie">mihnea</who>
    <bug_when>2013-04-23 07:58:32 -0700</bug_when>
    <thetext>In the second pass of layout for auto-height regions, the flexbox container clears the overrideLogicalHeight for the autoHeight region before the overrideLogicalHeight (which stores the computed autoHeight value after the first phase) is transfered into the regions height.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>880178</commentid>
    <comment_count>2</comment_count>
      <attachid>199334</attachid>
    <who name="Alan Stearns">stearns</who>
    <bug_when>2013-04-23 16:46:49 -0700</bug_when>
    <thetext>Created attachment 199334
test file 2

Here&apos;s another test file. In this case the region in the flex container is taking on the height of the container, but the second region isn&apos;t sizing correctly (there should be a black line around the second region&apos;s content - what you&apos;re seeing is overflow). If you take the border off the regions, the overflow in the second region disappears (perhaps this is a separate bug?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912700</commentid>
    <comment_count>3</comment_count>
    <who name="Catalin badea">badea</who>
    <bug_when>2013-07-30 01:28:55 -0700</bug_when>
    <thetext>The issue from the first test case has been fixed in #118057.

(In reply to comment #2)
&gt; Created an attachment (id=199334) [details]
&gt; test file 2
&gt; 
&gt; Here&apos;s another test file. In this case the region in the flex container is taking on the height of the container, but the second region isn&apos;t sizing correctly (there should be a black line around the second region&apos;s content - what you&apos;re seeing is overflow). If you take the border off the regions, the overflow in the second region disappears (perhaps this is a separate bug?)

The fact that the second region does not increases its size for fitting the content proved to be the correct behaviour according to the spec.
The rfcb height resolution with auto-height regions inside flexboxes roughly works as follows:
1. layout document using height=0 for auto-height regions. This includes a full flexbox layout.
2. Layout flow thread content and compute the height of auto-height regions ignoring any constraints set by the flex container.
3. layout document using the computed heights from step 2, this time honoring the constraints set by the flex container.

What this means is that, for test 2, the first region will compute a height equal to the flowthread&apos;s height and the second region will compute a height equal to zero (in step 2). In step 3 the flex container will apply
constraints on the first region shrinking it and causing overflow.

The overflow not being displayed unless the region with zero height has a border is another bug, indeed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>913469</commentid>
    <comment_count>4</comment_count>
    <who name="Mihai Balan">mibalan</who>
    <bug_when>2013-07-31 13:08:42 -0700</bug_when>
    <thetext>Closing this one as per the above discussion and the conclusion that the current behavior is spec-compliant. For the zero-height region issue, bug 98265 is already logged.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>199234</attachid>
            <date>2013-04-23 07:50:01 -0700</date>
            <delta_ts>2013-04-23 07:50:01 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>region-flex-autoheight.html</filename>
            <type>text/html</type>
            <size>587</size>
            <attacher name="Mihnea Ovidenie">mihnea</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+CjxodG1sPgo8aGVhZD4KICA8c3R5bGU+CiAgICBhcnRpY2xlIHsKICAg
ICAgLXdlYmtpdC1mbG93LWludG86IGFydGljbGU7CiAgICB9CgogICAgLmNvbnRhaW5lcnsKICAg
ICAgd2lkdGg6IDIwJTsKICAgICAgZGlzcGxheTogLXdlYmtpdC1mbGV4OwogICAgICBib3JkZXI6
IDVweCBzb2xpZCBibHVlOwogICAgfQoKICAgIC5jZWxsIHsKICAgICAgLXdlYmtpdC1mbG93LWZy
b206IGFydGljbGU7CiAgICAgIC13ZWJraXQtZmxleC1ncm93OiAxOwogICAgICAtd2Via2l0LWZs
ZXgtYmFzaXM6IDEwMCU7CiAgICAgIGhlaWdodDogYXV0bzsKICAgICAgYmFja2dyb3VuZDogbGlt
ZTsKICAgICAgYm9yZGVyOiA1cHggc29saWQgZ3JlZW47CiAgICB9CiAgPC9zdHlsZT4KPC9oZWFk
Pgo8Ym9keT4KICA8YXJ0aWNsZT4KICAgIDxwPkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0LCBj
b25zZWN0ZXR1ciBhZGlwaXNpY2luZyBlbGl0LjwvcD4KICA8L2FydGljbGU+CgogIDxkaXYgY2xh
c3M9ImNvbnRhaW5lciI+CiAgICA8ZGl2IGNsYXNzPSJjZWxsIj4KICAgIDwvZGl2PgogIDwvZGl2
Pgo8L2JvZHk+CjwvaHRtbD4=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>199334</attachid>
            <date>2013-04-23 16:46:49 -0700</date>
            <delta_ts>2013-04-23 16:46:49 -0700</delta_ts>
            <desc>test file 2</desc>
            <filename>flex-fragmenting.html</filename>
            <type>text/html</type>
            <size>990</size>
            <attacher name="Alan Stearns">stearns</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KICA8bWV0YSBodHRwLWVxdWl2PSJDb250ZW50
LVR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD11dGYtOCI+CiAgPHRpdGxlPkZsZXgt
cmVnaW9uIHRlc3Q8L3RpdGxlPgogIDxzdHlsZT4KICAgIGFydGljbGUgewogICAgICAtd2Via2l0
LWZsb3ctaW50bzogYXJ0aWNsZS1mbG93OwogICAgfQogICAgLnJlZ2lvbiB7CiAgICAgIC13ZWJr
aXQtZmxvdy1mcm9tOiBhcnRpY2xlLWZsb3c7CiAgICAgIGJvcmRlcjogdGhpbiBibGFjayBzb2xp
ZDsKICAgIH0KICAgIC5mbGV4LWNvbnRhaW5lciB7CiAgICAgIGRpc3BsYXk6IC13ZWJraXQtZmxl
eDsKICAgICAgaGVpZ2h0OiA1ZW07CiAgICAgIHdpZHRoOiAzMDBweDsKICAgIH0KICA8L3N0eWxl
Pgo8L2hlYWQ+Cjxib2R5IGxhbmc9ImVuIj4KICA8ZGl2IGNsYXNzPSJmbGV4LWNvbnRhaW5lciI+
CiAgICA8ZGl2IGNsYXNzPSJyZWdpb24iPjwvZGl2PgogIDwvZGl2PgogIDxkaXYgY2xhc3M9InJl
Z2lvbiI+PC9kaXY+CgogIDxhcnRpY2xlPgogIDxwPlRodXMgbXVzaW5nLCBoZSB0b29rIGhpcyBz
dGFuZCBhdCB0aGUgZW50cmFuY2Ugb2YgdGhlIGdhdGUgYW5kIHdhaXRlZCB1bnRpbCB0aGUgcGVy
c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