<?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>89553</bug_id>
          
          <creation_ts>2012-06-20 01:45:15 -0700</creation_ts>
          <short_desc>[Stable] [GTK] Regression: frame-flattening broken when frame content uses CSS styles</short_desc>
          <delta_ts>2017-03-11 10:44:41 -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>WebKitGTK</component>
          <version>420+</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Dan Vrátil">dvratil</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>adamw</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>bugzilla</cc>
    
    <cc>cgarcia</cc>
    
    <cc>dev+webkit</cc>
    
    <cc>mcrha</cc>
    
    <cc>mrobinson</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>tpopela</cc>
    
    <cc>xan.lopez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>653283</commentid>
    <comment_count>0</comment_count>
      <attachid>148523</attachid>
    <who name="Dan Vrátil">dvratil</who>
    <bug_when>2012-06-20 01:45:15 -0700</bug_when>
    <thetext>Created attachment 148523
Test case

When frame-flattening is enabled and document in an &lt;iframe&gt; contains CSS styles (via &lt;link&gt; or &lt;style&gt;), the frame-flattening does not work - frame is not resized to match height of the content and no scrolling bars are displayed. In-line styles does not affect the behavior.

Resizing the webview makes the frame to be resized correctly.

This is a regression that must have appeared during WebKitGtk 1.9.X (I have reproduced this on 1.9.3 but haven&apos;t tried previous versions). This is not reproducible with WebKitGtk 1.8.3.

See attached test-case. In frame.html there is a &lt;style&gt; tag in &lt;head&gt;. Removing (or commenting) the tag makes frame-flattening work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>712171</commentid>
    <comment_count>1</comment_count>
    <who name="Xan Lopez">xan.lopez</who>
    <bug_when>2012-09-05 10:05:05 -0700</bug_when>
    <thetext>Apparently this is causing serious trouble in Evolution, we should have a look at it for 3.6. I&apos;m not sure why Evolution would want to enable flame flattening though?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>712201</commentid>
    <comment_count>2</comment_count>
    <who name="Dan Vrátil">dvratil</who>
    <bug_when>2012-09-05 10:24:31 -0700</bug_when>
    <thetext>We need it because we display each mail part in it&apos;s own &lt;iframe&gt;. This allows us to for example render plain text part and HTML part (which is a full-featued HTML document) in a single webview.

We obviously want the iframes to adapt their height to height of their content so that the entire document has just a single scrollbar, so we use frame-flattening.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>712936</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2012-09-05 23:51:01 -0700</bug_when>
    <thetext>Added to the wiki https://trac.webkit.org/wiki/WebKitGTK/1.10.x</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>721039</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Williamson">adamw</who>
    <bug_when>2012-09-14 12:42:42 -0700</bug_when>
    <thetext>Just for the record, this is really making Evolution 3.6 pretty much unusable for me. As I described in a downstream bug:

&quot;1. Select an unread mail, it will be properly displayed in the preview pane:
then switch to any other window. I just picked the latest unread mail in my
box, alt-tabbed to this window, and saw the bug happen immediately. This is
100% reproducible for me.

2. Select a mail in the list, read it in the preview pane, hit &apos;up&apos; to select
the next mail up in the list, hit &apos;down&apos; to go back to the mail you just read,
and you&apos;ll see the bug. In fact, any time I click on any mail I&apos;ve already read
in my mailbox, the preview pane is broken in this way. It _only_ correctly
shows mails I&apos;ve never read before, and only ever once, as long as I don&apos;t
alt-tab.&quot;

As you can imagine, when it&apos;s this easy to reproduce the bug, it&apos;s not really practical to use Evo. It would be really nice to have it fixed soon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>721270</commentid>
    <comment_count>5</comment_count>
    <who name="Xan Lopez">xan.lopez</who>
    <bug_when>2012-09-14 17:18:16 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; We need it because we display each mail part in it&apos;s own &lt;iframe&gt;. This allows us to for example render plain text part and HTML part (which is a full-featued HTML document) in a single webview.
&gt; 
&gt; We obviously want the iframes to adapt their height to height of their content so that the entire document has just a single scrollbar, so we use frame-flattening.

At risk of stating the obvious, it seems to me that it&apos;s not particularly mandatory to implement things this way. So if this go is not fixed a possible workaround would to just not use the same webview with different iframes to render the content.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>721628</commentid>
    <comment_count>6</comment_count>
    <who name="Dan Vrátil">dvratil</who>
    <bug_when>2012-09-16 12:37:25 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #2)
