Bug 1317856 (flash-click-to-play)

Make Flash plugin click-to-play (aka "Ask to Activate")

RESOLVED FIXED in Firefox 55

Status

()

Core
Plug-ins
P3
normal
RESOLVED FIXED
8 months ago
6 hours ago

People

(Reporter: cpeterson, Assigned: Felipe)

Tracking

(Depends on: 7 bugs, 4 keywords)

unspecified
mozilla55
dev-doc-complete, flashplayer, meta, site-compat
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox55 fixed, relnote-firefox 55+)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(3 attachments)

(Reporter)

Description

8 months ago
In 2017, Firefox will require click-to-activate approval from users before a website activates the Flash plugin for any content:

https://blog.mozilla.org/futurereleases/2016/07/20/reducing-adobe-flash-usage-in-firefox/
(Reporter)

Updated

8 months ago
Depends on: 1274659
(Reporter)

Comment 1

8 months ago
mbest recommends that we ship SharedArrayBuffer (bug 1225406), WebAssembly (bug 1188259), and WebGL2 (bug 889977) before making Flash click-to-play.
Depends on: 889977, 1188259, 1225406

Updated

8 months ago
Keywords: dev-doc-needed, site-compat
(Reporter)

Updated

8 months ago
Depends on: 1277066
No longer depends on: 1312091
No longer depends on: 1295984
Posted the site compatibility doc: https://www.fxsitecompat.com/en-CA/docs/2016/flash-content-will-be-click-to-activate-in-2017/
(Assignee)

Updated

6 months ago
Depends on: 1335232
(Assignee)

Updated

4 months ago
Depends on: 1348089

Comment 3

