<?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>96841</bug_id>
          
          <creation_ts>2012-09-14 16:51:22 -0700</creation_ts>
          <short_desc>Vertical writing mode block ignores horizontal children when calculating height</short_desc>
          <delta_ts>2023-02-17 07:29:26 -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>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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>
          
          <blocked>46123</blocked>
    
    <blocked>96557</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="John Mellor">johnme</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>hyatt</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>karlcow</cc>
    
    <cc>mitz</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>721252</commentid>
    <comment_count>0</comment_count>
      <attachid>164250</attachid>
    <who name="John Mellor">johnme</who>
    <bug_when>2012-09-14 16:51:22 -0700</bug_when>
    <thetext>Created attachment 164250
Testcase

When a vertical-lr block with height:auto contains a horizontal-tb child, it&apos;s computed height ends up being just the height of its child&apos;s borders, ignoring the actual content of the child.

This seems pretty broken. My reading of http://dev.w3.org/csswg/css3-writing-modes/#orthogonal-flows and http://dev.w3.org/csswg/css3-writing-modes/#orthogonal-auto is that:

- max-content is the height of .inner (the green box)*
- min-content is the height of .inner (the green box)*
- fill-available is infinite since the height of the body is auto, so is ignored
- fill-fallback is the height of the initial containing block

Hence contentHeight of .outer = min(max-content, max(min-content, fill-fallback)) = height of .inner (the green box) [including .inner&apos;s borders and padding].

*: Though it&apos;s not clear how orthogonal writing mode interacts with the definitions of min-content and max-content (http://dev.w3.org/csswg/css3-writing-modes/#min-content), where min-content supposes that &quot;all line break opportunities within the box were taken&quot; and max-content supposes that &quot;none of the optional line break opportunities within the box were taken&quot;; indeed that seems somewhat backwards in this situation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>721253</commentid>
    <comment_count>1</comment_count>
    <who name="John Mellor">johnme</who>
    <bug_when>2012-09-14 16:53:04 -0700</bug_when>
    <thetext>Possibly related to bug 47238?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>850510</commentid>
    <comment_count>2</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2013-03-07 15:02:49 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; Possibly related to bug 47238?

Yes, that&apos;s the issue. We have no way of knowing how to compute min-content and max-content when they depend on a child&apos;s extent. As far as I can tell, no spec really indicates what to do yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1934618</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-02-17 07:29:17 -0800</bug_when>
    <thetext>Updating the test case to remove -webkit-:

JSFiddle - https://jsfiddle.net/ex75nhp2/show

Safari 16.3, STP163, WebKit ToT (260442@main) matches Firefox Nightly 112 while Chrome Canary 112 matches &quot;Expected&quot; rendering.

Just wanted to share updated testing results. Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>164250</attachid>
            <date>2012-09-14 16:51:22 -0700</date>
            <delta_ts>2012-09-14 16:51:22 -0700</delta_ts>
            <desc>Testcase</desc>
            <filename>vert-containing-horiz.html</filename>
            <type>text/html</type>
            <size>550</size>
            <attacher name="John Mellor">johnme</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KCjxzdHlsZT4KLm91dGVyIHsKICAgIGJvcmRl
cjogNXB4IHNvbGlkIHJlZDsKfQouaW5uZXIgewogICAgYm9yZGVyOiA1cHggc29saWQgZ3JlZW47
Cn0KCi52IHsKICAgIC13ZWJraXQtd3JpdGluZy1tb2RlOiB2ZXJ0aWNhbC1scjsKfQouaCB7CiAg
ICAtd2Via2l0LXdyaXRpbmctbW9kZTogaG9yaXpvbnRhbC10YjsKfQoKLnYtZXhwZWN0ZWQgewog
ICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwp9Cjwvc3R5bGU+Cgo8L2hlYWQ+Cjxib2R5PgoKPGgy
PkFjdHVhbCByZW5kZXJpbmc6PC9oMj4KCjxkaXYgY2xhc3M9Im91dGVyIHYiPgogICAgPGRpdiBj
bGFzcz0iaW5uZXIgaCI+aG9yaXpvbnRhbC10YiBpbnNpZGUgdmVydGljYWwtbHI8L2Rpdj4KPC9k
aXY+Cgo8aDI+RXhwZWN0ZWQgcmVuZGVyaW5nOjwvaDI+Cgo8ZGl2IGNsYXNzPSJvdXRlciB2LWV4
cGVjdGVkIj4KICAgIDxkaXYgY2xhc3M9ImlubmVyIj5ob3Jpem9udGFsLXRiIGluc2lkZSB2ZXJ0
aWNhbC1scjwvZGl2Pgo8L2Rpdj4KCjwvYm9keT4KPC9odG1sPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>