Bug 68072

Summary: display:none plugins cannot be accessed via script (disagrees with firefox)
Product: WebKit Reporter: ssseintr <ssseintr2>
Component: Plug-insAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: ahmad.saleem792, ap, eric, mario.bensi, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 27775, 45049    
Bug Blocks:    
Attachments:
Description Flags
Sample Script to Access Plugin Functionality from JS while it is styled with "display:none" none

Description ssseintr 2011-09-14 02:39:55 PDT
Dear Webkit Team,

Thanks for your continuous effort to making Webkit Great!!!.

Currently I'm involving plugin development based on npapi. I'm getting problem while using "display: none" style on <object> element to remove the plugin in the HTML layouting.

For example,
<div style="visibility: hidden; display: none;">
<object type="application/x-shockwave-flash" id="test"></object>
</div>.
 
Actually above script should remove the plugin Element only from the layout, but the plugin must be scriptable from Java Script.

But unable to script the Object Element. If I remove the "display: none", I can able access from JS. 

Actually my intention is to remove the Object Element from layout, but still I need use it's functionality.

Please refer the attachment for sample script.
Comment 1 ssseintr 2011-09-14 02:41:56 PDT
Created attachment 107313 [details]
Sample Script to Access Plugin Functionality from JS while it is styled with "display:none"
Comment 2 Alexey Proskuryakov 2011-09-14 09:33:10 PDT
You should be able to use visibility:hidden without display:none for now.

*** This bug has been marked as a duplicate of bug 27775 ***
Comment 3 ssseintr 2011-09-15 01:59:13 PDT
Hi,

Thanks for your comment.

But actually my intention is to remove the element from Layout. But, if I use "visibility:hidden" still the space is reserved for it. So it is not acceptable for my case.

Currently thinking to implement RenderNone class, which does nothing for NONE style. Currently in RenderObject.cpp, RenderObject* createObject(Node*, RenderStyle*) method doesn't creating any Renderer and returns 0. So I would like to Implement RenderNone & it simply omits the drawing. 

Will it work..?

Expecting your comment.

Regards,
Vicky
Comment 4 ssseintr 2011-10-11 01:57:47 PDT
hi all!!!

Any updates..?

please help me to fix this issue!!. 

regards,
vicky.
Comment 5 Eric Seidel (no email) 2011-12-09 15:14:33 PST
Interesting.  Somehow FF's behavior is inconsistent with ours, despite not showing display: none plugins.
Comment 6 Ahmad Saleem 2022-06-22 16:24:42 PDT
NPAPI support is removed from Safari 14 onward and it is not supported in Webkit Builds like WebkitGTK as well. I think this can be marked as "RESOLVED WONTFIX". Thanks!
Comment 7 Ryosuke Niwa 2022-06-22 22:18:48 PDT
Yup, won't fix.