As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact bugzilla-admin@mozilla.org
Last Comment Bug 751809 - click does not work on a plugin content when a plugin is just activated
: click does not work on a plugin content when a plugin is just activated
Status: VERIFIED FIXED
:
Product: Core
Classification: Components
Component: Plug-ins (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal with 1 vote (vote)
: mozilla18
Assigned To: Georg Fritzsche [:gfritzsche] [away Jan 14 - 24]
:
: Benjamin Smedberg [:bsmedberg]
Mentors:
: 755094 775709 784392 (view as bug list)
Depends on: 783723 805330
Blocks: click-to-play 774937 784392
  Show dependency treegraph
 
Reported: 2012-05-03 22:06 PDT by Dennis Lichtenthäler
Modified: 2013-12-27 14:36 PST (History)
24 users (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-
-
-
+
verified
verified


Attachments
Fix focus issue with click-to-play (771 bytes, patch)
2012-08-06 11:56 PDT, Georg Fritzsche [:gfritzsche] [away Jan 14 - 24]
no flags Details | Diff | Splinter Review
Fix & test for focus issue with click-to-play (10.30 KB, patch)
2012-08-10 11:32 PDT, Georg Fritzsche [:gfritzsche] [away Jan 14 - 24]
no flags Details | Diff | Splinter Review
Fix & test for focus issue with click-to-play, v3 (10.31 KB, patch)
2012-08-10 14:37 PDT, Georg Fritzsche [:gfritzsche] [away Jan 14 - 24]
no flags Details | Diff | Splinter Review
patch v4 (14.06 KB, patch)
2012-08-13 15:49 PDT, David Keeler [:keeler] (use needinfo?)
jaas: review+
Details | Diff | Splinter Review
patch v5 (14.23 KB, patch)
2012-08-27 05:57 PDT, Georg Fritzsche [:gfritzsche] [away Jan 14 - 24]
gavin.sharp: approval‑mozilla‑aurora+
Details | Diff | Splinter Review
Aurora patch (14.24 KB, patch)
2012-09-24 07:40 PDT, Georg Fritzsche [:gfritzsche] [away Jan 14 - 24]
no flags Details | Diff | Splinter Review

Description User image Dennis Lichtenthäler 2012-05-03 22:06:56 PDT
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/15.0 Firefox/15.0a1
Build ID: 20120503030512

Steps to reproduce:

* Enable plugins.click_to_play in about:config
* Switch to a page with embedded flash content (i.e. youtube)
* Click "Click here to activate plugins." 


Actual results:

The flash content plays but interaction is not possible. The elements react to hovering correctly but clicking does not have any effect. Keyboard controls (tabbing through available elements) works however.
Once I switch to another tab and back, clicking works.


Expected results:

After activating the plugin, clicking should work.
Comment 1 User image Cam 2012-06-13 23:06:56 PDT
Still present in FirefoxNightly 16.0a1 2012-06-13.
Comment 2 User image Tetsuharu OHZEKI [:tetsuharu] [UTC+9] 2012-06-23 10:23:36 PDT
I reproduce this bug still on http://hg.mozilla.org/mozilla-central/rev/bb4b37094b9f.

(In reply to Dennis Lichtenthäler from comment #0) 
> Once I switch to another tab and back, clicking works.

I focus the other element in a same page, clicking works too.
Comment 3 User image yukikeiichi 2012-06-23 12:06:53 PDT
This bug happened:
* Firefox Beta    14.0b8
* Firefox Aurora  15.0a2 2012-06-23
* Firefox Nightly 16.0a1 2012-06-23

This bug should fix before release Firefox 14.
Comment 4 User image Alex Keybl [:akeybl] 2012-06-26 11:55:37 PDT
(In reply to Yuki Keiichi from comment #3)
> This bug happened:
> * Firefox Beta    14.0b8
> * Firefox Aurora  15.0a2 2012-06-23
> * Firefox Nightly 16.0a1 2012-06-23
> 
> This bug should fix before release Firefox 14.

The setting is not yet user facing yet, so no need to track for release. Sending over to Jared for initial investigation.
Comment 5 User image Jared Wein [:jaws] (please needinfo? me) 2012-06-26 13:14:28 PDT
To note, I have only heard this reported with youtube.com.

I'm not sure what is happening there, but I talked with Margaret and we think that we should move the click-to-play event handler to the actual plugin instead of the overlay (bug 741130). That might fix this bug.

Re-assigning to dkeeler since he is going to work on fixing bug 741130.
Comment 6 User image David Keeler [:keeler] (use needinfo?) 2012-07-03 09:34:38 PDT
*** Bug 755094 has been marked as a duplicate of this bug. ***
Comment 7 User image Dennis Lichtenthäler 2012-07-03 11:00:07 PDT
(In reply to Jared Wein [:jaws] from comment #5)
> To note, I have only heard this reported with youtube.com.
Yep, I'm unable to reproduce this with anything other than youtube videos.
Comment 8 User image Tetsuharu OHZEKI [:tetsuharu] [UTC+9] 2012-07-03 11:20:29 PDT
(In reply to Dennis Lichtenthäler from comment #7)
> Yep, I'm unable to reproduce this with anything other than youtube videos.

I'm unable to reproduce this too. (on Today's nightly, http://hg.mozilla.org/mozilla-central/rev/e61399f31505 )
Comment 9 User image Tetsuharu OHZEKI [:tetsuharu] [UTC+9] 2012-07-03 11:47:45 PDT
(In reply to OHZEKI Tetsuharu [:saneyuki_s] from comment #8)
> (In reply to Dennis Lichtenthäler from comment #7)
> > Yep, I'm unable to reproduce this with anything other than youtube videos.
> 
> I'm unable to reproduce this too. (on Today's nightly,
> http://hg.mozilla.org/mozilla-central/rev/e61399f31505 )

Oops! Sorry, I have missed the test.
This bug is REPRODUCED on Today's nightly on OSX 10.7, http://hg.mozilla.org/mozilla-central/rev/e61399f31505.
Comment 10 User image David Keeler [:keeler] (use needinfo?) 2012-07-19 17:17:24 PDT
*** Bug 775709 has been marked as a duplicate of this bug. ***
Comment 11 User image Devdatta Akhawe [:devd] 2012-07-23 11:32:54 PDT
I can reproduce this too (Aurora 16.0a2 (2012-07-22))
Comment 12 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-08-03 08:45:43 PDT
This is bug is due to "mouseup" dom events not being sent to the plugin due to this check:
http://mxr.mozilla.org/mozilla-central/source/dom/plugins/base/nsPluginInstanceOwner.cpp#2098

Before the click is delivered, mContentFocused should be set to true here:
http://mxr.mozilla.org/mozilla-central/source/dom/plugins/base/nsPluginInstanceOwner.cpp#2083

However the "focus" dom event is never delivered to the pluginInstanceOwner with click-to-play. 
Still looking into how to properly fix this.
Comment 13 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-08-06 11:56:35 PDT
Created attachment 649335 [details] [diff] [review]
Fix focus issue with click-to-play

With click-to-play enabled, the focus event was delivered before the actual plugin instance owner was loaded.
Fixed by syncing the focus state when the frame is set on the plugin instance owner.
Comment 14 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-08-06 12:11:07 PDT
Comment on attachment 649335 [details] [diff] [review]
Fix focus issue with click-to-play

Josh, can you review this?
Comment 15 User image Benjamin Smedberg [:bsmedberg] 2012-08-07 07:07:13 PDT
This could really use a mochitest.
Comment 16 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-08-07 07:16:23 PDT
Comment on attachment 649335 [details] [diff] [review]
Fix focus issue with click-to-play

Good point, post-poning review request until this has a test.
Comment 17 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-08-10 11:32:34 PDT
Created attachment 650956 [details] [diff] [review]
Fix & test for focus issue with click-to-play
Comment 18 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-08-10 11:45:22 PDT
Pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=de8ccadbf88d
Comment 19 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-08-10 14:37:35 PDT
Created attachment 651001 [details] [diff] [review]
Fix & test for focus issue with click-to-play, v3

The test failed on try, even on 10.6 which runs the test fine for me. 
Adjusted successive click tests to do the same thing to find out:
https://tbpl.mozilla.org/?tree=Try&rev=9786a523e1d9
Comment 20 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-08-10 14:38:30 PDT
"to (In reply to Georg Fritzsche [:gfritzsche] [away 11-19 Aug] from comment #19)
> Adjusted successive click tests to do the same thing to find out:
... if this is a problem with the test enviroment.
Comment 21 User image David Keeler [:keeler] (use needinfo?) 2012-08-13 15:49:51 PDT
Created attachment 651559 [details] [diff] [review]
patch v4

Figured out the issue with the test not working. Georg said he'd be out for a bit, so I'll be shepherding this to landing. Asking for review from Josh.
Comment 22 User image Josh Aas 2012-08-15 07:28:23 PDT
Comment on attachment 651559 [details] [diff] [review]
patch v4

Excellent fix, thanks Georg and David!
Comment 23 User image David Keeler [:keeler] (use needinfo?) 2012-08-16 10:34:16 PDT
This was the run: https://tbpl.mozilla.org/?tree=Try&rev=e88d375f6e57
Marking checkin-needed.
Comment 24 User image Ryan VanderMeulen [:RyanVM] 2012-08-16 14:37:19 PDT
(In reply to David Keeler from comment #23)
> This was the run: https://tbpl.mozilla.org/?tree=Try&rev=e88d375f6e57

Green on Try.

https://hg.mozilla.org/integration/mozilla-inbound/rev/6943b37c68cc
Comment 25 User image Ed Morley [:emorley] 2012-08-17 05:29:32 PDT
https://hg.mozilla.org/mozilla-central/rev/6943b37c68cc
Comment 26 User image Ed Morley [:emorley] 2012-08-18 06:12:35 PDT
Sorry, backed out for bug 783723:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7a1a745a45f2
Comment 27 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-08-21 09:56:03 PDT
*** Bug 784392 has been marked as a duplicate of this bug. ***
Comment 28 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-08-27 05:57:45 PDT
Created attachment 655568 [details] [diff] [review]
patch v5

* Fix intermittent failures through SimpleTest.waitForFocus()
* Avoid causing failures on subsequent tests if the test for this bug fails

Josh, can i carry over the r+ for this fixed patch?
Comment 29 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-08-27 06:00:36 PDT
(In reply to Georg Fritzsche [:gfritzsche] from comment #28)
> Created attachment 655568 [details] [diff] [review]
> patch v5

Try run for this patch:
https://tbpl.mozilla.org/?tree=Try&rev=7d088f4af68d
Comment 30 User image Josh Aas 2012-08-27 06:52:30 PDT
(In reply to Georg Fritzsche [:gfritzsche] from comment #28)

> Josh, can i carry over the r+ for this fixed patch?

Yes
Comment 31 User image Ryan VanderMeulen [:RyanVM] 2012-08-27 09:52:17 PDT
(In reply to Georg Fritzsche [:gfritzsche] from comment #29)
> Try run for this patch:
> https://tbpl.mozilla.org/?tree=Try&rev=7d088f4af68d

Green on Try.

https://hg.mozilla.org/integration/mozilla-inbound/rev/31a27d47d242
Comment 32 User image Ryan VanderMeulen [:RyanVM] 2012-08-27 19:19:03 PDT
https://hg.mozilla.org/mozilla-central/rev/31a27d47d242
Comment 33 User image Benjamin Smedberg [:bsmedberg] 2012-09-19 13:27:51 PDT
This is important enough for CTP that it should be uplifted, I believe: see bug 792550 which is probably a dup and affects embedded youtube videos, which are one of the primary use cases that should work.
Comment 34 User image Alex Keybl [:akeybl] 2012-09-21 16:53:47 PDT
Georg - please nominate for Aurora approval when you get the chance.
Comment 35 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-09-22 06:09:00 PDT
Comment on attachment 655568 [details] [diff] [review]
patch v5

[Approval Request Comment]
Bug caused by: Click-to-play feature when active
User impact if declined: E.g. Youtube Flash not responding to button click unless switching tabs or otherwise refocusing plugin element.
Testing completed (on m-c, etc.): Been on nightly for a while, no negative feedback so far. Also verified locally.
Risk to taking this patch (and alternatives if risky): Low-risk, worst-case is probably causing other focus issues.
String or UUID changes made by this patch: none.
Comment 36 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-09-24 07:40:56 PDT
Created attachment 664068 [details] [diff] [review]
Aurora patch
Comment 37 User image Georg Fritzsche [:gfritzsche] [away Jan 14 - 24] 2012-09-24 07:41:43 PDT
Attachment 664068 [details] [diff] needs checkin on Aurora.
Comment 38 User image Ryan VanderMeulen [:RyanVM] 2012-09-24 15:21:41 PDT
https://hg.mozilla.org/releases/mozilla-aurora/rev/20a6963e3018
Comment 39 User image Virgil Dicu [:virgil] [QA] 2012-11-06 05:07:26 PST
After following the steps to reproduce from comment 0, I could not interact with the flash content on www.youtube.com or flash trailers in imdb.com for the build ID: 20120503030512.

For the same steps in comment 0 for 
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Firefox/17.0 beta 4
Build ID: 20121031065642
flash content is working on every mouse action. Also other flash content sites like trailers on imdb.com or vimeo.com.
Comment 40 User image Paul Silaghi, QA [:pauly] 2012-11-23 07:26:50 PST
Video controls are working fine with CTP enabled on Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:18.0) Gecko/18.0 Firefox/18.0. Verified fixed

Note You need to log in before you can comment on or make changes to this bug.