<?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>186887</bug_id>
          
          <creation_ts>2018-06-21 04:19:20 -0700</creation_ts>
          <short_desc>Setting Height to Auto on overflow hidden element isn&apos;t visible when overlapping lower z level</short_desc>
          <delta_ts>2018-06-24 09:19:07 -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>CSS</component>
          <version>Other</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 11</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dave">dave</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1435090</commentid>
    <comment_count>0</comment_count>
      <attachid>343235</attachid>
    <who name="Dave">dave</who>
    <bug_when>2018-06-21 04:19:20 -0700</bug_when>
    <thetext>Created attachment 343235
reproduction sample html page

view code at https://codepen.io/anon/pen/VdXVOd or see attached page. View on iOS device.

Seems to be an issue where relative items within a parent that has overflow hidden aren&apos;t painted at all. This only happens when setting the height of the container to auto, from 0 through javascript. The container is correctly calculated in terms of height, but it&apos;s contents aren&apos;t painted. 
This also seems oddly related as to whether the bounds of it&apos;s parents overlap an item at a different z-index.
Code works as expected when the divs don&apos;t overlap an element at a lower z-index, but aren&apos;t repainted when the bounds overlap a lower z-index item.


Steps to reproduce
1. view attached code on iOS Device
2. click small spacer button to set spacer to small
3. toggle show hide. 
 
expected result - absolute div bounds isn&apos;t overlapping the fixed red square so text &quot;Relative Item&quot; appears.

4. click large spacer button to set spacer to large (overlapping fixed red square at z level 1)
5. toggle show hide. 

expected result - absolute div bounds now overlaps the fixed red square at z1. but the &quot;Relative Item&quot; element isn&apos;t repainted so remains hidden, even though it&apos;s containing div has expanded to the correct height.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1435929</commentid>
    <comment_count>1</comment_count>
    <who name="Dave">dave</who>
    <bug_when>2018-06-24 09:19:07 -0700</bug_when>
    <thetext>please also suggest any workarounds for this. 

I&apos;ve noted padding-bottom:1px on the height:0/auto element seems to work in the sample.

But not in all real world situations</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>343235</attachid>
            <date>2018-06-21 04:19:20 -0700</date>
            <delta_ts>2018-06-21 04:19:20 -0700</delta_ts>
            <desc>reproduction sample html page</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>2968</size>
            <attacher name="Dave">dave</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+CjxodG1sIGxhbmc9ZW4tdXM+Cgo8aGVhZD4KICAgIDxtZXRhIG5hbWU9
dmlld3BvcnQgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRoLGluaXRpYWwtc2NhbGU9MSI+CiAg
ICA8c3R5bGU+CiAgICAgICAgLyogYnVnIHJlbGF0ZWQgKi8KCiAgICAgICAgLm92ZXJsYXkgewog
ICAgICAgICAgICB6LWluZGV4OiA1MDA7CiAgICAgICAgfQoKICAgICAgICAucG9zaXRpb24tcmVs
YXRpdmUgewogICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgfQoKICAgICAg
ICAuaGVpZ2h0LWF1dG8gewogICAgICAgICAgICBoZWlnaHQ6IGF1dG8gIWltcG9ydGFudDsKICAg
ICAgICB9CgogICAgICAgIC5hYnNvbHV0ZS13cmFwcGVyIHsKICAgICAgICAgICAgcG9zaXRpb246
IGFic29sdXRlOwogICAgICAgICAgICB3aWR0aDogOTUlOwogICAgICAgIH0KCiAgICAgICAgLm92
ZXJmbG93LWhpZGRlbiB7CiAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgfQoK
ICAgICAgICAuZml4ZWQtdW5kZXJsYXkgewogICAgICAgICAgICB0b3A6IDE1MHB4OwogICAgICAg
ICAgICByaWdodDogMjBweDsKICAgICAgICAgICAgd2lkdGg6IDUwcHg7CiAgICAgICAgICAgIGhl
aWdodDogNTBweDsKICAgICAgICAgICAgcG9zaXRpb246IGZpeGVkOwogICAgICAgIH0KCiAgICAg
ICAgLyogLmZpeGVkIHsKICAgICAgICAgICAgcG9zaXRpb246IGZpeGVkOwogICAgICAgICAgICBy
aWdodDogMjBweDsKICAgICAgICAgICAgYm90dG9tOiAyMHB4OwoKICAgICAgICB9ICovCgoKICAK
ICAgICAgICAvKiBwcmV0dHkgKi8KCiAgICAgICAgLm92ZXJsYXkgewogICAgICAgICAgICBib3Jk
ZXI6IDJweCBpbnNldCByZ2IoNTgsIDE0MSwgMjM1KTsKICAgICAgICB9CgogICAgICAgIC5maXhl
ZC11bmRlcmxheSB7CiAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkIHJlZDsKICAgICAgICAg
ICAgYmFja2dyb3VuZC1jb2xvcjogcmdiYSgyNTUsIDAsIDAsIDAuNCk7CiAgICAgICAgfQoKICAg
ICAgICAuYWJzb2x1dGUtd3JhcHBlciB7CiAgICAgICAgICAgIGJvcmRlcjogMnB4IGluc2V0IHJn
YigyMzAsIDY4LCAxOCk7CiAgICAgICAgfQoKICAgICAgICAjc3BhY2VyIHsKICAgICAgICAgICAg
YmFja2dyb3VuZC1jb2xvcjogcmdiYSgyNTUsIDE1MCwgMCwgMC40KTsKICAgICAgICB9CgoKIC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Fwc2VkRGl2LmNsYXNzTGlzdC5yZW1vdmUoImhlaWdodC1hdXRvIik7
CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBjb2xsYXBzZWREaXYuY2xhc3NM
aXN0LmFkZCgiaGVpZ2h0LWF1dG8iKTsKICAgICAgICB9CgogICAgfQoKCjwvc2NyaXB0PgoKPC9o
dG1sPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>