Bug 68072 - display:none plugins cannot be accessed via script (disagrees with firefox)
Summary: display:none plugins cannot be accessed via script (disagrees with firefox)
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on: 27775 45049
  Show dependency treegraph
Reported: 2011-09-14 02:39 PDT by ssseintr
Modified: 2022-06-22 22:18 PDT (History)
5 users (show)

See Also:

Sample Script to Access Plugin Functionality from JS while it is styled with "display:none" (deleted)
2011-09-14 02:41 PDT, ssseintr
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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>
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

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.

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

Any updates..?

please help me to fix this issue!!. 

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.