<?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>94584</bug_id>
          
          <creation_ts>2012-08-21 04:06:42 -0700</creation_ts>
          <short_desc>[Flexbox] Regression: Text overflow broken for flex items</short_desc>
          <delta_ts>2012-09-27 09:42:04 -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>Layout and Rendering</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></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>pimvdb</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dholbert</cc>
    
    <cc>james.r.campos</cc>
    
    <cc>ojan</cc>
    
    <cc>tabatkins</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>700601</commentid>
    <comment_count>0</comment_count>
      <attachid>159649</attachid>
    <who name="">pimvdb</who>
    <bug_when>2012-08-21 04:06:42 -0700</bug_when>
    <thetext>Created attachment 159649
Test case

Scenario:

A flexbox with two flex items:

 - The left flex item contains of one line of text (`white-space: nowrap`) and should show ellipsis when the text doesn&apos;t fit.
 - The right flex item (which is red) should take up all available space using `-webkit-flex: 1 0 auto`. The `auto` is there so that the element keeps at least its minimum size.

Problem:

When the left flex item has too much text, it overflows out of the flexbox container, showing no ellipsis. The right flex item is pushed out of the flexbox.

This rendered fine on Chrome 21, but is broken on Chrome 23. That is, in Chrome 21 the right column has its minimum size and is anchored to the right, with the left column showing ellipsis. In Chrome 23, however, there is no ellipsis and the left column overflows out of the flexbox, pushing the right flex item away.

For the record, here are the Chrome/WebKit versions used:

Chrome 21.0.1180.79 - WebKit 537.1 (correct rendering)
Chrome 23.0.1240.0 - WebKit 537.6 (wrong rendering)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>729164</commentid>
    <comment_count>1</comment_count>
    <who name="James Campos">james.r.campos</who>
    <bug_when>2012-09-26 20:05:17 -0700</bug_when>
    <thetext>`overflow` is broken, which subsequently breaks `text-overflow`.

My test case displaying broken `overflow`: http://jsfiddle.net/BEFN7/1/.

Chromium bug: http://code.google.com/p/chromium/issues/detail?id=152386.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>729183</commentid>
    <comment_count>2</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2012-09-26 21:22:35 -0700</bug_when>
    <thetext>The problem is that flex-items have min-width:auto, which means min-width: min-content. If you set min-width: 0 on the flex item, then you get the correct overflow behavior. This is correct per the flexbox spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>729185</commentid>
    <comment_count>3</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2012-09-26 21:24:46 -0700</bug_when>
    <thetext>Tab, we&apos;ve now gotten two bugs (this one and http://crbug.com/152386) filed confused about why text-overflow doesn&apos;t work on flex-items. I suppose there&apos;s no point in bringing this to the CSSWG to see if they want to reconsider this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>729606</commentid>
    <comment_count>4</comment_count>
    <who name="Tab Atkins">tabatkins</who>
    <bug_when>2012-09-27 09:29:40 -0700</bug_when>
    <thetext>Yeah, I still think the reasoning behind the current behavior is valid. :/  I wonder how I could advertise it better in the spec?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>729624</commentid>
    <comment_count>5</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2012-09-27 09:42:04 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Yeah, I still think the reasoning behind the current behavior is valid. :/  I wonder how I could advertise it better in the spec?

Maybe an example + note explicitly calling out text-overflow/overflow cases?</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>159649</attachid>
            <date>2012-08-21 04:06:42 -0700</date>
            <delta_ts>2012-08-21 04:06:42 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>flexbox_text_overflow.html</filename>
            <type>text/html</type>
            <size>1111</size>
            <attacher>pimvdb</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+DQo8aHRtbD4NCiAgPGhlYWQ+DQogICAgPHRpdGxlPkZsZXhib3ggdGV4
dCBvdmVyZmxvdyBidWc8L3RpdGxlPg0KDQogICAgPHN0eWxlPg0KICAgICAgLmNvbnRhaW5lciB7
DQogICAgICAgICAgZGlzcGxheTogLXdlYmtpdC1mbGV4Ow0KICAgICAgfQ0KDQogICAgICAuY29u
dGFpbmVyID4gZGl2OmZpcnN0LWNoaWxkIHsNCiAgICAgICAgICB3aGl0ZS1zcGFjZTogbm93cmFw
Ow0KICAgICAgICAgIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzOw0KICAgICAgICAgIG92ZXJmbG93
OiBoaWRkZW47DQogICAgICB9DQoNCiAgICAgIC5jb250YWluZXIgPiBkaXY6bGFzdC1jaGlsZCB7
DQogICAgICAgICAgLXdlYmtpdC1mbGV4OiAxIDAgYXV0bzsNCiAgICAgICAgICBiYWNrZ3JvdW5k
OiByZWQ7DQogICAgICB9DQogICAgPC9zdHlsZT4NCiAgPC9oZWFkPg0KDQogIDxib2R5Pg0KICAg
IDxkaXYgY2xhc3M9ImNvbnRhaW5lciI+DQogICAgICAgIDxkaXY+QSBzbWFsbCBsZWZ0IGZsZXgg
aXRlbS48L2Rpdj4NCiAgICAgICAgPGRpdj5SaWdodCBmbGV4IGl0ZW08L2Rpdj4NCiAgICA8L2Rp
dj4NCg0KICAgIDxkaXYgY2xhc3M9ImNvbnRhaW5lciI+DQogICAgICAgIDxkaXY+DQogICAgICAg
ICAgICBBIGxhcmdlIGxlZnQgZmxleCBpdGVtLg0KICAgICAgICAgICAgQSBsYXJnZSBsZWZ0IGZs
ZXggaXRlbS4NCiAgICAgICAgICAgIEEgbGFyZ2UgbGVmdCBmbGV4IGl0ZW0uDQogICAgICAgICAg
ICBBIGxhcmdlIGxlZnQgZmxleCBpdGVtLg0KICAgICAgICAgICAgQSBsYXJnZSBsZWZ0IGZsZXgg
aXRlbS4NCiAgICAgICAgICAgIEEgbGFyZ2UgbGVmdCBmbGV4IGl0ZW0uDQogICAgICAgICAgICBB
IGxhcmdlIGxlZnQgZmxleCBpdGVtLg0KICAgICAgICAgICAgQSBsYXJnZSBsZWZ0IGZsZXggaXRl
bS4NCiAgICAgICAgICAgIEEgbGFyZ2UgbGVmdCBmbGV4IGl0ZW0uDQogICAgICAgICAgICBBIGxh
cmdlIGxlZnQgZmxleCBpdGVtLg0KICAgICAgICAgICAgQSBsYXJnZSBsZWZ0IGZsZXggaXRlbS4N
CiAgICAgICAgPC9kaXY+DQogICAgICAgIDxkaXY+UmlnaHQgZmxleCBpdGVtPC9kaXY+DQogICAg
PC9kaXY+DQogIDwvYm9keT4NCjwvaHRtbD4NCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>