&gt; &gt; We need it because we display each mail part in it&apos;s own &lt;iframe&gt;. This allows us to for example render plain text part and HTML part (which is a full-featued HTML document) in a single webview.
&gt; &gt; 
&gt; &gt; We obviously want the iframes to adapt their height to height of their content so that the entire document has just a single scrollbar, so we use frame-flattening.
&gt; 
&gt; At risk of stating the obvious, it seems to me that it&apos;s not particularly 
&gt; mandatory to implement things this way. So if this go is not fixed a possible 
&gt; workaround would to just not use the same webview with different iframes to 
&gt; render the content.

We tried having multiple WebKitWebViews in a single GtkScrolledWindow and it does not really work well, mainly because we have to implement our own frame-flattening (or rather webview-flattening) algorithm, for instance I was unable to make the webview shrink when the content became lower then the current webview (by making the window wider for instance). 

Also it does not really scale well, as we could end up having a WebKitWebView inside a WebKitWebView (for instance an text/plain email with an another text/plain email as an attachment) and that has notable impact on performance mainly when scrolling (we tried that as well).

Switching to multi-webview approach would also require extensive changes in our code, I doubt we would be able to do it and test it properly before freeze for 3.6 release later this month.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839650</commentid>
    <comment_count>7</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2013-02-22 09:22:53 -0800</bug_when>
    <thetext>(In reply to comment #6)

We&apos;re shipping new stable candidates now. Can you confirm that the issue is gone there?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>839651</commentid>
    <comment_count>8</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2013-02-22 09:23:25 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; 
&gt; We&apos;re shipping new stable candidates now. Can you confirm that the issue is gone there?

Er. And here&apos;s a link to the latest: http://webkitgtk.org/releases/webkitgtk-1.11.90.tar.xz</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>849952</commentid>
    <comment_count>9</comment_count>
    <who name="Tomas Popela">tpopela</who>
    <bug_when>2013-03-07 04:13:56 -0800</bug_when>
    <thetext>No it&apos;s still not working.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1198912</commentid>
    <comment_count>10</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2016-06-03 05:38:32 -0700</bug_when>
    <thetext>I guess you can close it now. I&apos;m not able to reproduce it with the attached test case under 2.2.8, neither 2.4.11.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>148523</attachid>
            <date>2012-06-20 01:45:15 -0700</date>
            <delta_ts>2012-06-20 01:45:15 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>flattening.tar.gz</filename>
            <type>application/x-gzip</type>
            <size>1527</size>
            <attacher name="Dan Vrátil">dvratil</attacher>
            
              <data encoding="base64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ilOhyc2OQaBe/PMxna7DcdMmioFNaMg1S2uYsqxUZE8td82qxekTlOa81tYFOJabkMQ
tNtWjD09jOE9JAUvxHOIuab78GEQuB1vEDiVBnGR3tojpRN50KhOCJruN8wOwLgQdA6slHoOqdkF
iWMBdVFYp0UuseGY2gCSspLJxGhGOQ44uJgRSTnXErQCvMBSUViGJAHlvks6L6kARhLNmYS8yIEo
KETCfHiD7Z3FmqNUqvEGLSUBbGuSlIzm+M6p1CQlliPXidLSh5FiZA7Y9RKWapyeJc41qgRB6Znm
pGVEU83kvEgBJy6DecGNGIpifTikOSW5ZSgTyqlg8p2mjhBnEAziIZog7w6hOiUaQnNFLaWTAilO
LiYlm/twjMIsw5hjGBl67J1GDY2hJScJFcRYlDHs1NinK9uM/VAWUlNBnd9bxgWo0RxF6bllOGfA
qbEaqLkHqELgPx9eFSJmlj8S3FBexc05ehDEQyg1v2E5QdofNZqJLrH8hFYCCW9c6F4RmuDQkKgu
xoXoTFtrc83RvinVGUPFVwqtEsIsXIjNi00WdCtn1ugVkXUiqVSGEiPEkIfmSrCEYhQvlcmrG2zI
lfMUao+GllrgL0td1iFPqyi2d9xCXhhlm6lWZZduYPSdJ4UwWeYs9E22B6WpAZf8WAumSh+i/tf6
/900ewjGa7in/4fdsHt3/3+2a/t/f7fu/98Cd/3fBB4uLl+MT46g0Q6Cq92jIDieHNvBAHt+2IGJ
IDmWBCvwlhsEo7PGF+eFu7x/2v9jnWFpSKwW7LOrcbLs7evNfThZzo9qpuCNR/MUX8DdyHHCmL9S
qGQGM8qyGTbhKTD1vTS1huKU7/u2apAbc4zw7qRmB41OGD5uVIcOGkSrouEkxYVIqUCCBkiRHDT8
tTtRYzgIHJtP6rD+W0aNGjVq1KhRo0aNGjVq1KhRo0aNfyv+BDcWTB4AKAAA
</data>

          </attachment>
      

    </bug>

</bugzilla>