<?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>153952</bug_id>
          
          <creation_ts>2016-02-06 11:20:59 -0800</creation_ts>
          <short_desc>Feature request: Auto-resize iframes based on content</short_desc>
          <delta_ts>2023-05-02 13:01:16 -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>Frames</component>
          <version>WebKit 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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Craig Francis">craig+webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>baebytasyatechiq</cc>
    
    <cc>hyatt</cc>
    
    <cc>sebastianzartner</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1162648</commentid>
    <comment_count>0</comment_count>
    <who name="Craig Francis">craig+webkit</who>
    <bug_when>2016-02-06 11:20:59 -0800</bug_when>
    <thetext>After the recent removal of the `@seamless` attribute on the `&lt;iframe&gt;` from the WHATWG spec:

https://github.com/whatwg/html/issues/331

We still need to consider the problem of setting the height of iframes, so they contain their content without scroll bars.

As discussed at:

https://github.com/whatwg/html/issues/555
https://lists.w3.org/Archives/Public/www-style/2016Jan/0236.html
https://lists.w3.org/Archives/Public/www-style/2016Feb/0004.html

The solution may simply involve the CSS:

    #iframe { height: max-content; }

And a header on the framed content, rather than custom/buggy JavaScript.

-----

I&apos;m keeping my notes on:

https://github.com/craigfrancis/iframe-height</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1162649</commentid>
    <comment_count>1</comment_count>
    <who name="Craig Francis">craig+webkit</who>
    <bug_when>2016-02-06 11:21:13 -0800</bug_when>
    <thetext>Alternatively we could look at a new keyword for the resize[1] property, which would be useful for a &lt;textarea&gt; that automatically increases its height based on its content - another problem which requires JavaScript to solve.

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/resize</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1430090</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-06-05 07:48:38 -0700</bug_when>
    <thetext>*** Bug 186275 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1952465</commentid>
    <comment_count>3</comment_count>
    <who name="Sebastian Zartner">sebastianzartner</who>
    <bug_when>2023-05-02 13:01:16 -0700</bug_when>
    <thetext>The CSS Working Group resolved on a two-sided solution, an HTML mechanism to express the intrinsic size of the iframe and a &apos;from-element&apos; keyword for the &apos;contain-intrinsic-size&apos; property.

See https://github.com/w3c/csswg-drafts/issues/1771#issuecomment-989034819.

Sebastian</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>