<?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>23019</bug_id>
          
          <creation_ts>2008-12-28 20:48:46 -0800</creation_ts>
          <short_desc>The embed element is still not hidden by display:none</short_desc>
          <delta_ts>2009-02-24 22:08:56 -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>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>15081</dup_id>
          
          <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="wesleyZeng">weihong.zeng</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103662</commentid>
    <comment_count>0</comment_count>
    <who name="wesleyZeng">weihong.zeng</who>
    <bug_when>2008-12-28 20:48:46 -0800</bug_when>
    <thetext>As follow:

&lt;embed id=&quot;fc&quot; src=&quot;http://801.tianya.cn/2008/12/sanguo/1224/640.swf&quot;&gt;&lt;/embed&gt;
&lt;script&gt;
var obj = document.getElementById(&quot;fc&quot;);
obj.style.display =&quot;none&quot;;
&lt;/script&gt;

If the display equals to &quot;none&quot;, rendererIsNeeded should return false.

bool HTMLEmbedElement::rendererIsNeeded(RenderStyle* style)
{
    if (isImageType())
        return HTMLPlugInElement::rendererIsNeeded(style);

    Frame* frame = document()-&gt;frame();
    if (!frame)
        return false;

    Node* p = parentNode();
    if (p &amp;&amp; p-&gt;hasTagName(objectTag)) {
        ASSERT(p-&gt;renderer());
        return false;
    }

-    return true;
+    return HTMLElement::rendererIsNeeded(style);
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110899</commentid>
    <comment_count>1</comment_count>
      <attachid>27957</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-02-24 21:30:45 -0800</bug_when>
    <thetext>Created attachment 27957
Testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110904</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2009-02-24 22:08:56 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 15081 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>27957</attachid>
            <date>2009-02-24 21:30:45 -0800</date>
            <delta_ts>2009-02-24 21:30:45 -0800</delta_ts>
            <desc>Testcase</desc>
            <filename>flash-block.html</filename>
            <type>text/html</type>
            <size>652</size>
            <attacher name="Simon Fraser (smfr)">simon.fraser</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFs
Ly9FTiIKICAgImh0dHA6Ly93d3cudzMub3JnL1RSL2h0bWw0L2xvb3NlLmR0ZCI+Cgo8aHRtbCBs
YW5nPSJlbiI+CjxoZWFkPgogIDxtZXRhIGh0dHAtZXF1aXY9IkNvbnRlbnQtVHlwZSIgY29udGVu
dD0idGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04Ij4KICA8dGl0bGU+RGlzcGxheTpub25lIG9uIHBs
dWdpbjwvdGl0bGU+CiAgPHN0eWxlIHR5cGU9InRleHQvY3NzIiBtZWRpYT0ic2NyZWVuIj4KICAg
IGVtYmVkW3R5cGU9ImFwcGxpY2F0aW9uL3gtc2hvY2t3YXZlLWZsYXNoIl0gewogICAgICBkaXNw
bGF5OiBub25lOwogICAgfQogIDwvc3R5bGU+CjwvaGVhZD4KPGJvZHk+CgogIDxlbWJlZCBzcmM9
Imh0dHA6Ly93d3cuaG9tZXN0YXJydW5uZXIuY29tL3dlbGNvbWUuc3dmIiBxdWFsaXR5PSJoaWdo
IiAgd2lkdGg9IjU1MCIgaGVpZ2h0PSI0MDAiIHR5cGU9ImFwcGxpY2F0aW9uL3gtc2hvY2t3YXZl
LWZsYXNoIiBwbHVnaW5zcGFnZT0iaHR0cDovL3d3dy5tYWNyb21lZGlhLmNvbS9zaG9ja3dhdmUv
ZG93bmxvYWQvaW5kZXguY2dpP1AxX1Byb2RfVmVyc2lvbj1TaG9ja3dhdmVGbGFzaCI+CiAgPC9l
bWJlZD4KICAKPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>