<?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>120546</bug_id>
          
          <creation_ts>2013-08-30 12:52:54 -0700</creation_ts>
          <short_desc>[CSS Regions] Region overset is reported incorectly for auto height regions</short_desc>
          <delta_ts>2014-03-17 00:48:31 -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>FIXED</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>
          
          <blocked>128165</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexandru Chiculita">achicu</reporter>
          <assigned_to name="Mihnea Ovidenie">mihnea</assigned_to>
          <cc>abucur</cc>
    
    <cc>WebkitBugTracker</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>923150</commentid>
    <comment_count>0</comment_count>
      <attachid>210152</attachid>
    <who name="Alexandru Chiculita">achicu</who>
    <bug_when>2013-08-30 12:52:54 -0700</bug_when>
    <thetext>Created attachment 210152
Test case

Open the attached test case. The region is auto-height so it should say fit instead of overset.

It seems like the issue is related to the line-height CSS property.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>923333</commentid>
    <comment_count>1</comment_count>
    <who name="Mihnea Ovidenie">mihnea</who>
    <bug_when>2013-08-31 13:06:35 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; Created an attachment (id=210152) [details]
&gt; Test case
&gt; 
&gt; Open the attached test case. The region is auto-height so it should say fit instead of overset.
&gt; 
&gt; It seems like the issue is related to the line-height CSS property.

It is related to the line-height property. For instance, in the following case:
&lt;div style=&quot;font-size: 100px; font-family: Times; width: 200px; border: 1px solid red;&quot;&gt;&amp;#x00ce;&lt;/div&gt;

the special character will be rendered properly inside the box, which will have a height of 117 (115 from font + 2 from border).

When you are setting the line-height to a certain value, say 1em, you are forcing the height of the div to be 102 (100 + border) and the content will overflow the box.
&lt;div style=&quot;font-size: 100px; font-family: Times; width: 200px; border: 1px solid red; line-height: 1em&quot;&gt;&amp;#x00ce;&lt;/div&gt;

If you flow the above box, with line-height in a region with height: auto, the height of the region will be computed based on the height of the box (102) but since the content overflows the box, it will overflow the region too, causing the overset being reported instead of fit.

In your sample, if you set the line-height: 1.2, which is roughly the value for the default normal value for line-height, the content will not overflow the box and the reported value will be fit.

In my opinion, although the behavior is confusing, it is not a bug. I am attaching a sample without regions in which i played with boxes and line-height and overflow: hidden. Take a look and tell me your opinion about this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>923335</commentid>
    <comment_count>2</comment_count>
      <attachid>210209</attachid>
    <who name="Mihnea Ovidenie">mihnea</who>
    <bug_when>2013-08-31 13:07:48 -0700</bug_when>
    <thetext>Created attachment 210209
Alternate test without regions</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>991133</commentid>
    <comment_count>3</comment_count>
    <who name="Andrei Bucur">abucur</who>
    <bug_when>2014-03-17 00:48:31 -0700</bug_when>
    <thetext>This was fixed in https://bugs.webkit.org/show_bug.cgi?id=129032. Closing.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>210152</attachid>
            <date>2013-08-30 12:52:54 -0700</date>
            <delta_ts>2013-08-30 12:52:54 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>page1.html</filename>
            <type>text/html</type>
            <size>1730</size>
            <attacher name="Alexandru Chiculita">achicu</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogICAgPGhlYWQ+CiAgICAgIDxzdHlsZT4KI2JveDEgewog
