Closed Bug 1177845 Opened 9 years ago Closed 9 years ago

Click-to-play overlay stops working after blocking a plugin

Categories

(Core Graveyard :: Plug-ins, defect, P5)

defect

Tracking

(firefox42 fixed)

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: rowbot, Assigned: rowbot, Mentored)

References

Details

Attachments

(2 files, 1 obsolete file)

Tested using Windows 7 with the latest nightly.  I only tested this with Flash, but I assume that this affects other plugins.  It is broken in both non-e10s and e10s.  This does not appear to be a regression as it is broken all the way back to when the click-to-play overlay was implemented.

STR:
1) Set Flash to Ask to Activate
2) Visit a http://twitch.tv or any other page that uses Flash.
3) Click on the click-to-play overlay in the page to activate the plugin.
4) Click the plugin icon in the URL bar and select Block Plugin.
5) Click on the click-to-play overlay in the page to reactivate the plugin.

Expected results:
Plugin should be reactivated

Actual results:
Nothing happens.  Clicking on the plugin icon in the URL bar and choosing Allow Now or Allow and Remember to reactivate the plugin works as expected.
Did you reload the page at any point while following steps 3-5?

Did the plugin start correctly at step 3?

I think this is a web compat limitation where once we've activated a plugin once, we can't activate it again without causing serious weirdnesses. But if you reload it should work.

If you reload twitch.tv after step 5, does the plugin activate?
Flags: needinfo?(smokey101stair)
> Did you reload the page at any point while following steps 3-5?
No, I did not reload the page at any point.

> Did the plugin start correctly at step 3?
Yes, the plugin is activated as expected in step 3.

> I think this is a web compat limitation where once we've activated a plugin once, we can't activate it again without
> causing serious weirdnesses. But if you reload it should work.
That seems logical, but it seems to work fine when I only use the plugin icon in the URL bar.  Just to be clear, only the in-content plugin overlay is broken when attempting to click on it after having blocked the plugin once.  I can successfully block and reactivate the plugin as many times as I want if I click on the plugin icon in the URL bar.

> If you reload twitch.tv after step 5, does the plugin activate?
If I reload twitch.tv after step 5, the plugin remains in it's inactive state so, however, reloading the page restores functionality to the click-to-play overlay until I try to block the plugin again.
Flags: needinfo?(smokey101stair)
ok, I understand the bug. It's very low priority, though. It's likely a problem with the XBL bindings being out of sync with reality, which is difficult to diagnose.

If anyone would like to volunteer to fix this bug, I recommend you use the chrome JS debugger and put breakpoints at the following locations in a nightly build:

onOverlayClick in PluginContent.jsm:

http://hg.mozilla.org/mozilla-central/annotate/e137fc38c431/browser/modules/PluginContent.jsm#l621
and step down into _showClickToPlayNotification.

showClickToPlayNotification in browser.js:

http://hg.mozilla.org/mozilla-central/annotate/e137fc38c431/browser/base/content/browser-plugins.js#l219
Mentor: benjamin
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Could someone please assign this bug to me, I would like to work on it.  Thanks.
Reattach the click event listener when the plugin state changes to "block".
Attachment #8627682 - Flags: review?(benjamin)
Awesome, thank you.
Assignee: nobody → smokey101stair
Comment on attachment 8627682 [details] [diff] [review]
bug1177845_reattach_event_listener.diff

Great! I wonder if this is something we can add an automated test for. I suspect you could either add this to http://mxr.mozilla.org/mozilla-central/source/browser/base/content/test/plugins/browser_pluginnotification.js or copy the relevant bits of that test into a new short test just for this behavior.

Is that something you can try? You can run the test locally by running `mach test browser/base/content/test/plugins/browser_pluginnotification.js`
Attachment #8627682 - Flags: review?(benjamin) → review+
Yes, I will give writing a test a try.
Attached patch bug1177845_test.diff (obsolete) (deleted) — Splinter Review
Test that a doorhanger is shown when clicking on the CTP overlay after having previously blocked a plugin.

It fails without the patch and passes with it when running it locally.
Attachment #8628050 - Flags: review?(benjamin)
Comment on attachment 8628050 [details] [diff] [review]
bug1177845_test.diff

Please make sure there is a newline at the end of the file again. This is awesome, thank you! Do you have the ability to do a try run, or shall I push one for you?
Flags: needinfo?(smokey101stair)
Attachment #8628050 - Flags: review?(benjamin) → review+
Attached patch bug1177845_test.diff (deleted) — Splinter Review
Added a new line to the end of the file as requested.

Asking for re-review just to make sure I qrefed correctly.
Attachment #8628050 - Attachment is obsolete: true
Attachment #8628280 - Flags: review?(benjamin)
I do not have the ability to perform a try run as far as I know, this was my first patch.  So I think you will need to push one for me.
Flags: needinfo?(smokey101stair)
Attachment #8628280 - Flags: review?(benjamin) → review+
Try looks good!
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/83c01d4a335b
https://hg.mozilla.org/mozilla-central/rev/5af01b6d16b7
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: