Windowed plugins are not hidden when the element has visibility: hidden style or when the parent element is hidden (setting display: none for example). It works for windowless plugins, but for windowed plugins we need to notify the UI process about the visibility changes to show/hide the plugin widget (GtkSocket).
Created attachment 229034 [details] Test case for hidden plugin This is a test case for visibility: hidden style. It can be tested with the totem plugin installed.
Created attachment 229035 [details] Test case for plugin inside an iframe hidden by its parent In this case we have an iframe inside a container div. Hiding the container makes the iframe disappear, but the windowed plugin remains visible.
Created attachment 229036 [details] Patch Implements plugins visibility change to notify the UI process in case of windowed plugins.
Created attachment 229124 [details] Try to fix EFL and mac builds
Comment on attachment 229124 [details] Try to fix EFL and mac builds View in context: https://bugs.webkit.org/attachment.cgi?id=229124&action=review > Source/WebKit2/PluginProcess/PluginControllerProxy.cpp:428 > +void PluginControllerProxy::visibilityDidChange(bool visible) Please name the parameter isVisible. > Source/WebKit2/PluginProcess/PluginControllerProxy.cpp:619 > +void PluginControllerProxy::windowedPluginVisibilityDidChange(bool visible, uint64_t windowID) Please name the parameter isVisible, and I think it makes more sense to put the windowID first. > Source/WebKit2/WebProcess/Plugins/PluginView.cpp:1021 > + if (isParentVisible() == visible) > + return; I think you still want to call the Widget implementation.
(In reply to comment #5) > (From update of attachment 229124 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=229124&action=review Thanks! > > Source/WebKit2/PluginProcess/PluginControllerProxy.cpp:428 > > +void PluginControllerProxy::visibilityDidChange(bool visible) > > Please name the parameter isVisible. Sure, renamed everywhere. > > Source/WebKit2/PluginProcess/PluginControllerProxy.cpp:619 > > +void PluginControllerProxy::windowedPluginVisibilityDidChange(bool visible, uint64_t windowID) > > Please name the parameter isVisible, and I think it makes more sense to put the windowID first. Yes, I agree, but in windowedPluginGeometryDidChange() the window id is also the last parameter, so I'll leave consistent for now. > > Source/WebKit2/WebProcess/Plugins/PluginView.cpp:1021 > > + if (isParentVisible() == visible) > > + return; > > I think you still want to call the Widget implementation. Widget::setParentVisible() it's just m_parentVisible = visible, I'm using the same approach as ScrollView
Created attachment 233795 [details] Patch for landing
Committed r170423: <http://trac.webkit.org/changeset/170423>