ICAgd2lkdGg6IDIwMHB4OwogICAgLXdlYmtpdC1mbG93LWZyb206IGZsb3dDb250YWluZXI7Cn0K
I2Zsb3dDb250YWluZXIgewogICAgLXdlYmtpdC1mbG93LWludG86IGZsb3dDb250YWluZXI7CiAg
ICBsaW5lLWhlaWdodDogMWVtOwp9CiAgPC9zdHlsZT4KICAgIDwvaGVhZD4KICAgIDxib2R5PgoK
ICA8ZGl2IGlkPSJyZXN1bHQiPjwvZGl2PgoJPGRpdj4KICAgICAgIDxkaXYgaWQ9J2JveDEnPgog
ICAgICAgPC9kaXY+CiAgICAgICA8ZGl2IGlkPSdmbG93Q29udGFpbmVyJz4KICAgICAgICAgICAK
ICAgICAgICAgICBMb3JlbSBpcHN1bSBkb2xvciBzaXQgYW1ldCwgY29uc2VjdGV0dWVyIGFkaXBp
c2NpbmcgZWxpdCwgc2VkIGRpYW0gbm9udW1teSBuaWJoIGV1aXNtb2QgdGluY2lkdW50IHV0IGxh
b3JlZXQgZG9sb3JlIG1hZ25hIGFsaXF1YW0gZXJhdCB2b2x1dHBhdC4gVXQgd2lzaSBlbmltIGFk
IG1pbmltIHZlbmlhbSwgcXVpcyBub3N0cnVkIGV4ZXJjaSB0YXRpb24gdWxsYW1jb3JwZXIgc3Vz
Y2lwaXQgbG9ib3J0aXMgbmlzbCB1dCBhbGlxdWlwIGV4IGVhIGNvbW1vZG8gY29uc2VxdWF0LiBE
dWlzIGF1dGVtIHZlbCBldW0gaXJpdXJlIGRvbG9yIGluIGhlbmRyZXJpdCBpbiB2dWxwdXRhdGUg
dmVsaXQgZXNzZSBtb2xlc3RpZSBjb25zZXF1YXQsIHZlbCBpbGx1bSBkb2xvcmUgZXUgZmV1Z2lh
dCBudWxsYSBmYWNpbGlzaXMgYXQgd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p
dj4KCTwvZGl2PgoKICAKCiAgPHNjcmlwdD4KICAgIHZhciByZXN1bHRFbCA9IGRvY3VtZW50Lmdl
dEVsZW1lbnRCeUlkKCJyZXN1bHQiKTsKICAgIHJlc3VsdEVsLmlubmVySFRNTCA9IGRvY3VtZW50
LmdldEVsZW1lbnRCeUlkKCJib3gxIikud2Via2l0UmVnaW9uT3ZlcnNldDsKICA8L3NjcmlwdD4K
ICAgIDwvYm9keT4KPC9odG1sPgo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>210209</attachid>
            <date>2013-08-31 13:07:48 -0700</date>
            <delta_ts>2013-08-31 13:07:48 -0700</delta_ts>
            <desc>Alternate test without regions</desc>
            <filename>120546-related.html</filename>
            <type>text/html</type>
            <size>863</size>
            <attacher name="Mihnea Ovidenie">mihnea</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogICAgPGhlYWQ+CiAgICAgIDxzdHlsZT4KICAgICAgICAu
Ym94IHsKICAgICAgICAgIGZvbnQtc2l6ZTogMTAwcHg7CiAgICAgICAgICBmb250LWZhbWlseTog
VGltZXM7CiAgICAgICAgICB3aWR0aDogMjAwcHg7CiAgICAgICAgICBib3JkZXI6IDFweCBzb2xp
ZCByZWQ7CiAgICAgICAgfQoKICAgICAgICAjZmxvd0NvbnRhaW5lciB7CiAgICAgICAgICBsaW5l
LWhlaWdodDogMTsKICAgICAgICB9CgogICAgICAgICNmbG93Q29udGFpbmVyMiB7CiAgICAgICAg
ICBsaW5lLWhlaWdodDogMTsKICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgfQoK
ICAgICAgICAjZmxvd0NvbnRhaW5lcjMgewogICAgICAgICAgbGluZS1oZWlnaHQ6IDEuMjsKICAg
ICAgICB9CiAgPC9zdHlsZT4KICAgIDwvaGVhZD4KICAgIDxib2R5PgogICAgICAgIDxici8+CiAg
ICAgICAgPGRpdiBjbGFzcz0iYm94Ij4mI3gwMGNlOyYjeDAwY2U7JiN4MDBjZTsmI3gwMGNlOyYj
eDAwY2U7PC9kaXY+CiAgICAgICAgPGJyLz4KICAgICAgICA8ZGl2IGNsYXNzPSJib3giIGlkPSdm
bG93Q29udGFpbmVyJz4mI3gwMGNlOyYjeDAwY2U7JiN4MDBjZTsmI3gwMGNlOyYjeDAwY2U7PC9k
aXY+CiAgICAgICAgPGJyLz4KICAgICAgICA8ZGl2IGNsYXNzPSJib3giIGlkPSdmbG93Q29udGFp
bmVyMic+JiN4MDBjZTsmI3gwMGNlOyYjeDAwY2U7JiN4MDBjZTsmI3gwMGNlOzwvZGl2PgogICAg
ICAgIDxici8+CiAgICAgICAgPGRpdiBjbGFzcz0iYm94IiBpZD0nZmxvd0NvbnRhaW5lcjMnPiYj
eDAwY2U7JiN4MDBjZTsmI3gwMGNlOyYjeDAwY2U7JiN4MDBjZTs8L2Rpdj4KICAgIDwvYm9keT4K
PC9odG1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>