<?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>27775</bug_id>
          
          <creation_ts>2009-07-28 13:16:15 -0700</creation_ts>
          <short_desc>Hiding a &lt;div&gt; by using CSS display:none causes a plug-in within the div to be unloaded losing state.</short_desc>
          <delta_ts>2022-06-23 18:20:48 -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>Plug-ins</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P1</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>45049</dependson>
          <blocked>24346</blocked>
    
    <blocked>68072</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Bill Abt">babt</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aestes</cc>
    
    <cc>A.Mueller</cc>
    
    <cc>darin</cc>
    
    <cc>eric</cc>
    
    <cc>mario.bensi</cc>
    
    <cc>mburtin</cc>
    
    <cc>oleg_smirnov</cc>
    
    <cc>pere.martir4</cc>
    
    <cc>playmobil</cc>
    
    <cc>roc</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>ssseintr2</cc>
    
    <cc>stuartmorgan</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>135337</commentid>
    <comment_count>0</comment_count>
    <who name="Bill Abt">babt</who>
    <bug_when>2009-07-28 13:16:15 -0700</bug_when>
    <thetext>Summary: 
Hiding a &lt;div&gt; by using CSS display:None causes a plug-in within the div to be unloaded losing state.

Steps to Reproduce:
1.  Create an html page containing a &lt;div&gt; with a Quicktime plug-in &lt;object&gt; tag inside pointing to a local movie that starts playing when the page is loaded.
2.  Add two buttons, &quot;Show&quot; and &quot;Hide&quot;.
3.  Add JS method for &quot;Show&quot; that shows the div by resetting the div.style.display property to &quot;&quot;.
4.  Add JS method for &quot;Hide&quot; that hides the div setting the div.style.display property to &quot;none&quot;.
5.  Save the html to an Apache WebServer.
6.  Load the page in Safari.
7.  Let movie run a few seconds and pause using the QT control.
8.  Click the &quot;Hide&quot; button.
9.  Click the &quot;Show&quot; button.

Expected Results:
At the end of step 9 above, expect to be able to resume the movie at the point where it was paused before hiding the div.

Actual Results:
Movie starts from the beginning.

Regression:
Does not seem to be a regression.  Can reproduce on latest Safari 3 as well Safari 4.

Notes:
It&apos;s not just the Quicktime plug-in that gets unloaded under these circumstances, it&apos;s any plug-in.

Apple Bug:</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>135341</commentid>
    <comment_count>1</comment_count>
    <who name="Bill Abt">babt</who>
    <bug_when>2009-07-28 13:18:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/7099093&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>167300</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-11-30 10:54:32 -0800</bug_when>
    <thetext>It looks like HTML5 requires this. It mentions this in the discussion of &lt;applet&gt;, &lt;embed&gt;, and &lt;object&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>167301</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-11-30 10:55:27 -0800</bug_when>
    <thetext>Unfortunately Radar 7099093 was closed. We&apos;ll need to get it reopened or file a new one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>167308</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-11-30 11:27:09 -0800</bug_when>
    <thetext>&lt;rdar://problem/7430314&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272940</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-09-01 12:41:13 -0700</bug_when>
    <thetext>I&apos;m working on moving more of the plugin management code from the renders to the DOM right now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>275810</commentid>
    <comment_count>6</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2010-09-08 07:05:49 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; I&apos;m working on moving more of the plugin management code from the renders to the DOM right now.

Hi Eric,

excellent news. I got a bug report regarding Dojo &amp; Tabs.
They are using an &lt;embed&gt; in one tab, and another unrelated second tab.
When I switch from the first tab to the second one, Dojo sets display=&quot;none&quot; on the first tab, and the RenderEmbeddedObject is destructed, when switching back the tabs the referenced document (through &lt;embed&gt;) is reloaded, and thus all dynamic DOM changes are not preserved.

None of the other browsers do this.
They guys are going to file a bug soon.

Cheers,
Niko</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295508</commentid>
    <comment_count>7</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-10-18 08:18:20 -0700</bug_when>
    <thetext>Bug 39286 is about the same thing, but with an SVG document rather than a plug-in.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>337994</commentid>
    <comment_count>8</comment_count>
    <who name="Bill Abt">babt</who>
    <bug_when>2011-01-21 03:55:46 -0800</bug_when>
    <thetext>Neither IE nor Firefox exhibit this behavior.  Both keep the plug-in loaded.  Just ran the test to confirm.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>338020</commentid>
    <comment_count>9</comment_count>
    <who name="Michaël Burtin">mburtin</who>
    <bug_when>2011-01-21 05:37:53 -0800</bug_when>
    <thetext>I plan to work on this bug to provide a patch but as I may not be able to do this without your hints, suggestions and recommendations on how to get plugin code out of rendering tree.

