<?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>126809</bug_id>
          
          <creation_ts>2014-01-10 23:36:02 -0800</creation_ts>
          <short_desc>WebKit incorrectly resolves percent values for vertical padding against container *width* (instead of height), on flex items</short_desc>
          <delta_ts>2014-01-17 15:45:58 -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>DUPLICATE</resolution>
          <dup_id>113519</dup_id>
          
          <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>1</everconfirmed>
          <reporter name="Daniel Holbert">dholbert</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>966765</commentid>
    <comment_count>0</comment_count>
      <attachid>220923</attachid>
    <who name="Daniel Holbert">dholbert</who>
    <bug_when>2014-01-10 23:36:02 -0800</bug_when>
    <thetext>Created attachment 220923
testcase 1

STR: Load attached testcase.

EXPECTED RESULTS:
No red should be visible. (The flex item should resolve its &quot;padding-bottom: 100%&quot; against the container&apos;s height, and end up with 200px of padding, covering up all of the red.)

ACTUAL RESULTS:
Red is ivsible. Specifically, the top 100px of the container is lime, and the bottom 100px is red.

This indicates that the flex item is resolving its &quot;padding-bottom: 100%&quot; against the container&apos;s width (not height), which is incorrect for a flex item.

Spec reference:
http://dev.w3.org/csswg/css-flexbox/#item-margins
This was resolved by the CSSWG here:
http://lists.w3.org/Archives/Public/www-style/2013Mar/0688.html

Note that for a block, it&apos;d be correct to resolve percentage vertical-padding values against the containing block&apos;s width.  But in a flexbox, it&apos;s supposed to resolve against the size of the respective dimension (the height in this case), per spec link above.

I tested this with (webkit-based) Midori 0.4.3.  Google Chrome (blink) development versions have the same problem -- see http://code.google.com/p/chromium/issues/detail?id=333533 . Firefox does not have this problem. (I tested both Firefox version 26 and current Nightly)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>969293</commentid>
    <comment_count>1</comment_count>
    <who name="Daniel Holbert">dholbert</who>
    <bug_when>2014-01-17 15:45:58 -0800</bug_when>
    <thetext>Looks like this is a duplicate of bug 113519.

*** This bug has been marked as a duplicate of bug 113519 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>220923</attachid>
            <date>2014-01-10 23:36:02 -0800</date>
            <delta_ts>2014-01-10 23:36:02 -0800</delta_ts>
            <desc>testcase 1</desc>
            <filename>webkittest.html</filename>
            <type>text/html</type>
            <size>489</size>
            <attacher name="Daniel Holbert">dholbert</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KICA8c3R5bGU+CiAgICAuY29udGFpbmVyIHsK
ICAgICAgZGlzcGxheTogZmxleDsKICAgICAgd2lkdGg6IDEwMHB4OwogICAgICBoZWlnaHQ6IDIw
MHB4OwogICAgICBib3JkZXI6IDFweCBzb2xpZCBncmF5OwogICAgICBiYWNrZ3JvdW5kOiByZWQ7
CiAgICB9CgogICAgLmNoaWxkIHsKICAgICAgLyogVGhpcyBzaG91bGQgYXBwbHkgdG8gX2hlaWdo
dF8gb2YgY29udGFpbmluZyBibG9jazogKi8KICAgICAgcGFkZGluZy1ib3R0b206IDEwMCU7CiAg
ICAgIGhlaWdodDogMHB4OwogICAgICBmbGV4OiAxOwogICAgICBiYWNrZ3JvdW5kOiBsaW1lOwog
ICAgfQoKPC9zdHlsZT4KPC9oZWFkPgo8Ym9keT4KICBUZXN0IGZhaWxzIGlmIGFueSByZWQgaXMg
dmlzaWJsZS4KICA8ZGl2IGNsYXNzPSJjb250YWluZXIiPgogICAgPGRpdiBjbGFzcz0iY2hpbGQi
PjwvZGl2PgogIDwvZGl2Pgo8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>