<?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>116589</bug_id>
          
          <creation_ts>2013-05-21 22:19:00 -0700</creation_ts>
          <short_desc>flex items with auto margins in a vertical flex container get stretched, but they shouldn&apos;t</short_desc>
          <delta_ts>2017-02-28 10:46:39 -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>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BlinkMergeCandidate, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>62048</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Daniel Holbert">dholbert</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cbiesinger</cc>
    
    <cc>huangxueqing</cc>
    
    <cc>hyatt</cc>
    
    <cc>jonlee</cc>
    
    <cc>ojan</cc>
    
    <cc>tony</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zyuzin.vitaly</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>892114</commentid>
    <comment_count>0</comment_count>
      <attachid>202495</attachid>
    <who name="Daniel Holbert">dholbert</who>
    <bug_when>2013-05-21 22:19:00 -0700</bug_when>
    <thetext>Created attachment 202495
testcase

STR:
 1. Load testcase.

EXPECTED RESULTS: Both lines should be centered horizontally.
ACTUAL RESULTS: The first line (&quot;centeredWithMargins&quot;) isn&apos;t centered -- its background is stretched to fill the width of the container.

I&apos;m testing Chrome Version 28.0.1500.20 dev, which gives ACTUAL RESULTS.

Firefox Nightly and Opera 12.15 both give EXPECTED RESULTS.

Pulling back the covers slightly: this is a flex container with one flex item, and WebKit is stretching it horizontally (in the cross axis) due to the &quot;align-self: stretch&quot; property.  However, it&apos;s not supposed to do that when the flex item has auto margins in the cross axis, as noted in the spec here:
&gt; If a flex item has ‘align-self: stretch’ [...] and
&gt; neither of its cross-axis margins are ‘auto’,
&gt; the used outer cross size is the used cross size of
&gt; its flex line (i.e. stretch it).
http://www.w3.org/TR/css3-flexbox/#cross-sizing</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>894559</commentid>
    <comment_count>1</comment_count>
    <who name="Christian Biesinger">cbiesinger</who>
    <bug_when>2013-05-28 15:16:18 -0700</bug_when>
    <thetext>Fixed in Chromium: https://codereview.chromium.org/15946003

(though note that there&apos;s a separate issue with auto margins for multi-row flexboxes)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>895984</commentid>
    <comment_count>2</comment_count>
    <who name="Christian Biesinger">cbiesinger</who>
    <bug_when>2013-05-31 14:07:58 -0700</bug_when>
    <thetext>Alright, for several of blink&apos;s patches for auto margins in fleboxes, see the commits mentioned in https://code.google.com/p/chromium/issues/detail?id=242654#c6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1260356</commentid>
    <comment_count>3</comment_count>
    <who name="Jon Lee">jonlee</who>
    <bug_when>2016-12-15 16:26:37 -0800</bug_when>
    <thetext>&lt;rdar://problem/29695102&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1281801</commentid>
    <comment_count>4</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2017-02-28 10:46:39 -0800</bug_when>
    <thetext>This was fixed (and this test case added) by my Blink merge to flex box.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>202495</attachid>
            <date>2013-05-21 22:19:00 -0700</date>
            <delta_ts>2013-05-21 22:19:00 -0700</delta_ts>
            <desc>testcase</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>592</size>
            <attacher name="Daniel Holbert">dholbert</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KICA8c3R5bGU+CiAgICAuY29udGFpbmVyIHsK
ICAgICAgZGlzcGxheTogLXdlYmtpdC1mbGV4OwogICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAt
d2Via2l0LWZsZXgtZGlyZWN0aW9uOiBjb2x1bW47CiAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1
bW47CiAgICAgIGJvcmRlcjogMXB4IHNvbGlkIGJsYWNrOwogICAgICB3aWR0aDogNDAwcHg7CiAg
ICB9CiAgICAuaXRlbTEgewogICAgICBtYXJnaW46IDAgYXV0bzsKICAgICAgYmFja2dyb3VuZDog
bGlnaHRibHVlOwogICAgfQogICAgLml0ZW0yIHsKICAgICAgLXdlYmtpdC1hbGlnbi1zZWxmOiBj
ZW50ZXI7CiAgICAgIGFsaWduLXNlbGY6IGNlbnRlcjsKICAgICAgYmFja2dyb3VuZDogbGltZTsK
ICAgIH0KICA8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5PgogIDxkaXYgY2xhc3M9ImNvbnRhaW5lciI+
CiAgICA8ZGl2IGNsYXNzPSJpdGVtMSI+Y2VudGVyZWRXaXRoTWFyZ2luczwvZGl2PgogICAgPGRp
diBjbGFzcz0iaXRlbTIiPmNlbnRlcmVkV2l0aEFsaWduU2VsZjwvZGl2PgogIDwvZGl2Pgo8L2Jv
ZHk+CjwvaHRtbD4KICAKICAgICAgCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>