According to current HTML5 spec, plugin life-cycle should not be affected by CSS properties (on embed, object and applet elements).
http://dev.w3.org/html5/spec/Overview.html#dfnReturnLink-44
&quot;The embed element is unaffected by the CSS &apos;display&apos; property. The selected plugin is instantiated even if the element is hidden with a &apos;display:none&apos; CSS style.&quot;
http://dev.w3.org/html5/spec/Overview.html#dfnReturnLink-156
&quot;The above algorithm is independent of CSS properties (including &apos;display&apos;, &apos;overflow&apos;, and &apos;visibility&apos;). For example, it runs even if the element is hidden with a &apos;display:none&apos; CSS style, and does not run again if the element&apos;s visibility changes.&quot;
http://dev.w3.org/html5/spec/Overview.html#the-applet-element
&quot;The applet element is unaffected by the CSS &apos;display&apos; property. The Java Language runtime is instantiated even if the element is hidden with a &apos;display:none&apos; CSS style.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>338166</commentid>
    <comment_count>10</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-01-21 11:03:21 -0800</bug_when>
    <thetext>The key to fixing this is making the plug-in loading be driven by the DOM elements rather than the renderer. Finding the right DOM class to put this in could be a challenge. We may need to create an object that hangs off the DOM to share the code in.

The key to successfully fixing is it to greatly increase the number of plug-in-related tests and to find a way to do the work incrementally instead of one patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>338168</commentid>
    <comment_count>11</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-01-21 11:04:06 -0800</bug_when>
    <thetext>Please look at bug 45049 for more details.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>338170</commentid>
    <comment_count>12</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-01-21 11:05:01 -0800</bug_when>
    <thetext>Generally speaking it’s best to fix some smaller scale bugs first. This particular bug is probably not a good choice for a newcomer to the WebKit project.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>467074</commentid>
    <comment_count>13</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-09-14 09:33:10 -0700</bug_when>
    <thetext>*** Bug 68072 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>467711</commentid>
    <comment_count>14</comment_count>
    <who name="ssseintr">ssseintr2</who>
    <bug_when>2011-09-15 02:06:19 -0700</bug_when>
    <thetext>Hi,

Is this problem fixed..?

Thanks &amp; Regards,
Vicky.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>481526</commentid>
    <comment_count>15</comment_count>
    <who name="ssseintr">ssseintr2</who>
    <bug_when>2011-10-11 02:19:38 -0700</bug_when>
    <thetext>hi,

any updates..?

regards,
vicky</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>481535</commentid>
    <comment_count>16</comment_count>
    <who name="Stuart Morgan">stuartmorgan</who>
    <bug_when>2011-10-11 03:04:48 -0700</bug_when>
    <thetext>If the bug were fixed, the Status field would say it was fixed. If there were updates, you&apos;d see them in the comment stream--and you&apos;d have received an email, since you are CCd.

Please don&apos;t spam bugs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>495058</commentid>
    <comment_count>17</comment_count>
    <who name="Robert O&apos;Callahan">roc</who>
    <bug_when>2011-11-02 16:49:16 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; Neither IE nor Firefox exhibit this behavior.  Both keep the plug-in loaded.  Just ran the test to confirm.

That&apos;s odd. Firefox definitely uninstantiates display:none plugins.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>518567</commentid>
    <comment_count>18</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-12-09 15:14:47 -0800</bug_when>
    <thetext>See https://bugs.webkit.org/show_bug.cgi?id=45049#c7.  This is a spec decision.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>518616</commentid>
    <comment_count>19</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-12-09 16:04:19 -0800</bug_when>
    <thetext>(In reply to comment #17)
&gt; (In reply to comment #8)
&gt; &gt; Neither IE nor Firefox exhibit this behavior.  Both keep the plug-in loaded.  Just ran the test to confirm.
&gt; 
&gt; That&apos;s odd. Firefox definitely uninstantiates display:none plugins.

Roc is referring to:
https://bugzilla.mozilla.org/show_bug.cgi?id=697651
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-November/033732.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>518618</commentid>
    <comment_count>20</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-12-09 16:05:18 -0800</bug_when>
    <thetext>(In reply to comment #17)
&gt; (In reply to comment #8)
&gt; &gt; Neither IE nor Firefox exhibit this behavior.  Both keep the plug-in loaded.  Just ran the test to confirm.
&gt; 
&gt; That&apos;s odd. Firefox definitely uninstantiates display:none plugins.

Interesting that FF appears not to uninstantiate display: none frames:  See webkit bug 39286.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>817655</commentid>
    <comment_count>21</comment_count>
    <who name="Oleg Smirnov">oleg_smirnov</who>
    <bug_when>2013-01-28 02:57:10 -0800</bug_when>
    <thetext>Is anybody working for issue? Any solution here?
I have one solution with making plugin nonvisible instead of dispaly:none destroying. Is it intresting?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878077</commentid>
    <comment_count>22</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-06-23 18:20:48 -0700</bug_when>
    <thetext>Plugin support has been removed from WebKit, so marking as WONTFIX.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>