Bug 23019 - The embed element is still not hidden by display:none
Summary: The embed element is still not hidden by display:none
Status: RESOLVED DUPLICATE of bug 15081
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-28 20:48 PST by wesleyZeng
Modified: 2009-02-24 22:08 PST (History)
1 user (show)

See Also:


Attachments
Testcase (652 bytes, text/html)
2009-02-24 21:30 PST, Simon Fraser (smfr)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description wesleyZeng 2008-12-28 20:48:46 PST
As follow:

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

If the display equals to "none", rendererIsNeeded should return false.

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

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

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

-    return true;
+    return HTMLElement::rendererIsNeeded(style);
}
Comment 1 Simon Fraser (smfr) 2009-02-24 21:30:45 PST
Created attachment 27957 [details]
Testcase
Comment 2 Simon Fraser (smfr) 2009-02-24 22:08:56 PST

*** This bug has been marked as a duplicate of 15081 ***