4 months ago
(In reply to Chris Peterson [:cpeterson] from comment #1)
> mbest recommends that we ship SharedArrayBuffer (bug 1225406), WebAssembly
> (bug 1188259), and WebGL2 (bug 889977) before making Flash click-to-play.

Why so? Making Flash click-to-play and shipping a bunch of features doesn't seem related.
(Reporter)

Comment 4

4 months ago
(In reply to David Bruant from comment #3)
> (In reply to Chris Peterson [:cpeterson] from comment #1)
> > mbest recommends that we ship SharedArrayBuffer (bug 1225406), WebAssembly
> > (bug 1188259), and WebGL2 (bug 889977) before making Flash click-to-play.
> 
> Why so? Making Flash click-to-play and shipping a bunch of features doesn't
> seem related.

Shipping those other features first means that Flash game developers can launch their WebAssembly/WebGL2 game ports before we make Flash click-to-play. Game developers don't want their users to be interrupted by click-to-play problems. Shipping them first is a nice-to-have, not a strict release blocker.
Depends on: 1351784
(Assignee)

Updated

4 months ago
Depends on: 1352224
(Assignee)

Comment 5

3 months ago
Created attachment 8863032 [details] [diff] [review]
Part 1 - Download and use 3rd-party blocklists

According to the plan, we want to land this now so that users can start downloading these lists in advance for switching Flash as CTA, to give them a better experience.

I'll note that even with Activate-By-Default, this setting will start applying the 3rd-party blocklist for flash.

I'm wrapping this around NIGHTLY_BUILD in order to make it a separate decision/bug to roll this out, and then it will be just a matter of removing the ifdef.
Assignee: nobody → felipc
(Assignee)

Updated

3 months ago
Status: NEW → ASSIGNED
(Assignee)

Updated

3 months ago
Attachment #8863032 - Flags: review?(benjamin)
Attachment #8863032 - Flags: review?(benjamin) → review+

Comment 6

3 months ago
Pushed by felipc@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ddf532ded6f2
Configure Nightly to download and use the flash 3rd party blocklist, in preparation for switching Flash as Click-to-Activate. r=bsmedberg
Backed out for various plugin related test failures, e.g. test_refresh_navigator_plugins.html:

https://hg.mozilla.org/integration/mozilla-inbound/rev/9be2eb8c9061cdfc16d7d53e8f384afa5e1dcb8e

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=ddf532ded6f21595fe1b88b02cb964994d2d30e2&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Flags: needinfo?(felipc)
(Assignee)

Updated

3 months ago
Depends on: 1361433
(Assignee)

Comment 8

3 months ago
The test failures were due to the testing running in a system principal, where plugins will be blocked with this change. I had filed bug 1361433 to change it, but that is intentional, so I cherry-picked the test fixes from bug 1335475 and sent that to tryserver to see if everything will work:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=b001dee46c942ccde9efd5a9ca0db5f18fbf561e
Flags: needinfo?(felipc)
(Assignee)

Comment 9

3 months ago
I spun off the pre-req of toggling plugins.flashBlock.enabled to a separate bug
Depends on: 1361798
(Assignee)

Updated

3 months ago
Depends on: 1362149
(Assignee)

Comment 10

3 months ago
Created attachment 8866060 [details] [diff] [review]
Make Flash CTP for Nightly, and favor html5 video content

(This has been through tryserver already and everything passed)
Attachment #8866060 - Flags: review?(benjamin)
Depends on: 1363713
Comment on attachment 8866060 [details] [diff] [review]
Make Flash CTP for Nightly, and favor html5 video content

Please also reset plugins.navigator.hidden_ctp_plugin to "" on all channels. https://dxr.mozilla.org/mozilla-central/rev/d8762cb967423618ff0a488f14745f60964e5c49/modules/libpref/init/all.js#3012

r=me with that addition

Please wait to land this until the week 2 flash list items are in production: so maybe land Monday for Tuesday's nightly?
Attachment #8866060 - Flags: review?(benjamin) → review+
(Assignee)

Comment 12

3 months ago
(In reply to Benjamin Smedberg [:bsmedberg] from comment #11)
> Comment on attachment 8866060 [details] [diff] [review]
> Make Flash CTP for Nightly, and favor html5 video content
> 
> Please also reset plugins.navigator.hidden_ctp_plugin to "" on all channels.
> https://dxr.mozilla.org/mozilla-central/rev/
> d8762cb967423618ff0a488f14745f60964e5c49/modules/libpref/init/all.js#3012

ah, good catch. FWIW the study/experiment did this, I just forgot about it in this patch.

> 
> r=me with that addition
> 
> Please wait to land this until the week 2 flash list items are in
> production: so maybe land Monday for Tuesday's nightly?


Sounds good. I'll try to get a patch to prefer fallback in the SWFObject case too, and hopefully land that before or together with this.
(Assignee)

Updated

3 months ago
Depends on: 1364505
Comment hidden (mozreview-request)

Comment 14

2 months ago
mozreview-review
Comment on attachment 8868255 [details]
Bug 1317856 - Ensure that flashblock tests are not affected by nosrc fallback rule.

https://reviewboard.mozilla.org/r/139838/#review143190

::: toolkit/components/url-classifier/tests/browser/flash_block_frame.html:10
(Diff revision 1)
>  </head>
>  <body>
>    <h1>Test page</h1>
> -  <object id="testObject" width="100" height="100" type="application/x-shockwave-flash-test"></object>
> +  <object id="testObject" width="100" height="100"
> +  		  type="application/x-shockwave-flash-test"
> +  		  data="simple_blank.swf"></object>

nit: tabs should be spaces
Attachment #8868255 - Flags: review?(ksteuber) → review+

Comment 15

2 months ago
Pushed by felipc@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ddc27dd93ec0
Ensure that flashblock tests are not affected by nosrc fallback rule. r=bytesized
https://hg.mozilla.org/integration/mozilla-inbound/rev/12a7b0378709
Make the Flash plugin Click-to-Activate by default on Nightly. r=bsmedberg

Comment 16

2 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/ddc27dd93ec0
https://hg.mozilla.org/mozilla-central/rev/12a7b0378709
Status: ASSIGNED → RESOLVED
Last Resolved: 2 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
(Assignee)

Updated

2 months ago
Blocks: 1365714
(Assignee)

Updated

2 months ago
See Also: → bug 1365714
I've documented this, piggy backing it on the Flash http/https-only update as it seemed to fit well:

https://developer.mozilla.org/en-US/docs/Plugins
https://developer.mozilla.org/en-US/Firefox/Releases/55
Keywords: dev-doc-needed → dev-doc-complete
Release Note Request (optional, but appreciated)
[Why is this notable]: Affects all Firefox users directly
[Affects Firefox for Android]: I guess so, maybe someone could verify that.
[Suggested wording]: Made Flash generally click-to-play and only allowed it on http:// and https:// URL schemes.
[Links (documentation, blog post, etc)]: see comment 17
relnote-firefox: --- → ?
Added to 55beta release notes.
relnote-firefox: ? → 55+
Depends on: 1377036
This significantly changed behavior from "hidden" to "fallback" mode in nightly. I kind of prefer hide behavior, I've already restored `plugins.navigator.hidden_ctp_plugin;Shockwave Flash` in my config.

Do you plan to support case like speedtest.net? Where they detect if flash is supported with JS and redirect to beta page. Before changes in this commit flash was hidden so such code redirected to no-flash page. And overall it was better in preferring fallback content, now it is sort of preferring non-flash.

if (swfobject.hasFlashPlayerVersion("10.0.0")) {
  // User has flash
  swfobject.embedSWF("http://c.speedtest.net/flash/speedtest.swf?v=352081", "flashcontent", "728", "450", "10.0.0", "flash/expressInstall.swf", flashvars, params, attributes);
  //swfmacmousewheel.registerObject(attributes.id);
} else {
  if ('true' === 'true' && 'false' === 'false') {
    window.location="//beta.speedtest.net" + window.location.search;
  }
  // don't redirect again
  else if ( window.location.search.indexOf("noflash=1") == -1) {
    // User does not have flash
    window.location="/?noflash=1";
  }
}
Also, please remove `plugins.navigator_hide_disabled_flash` from modules/libpref/init/all.js it is not used anymore. And it fooled me for a second that it is not working.
(Reporter)

Comment 22

13 days ago
(In reply to Kacper Michajłow [:kasper93] from comment #21)
> Also, please remove `plugins.navigator_hide_disabled_flash` from
> modules/libpref/init/all.js it is not used anymore. And it fooled me for a
> second that it is not working.

Good catch. No code reads the plugins.navigator_hide_disabled_flash pref so we should remove it:

https://searchfox.org/mozilla-central/search?q=navigator_hide_disabled_flash
Comment 21-22 are bug 1367226. Patches gladly accepted.

Regarding comment 20: yes this has been a tough tradeoff to make. At this point in time, we've decided to ship the "safer" version where Flash is still present in navigator.mimeTypes/navigator.plugins. This is provably better for the long tail of sites that may still require Flash, even though it's not great for sites that have a non-Flash fallback. That is a decision we will continue to revisit over the next year.

Comment 24

6 hours ago
Hello,
I have a question. I am from Zynga & we develop flash based games. I have one question - are we doing any domain blocking i.e. are we whitelisting any specific websites like facebook.com or google.com etc. for users not to go through "Click to activate" flow?

Comment 25

6 hours ago
I have another question -
from Firefox 55 onwards, how to detect flash is enabled or not? What is the JS code for that?
You need to log in before you can comment on or make changes to this bug.