Bug 60285

Summary: REGRESSION (WebKit2): A white rectangle covers up important UI elements when composing a new message at mail.yahoo.com with BrowserPlus! plug-in installed
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Plug-insAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, andersca
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://mail.yahoo.com/
Bug Depends on: 60374    
Bug Blocks:    
Attachments:
Description Flags
Show/hide windowed plugins according to the plugin element's visibility CSS property
none
Show/hide windowed plugins according to the plugin element's visibility CSS property andersca: review+, webkit.review.bot: commit-queue-

Description Adam Roben (:aroben) 2011-05-05 12:08:00 PDT
To reproduce:
1. Visit mail.yahoo.com and log in.
2. Click the 'New' button to compose a new email message.
3. If the BrowserPlus! plug-in is installed, a white rectangle will appear in the upper left of the window. If the plug-in isn't installed, click 'Attach' and you will be prompted to install it. Repeat steps 1-3.

A large white rectangle is displayed in the top left of the screen, blocking important UI elements.
Comment 1 Adam Roben (:aroben) 2011-05-05 12:08:06 PDT
<rdar://problem/9152400>
Comment 2 Adam Roben (:aroben) 2011-05-05 12:12:04 PDT
I think the problem is that visibility:hidden doesn't hide plugins in WebKit2 on Windows.
Comment 3 Adam Roben (:aroben) 2011-05-05 12:15:13 PDT
Reduction:

data:text/html,<embed style="visibility:hidden" src="http://www.flashexample.com/system/files/sites/flashexample.com/files/upload/clock.swf" type="application/x-shockwave-flash" width=300 height=300>
Comment 4 Adam Roben (:aroben) 2011-05-05 12:15:53 PDT
This bug occurs on both Mac and Windows.
Comment 5 Adam Roben (:aroben) 2011-05-05 12:16:15 PDT
Well, the symptom as described in the Title and Description only occur on Windows. But the reduction is buggy on both Mac and Windows.
Comment 6 Adam Roben (:aroben) 2011-05-05 12:19:07 PDT
Looks like the reduction is buggy in Mac WK1, as well.
Comment 7 Adam Roben (:aroben) 2011-05-05 12:20:52 PDT
I split out Mac into bug 60289.
Comment 8 Adam Roben (:aroben) 2011-05-05 15:01:44 PDT
I think we can probably port WebKit1's code to WebKit2 to fix this.
Comment 9 Adam Roben (:aroben) 2011-05-06 10:16:48 PDT
Created attachment 92598 [details]
Show/hide windowed plugins according to the plugin element's visibility CSS property
Comment 10 Adam Roben (:aroben) 2011-05-06 10:36:53 PDT
Created attachment 92602 [details]
Show/hide windowed plugins according to the plugin element's visibility CSS property
Comment 11 Anders Carlsson 2011-05-06 11:30:51 PDT
Comment on attachment 92602 [details]
Show/hide windowed plugins according to the plugin element's visibility CSS property

View in context: https://bugs.webkit.org/attachment.cgi?id=92602&action=review

> Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:297
> +void NetscapePlugin::platformVisibilityDidChange()
> +{
> +    // FIXME: Implement this. <http://webkit.org/b/44368>.
> +    notImplemented();
> +}

Do we really need this on Mac since there's no such thing as windowed plug-ins there?

> Source/WebKit2/WebProcess/Plugins/PluginController.h:49
> +    virtual bool isPluginVisible() = 0;

This needs to be implemented in PluginControllerProxy or the ENABLE_PLUGIN_PROCESS build will break.
Comment 12 Adam Roben (:aroben) 2011-05-06 11:32:12 PDT
Comment on attachment 92602 [details]
Show/hide windowed plugins according to the plugin element's visibility CSS property

View in context: https://bugs.webkit.org/attachment.cgi?id=92602&action=review

>> Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:297
>> +}
> 
> Do we really need this on Mac since there's no such thing as windowed plug-ins there?

Well, we need to fix bug 44368 somehow. I assumed this was the way to fix it. Maybe you can explain!

>> Source/WebKit2/WebProcess/Plugins/PluginController.h:49
>> +    virtual bool isPluginVisible() = 0;
> 
> This needs to be implemented in PluginControllerProxy or the ENABLE_PLUGIN_PROCESS build will break.

Will do!
Comment 13 Anders Carlsson 2011-05-06 11:34:13 PDT
(In reply to comment #12)
> (From update of attachment 92602 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=92602&action=review
> 
> >> Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:297
> >> +}
> > 
> > Do we really need this on Mac since there's no such thing as windowed plug-ins there?
> 
> Well, we need to fix bug 44368 somehow. I assumed this was the way to fix it. Maybe you can explain!
> 

I think this may not be a problem with WebKit2 since we don't have NSViews backing plug-in views. Should be easy to test with your test case!

> >> Source/WebKit2/WebProcess/Plugins/PluginController.h:49
> >> +    virtual bool isPluginVisible() = 0;
> > 
> > This needs to be implemented in PluginControllerProxy or the ENABLE_PLUGIN_PROCESS build will break.
> 
> Will do!

Thanks!
Comment 14 Adam Roben (:aroben) 2011-05-06 11:35:26 PDT
Comment on attachment 92602 [details]
Show/hide windowed plugins according to the plugin element's visibility CSS property

View in context: https://bugs.webkit.org/attachment.cgi?id=92602&action=review

>>>> Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:297
>>>> +}
>>> 
>>> Do we really need this on Mac since there's no such thing as windowed plug-ins there?
>> 
>> Well, we need to fix bug 44368 somehow. I assumed this was the way to fix it. Maybe you can explain!
> 
> I think this may not be a problem with WebKit2 since we don't have NSViews backing plug-in views. Should be easy to test with your test case!

I did test in WebKit2, and the test fails. I guess I'll let you sort it out!
Comment 15 WebKit Review Bot 2011-05-06 11:41:53 PDT
Comment on attachment 92602 [details]
Show/hide windowed plugins according to the plugin element's visibility CSS property

Attachment 92602 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/8615037
Comment 16 Adam Roben (:aroben) 2011-05-06 11:43:45 PDT
Committed r85961: <http://trac.webkit.org/changeset/85961>