Closed
Bug 1294341
Opened 8 years ago
Closed 8 years ago
Ask to Activate doesn't work on http://converticon.com/ after landing patches from bug #1186948
Categories
(Core Graveyard :: Plug-ins, defect, P3)
Tracking
(firefox49 unaffected, firefox50- disabled, firefox51- disabled, firefox52 verified)
VERIFIED
FIXED
mozilla52
People
(Reporter: Virtual, Assigned: blassey)
References
()
Details
(Keywords: nightly-community, regression)
Attachments
(7 files, 5 obsolete files)
85.51 KB,
image/png
|
Details | |
130.61 KB,
image/png
|
Details | |
1.25 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
3.07 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
4.28 KB,
patch
|
mconley
:
review+
|
Details | Diff | Splinter Review |
1.29 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
1.28 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
[Tracking Requested - why for this release]: Regression STR: 1. Make sure that Flash plugin is set to "Ask to Activate" 2. Open this webpage http://converticon.com/ 3. and see that you get this information "This content requires the Adobe Flash Player. Get Flash" instead of the real webpage, no doorhanger or icon notifications present Regression window Pushlog (mozilla-inbound-win32): https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=80c7885e432cec558c128379d2fb86d9935fb0ad&tochange=aa4557a5485fd8266f3f529d979215e296afac97
Flags: needinfo?(blassey.bugs)
Virtual_ManPL [:Virtual] 🇵🇱 - (please needinfo? me - so I will see your comment/reply/question/etc.)
Reporter
|
||
Updated•8 years ago
|
status-firefox51:
--- → affected
Comment 1•8 years ago
|
||
I got a block icon. It asked to activate when I clicked it.
Virtual_ManPL [:Virtual] 🇵🇱 - (please needinfo? me - so I will see your comment/reply/question/etc.)
Reporter
|
||
Comment 2•8 years ago
|
||
In my case I got nothing there (even in Safe Mode or with new profile) on Mozilla Firefox 64bit on Windows 7 64bit.
Assignee | ||
Comment 3•8 years ago
|
||
Here is the flash detection code: if (navigator.plugins != null && navigator.plugins.length > 0) { if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) { The issue here is that if the only plugin you have installed is Flash and Flash is click to play, navigator.plugins.length will now be 0 so we never get to the navigator.plugins["Shockwave Flash"] check which will cause the plugin activation UI to show. To test this theory, I enabled acrobat reader and with that enabled I get the plugin activation UI (because the length of navigator.plugins is now 1). Perhaps the right thing to do here is to show the UI if navigator.length is queried. Another option would be to report the length of plugins and hidden plugins, though that might get dicier.
Flags: needinfo?(blassey.bugs)
Comment 4•8 years ago
|
||
Include a bogus plugin in navigator.plugins in this case? :)
Comment 6•8 years ago
|
||
I think showing the UI if length is queried might be a good idea. We're slowly filtering down to just flash anyways. The bogus plugin would work but seems a bit hacky. :)
Flags: needinfo?(kyle)
Virtual_ManPL [:Virtual] 🇵🇱 - (please needinfo? me - so I will see your comment/reply/question/etc.)
Reporter
|
||
Updated•8 years ago
|
Status: NEW → ASSIGNED
Comment 9•8 years ago
|
||
I don't think we should do this (yet, anyway). We are likely going to be trading false negatives for false positives, and we don't have any data/evidence for why this would improve things instead of making things worse. We're going to turn off the navigator.plugins change in bug 1296004. If we do decide to do this, we need a bunch of data, and ddurst's team will be working on this as part of the Test Pilot experiment.
Assignee: kyle → nobody
Status: ASSIGNED → NEW
Comment 10•8 years ago
|
||
'k. Feel free to reassign to me if it does become a thing.
Comment 11•8 years ago
|
||
Based on comment 9 I'm setting this to unaffected for 50.
Virtual_ManPL [:Virtual] 🇵🇱 - (please needinfo? me - so I will see your comment/reply/question/etc.)
Reporter
|
||
Comment 12•8 years ago
|
||
(In reply to Benjamin Smedberg [:bsmedberg] from comment #9) > I don't think we should do this (yet, anyway). We are likely going to be > trading false negatives for false positives, and we don't have any > data/evidence for why this would improve things instead of making things > worse. We're going to turn off the navigator.plugins change in bug 1296004. > If we do decide to do this, we need a bunch of data, and ddurst's team will > be working on this as part of the Test Pilot experiment. We can always WONTFIX this, as it's kinda "broken" webpage coding per using nasty hacks, so it's mainly Tech Evangelism issue, not a very big deal for sure.
Comment 13•8 years ago
|
||
Just because a website is poorly written doesn't mean we can ignore this. If users used to be able to use this site, and then they can't, that's a problem in Firefox that we usually need to address.
Virtual_ManPL [:Virtual] 🇵🇱 - (please needinfo? me - so I will see your comment/reply/question/etc.)
Reporter
|
||
Comment 14•8 years ago
|
||
The same could be said about Firefox extensions (like in bug #1294344) ;)
Virtual_ManPL [:Virtual] 🇵🇱 - (please needinfo? me - so I will see your comment/reply/question/etc.)
Reporter
|
||
Comment 15•8 years ago
|
||
Fixing flags per bug #1296004 Comment 4
Assignee | ||
Comment 16•8 years ago
|
||
Assignee: nobody → blassey.bugs
Attachment #8784199 -
Flags: review?(benjamin)
Updated•8 years ago
|
Priority: -- → P3
Comment 17•8 years ago
|
||
Comment on attachment 8784199 [details] [diff] [review] dummy_plugin.patch >diff --git a/dom/base/nsPluginArray.cpp b/dom/base/nsPluginArray.cpp >+ if (mPlugins.Length() == 0 && mCTPPlugins.Length() != 0) { >+ const char* emptyArray[1] = {""}; Reading the nsPluginTag constructor, I don't think we need this at all (you should be able to pass nullptr). But if we do need the array, shouldn't it { nullptr } and not { "" }? Also, static char const *const emptyArray[1] so that it gets put in rodata. Need tests here to make sure this doesn't break accidentally.
Attachment #8784199 -
Flags: review?(benjamin) → review-
Updated•8 years ago
|
Assignee | ||
Comment 19•8 years ago
|
||
Attachment #8784199 -
Attachment is obsolete: true
Attachment #8785476 -
Flags: review?(benjamin)
Assignee | ||
Comment 20•8 years ago
|
||
patch for reference, I'll need to update it to tip
Assignee | ||
Comment 21•8 years ago
|
||
Attachment #8785478 -
Flags: review?(benjamin)
Assignee | ||
Comment 22•8 years ago
|
||
Attachment #8785480 -
Flags: review?(benjamin)
Assignee | ||
Updated•8 years ago
|
Attachment #8785477 -
Attachment is obsolete: true
Comment 23•8 years ago
|
||
Comment on attachment 8785478 [details] [diff] [review] dummy_plugin_test.patch I believe that the synchronous pref setting here will fail randomly with e10s, because setting a pref requires a round trip to the chrome process and isn't always immediately visible: I recommend using SpecialPowers.pushPrefEnv({set: ["plugins.navigator.hidden_ctp_plugin", testPluginName]}, callback) see http://searchfox.org/mozilla-central/source/dom/html/test/test_object_plugin_nav.html#93 for an example
Attachment #8785478 -
Flags: review?(benjamin) → review-
Updated•8 years ago
|
Attachment #8785480 -
Flags: review?(benjamin) → review+
Updated•8 years ago
|
Attachment #8785476 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 24•8 years ago
|
||
Attachment #8785478 -
Attachment is obsolete: true
Attachment #8787404 -
Flags: review?(benjamin)
Virtual_ManPL [:Virtual] 🇵🇱 - (please needinfo? me - so I will see your comment/reply/question/etc.)
Reporter
|
||
Updated•8 years ago
|
Status: NEW → ASSIGNED
Comment 25•8 years ago
|
||
Comment on attachment 8787404 [details] [diff] [review] dummy_plugin_test.patch In general this looks fine. I don't think we need the cleanup function at all, though: IIRC pushPrefEnv does all of the necessary cacheing and restoring itself. mconley can you confirm my understanding?
Attachment #8787404 -
Flags: review?(benjamin) → review?(mconley)
Comment 26•8 years ago
|
||
Comment on attachment 8787404 [details] [diff] [review] dummy_plugin_test.patch Review of attachment 8787404 [details] [diff] [review]: ----------------------------------------------------------------- Just a few questions - see below. Thanks for the test! ::: dom/plugins/test/mochitest/plugin-utils.js @@ +33,5 @@ > // propagate to the child. Yuck! > SpecialPowers.Services.tm.currentThread.processNextEvent(true); > } > SimpleTest.registerCleanupFunction(function() { > SpecialPowers.setTestPluginEnabledState(oldEnabledState, pluginName); In the case that oldEnabledState is false-y, how will setTestPluginEnabledState take that when passed that false-y value? ::: dom/plugins/test/mochitest/test_hidden_plugin.html @@ +1,4 @@ > +<!DOCTYPE html> > +<html> > +<head> > + <title>Test whether windowed plugins with opacity:0 get their window set correctly</title> I don't think this title matches the test. @@ +8,5 @@ > + > +<body> > + <script type="application/javascript;version=1.7"> > + "use strict" > + { Could you please add some documentation at the top of the test for what this test tests for? @@ +18,5 @@ > + let prefName = "plugins.navigator.hidden_ctp_plugin"; > + try { > + oldPrefVal = SpecialPowers.getCharPref(prefName); > + } catch (ex) {} > + let promise = new Promise (res => SpecialPowers.pushPrefEnv({ set: [[prefName, testPluginName]]}, res)) SpecialPowers.pushPrefEnv now returns a Promise if you don't pass it a callback, so I think you can just do: let promise = SpecialPowers.pushPrefEnv({ set: [[prefName, testPluginName]] }); @@ +20,5 @@ > + oldPrefVal = SpecialPowers.getCharPref(prefName); > + } catch (ex) {} > + let promise = new Promise (res => SpecialPowers.pushPrefEnv({ set: [[prefName, testPluginName]]}, res)) > + promise.then(function() { > + SimpleTest.registerCleanupFunction(function() { bsmedberg is correct - pushPrefEnv will do the cleanup for you when your test is done - this cleanup is not necessary. @@ +28,5 @@ > + return new Promise(res => SpecialPowers.pushPrefEnv({ clear: [[prefName, "CHAR"]]}, res)); > + } > + }); > + for (let i = 0; i < plugins.length; i++) { > + let plugin = plugins[i] Nit - missing semicolon @@ +40,5 @@ > + setTestPluginEnabledState(oldState, plugin.name); > + }); > + } > + } > + is(navigator.plugins.length, 1, "navigator.plugins length should be 1"); Remind me again, what is the value of navigator.plugins.length in these sorts of mochitests when the hidden_ctp_plugin pref isn't set? I assume we have several plugins available by default?
Attachment #8787404 -
Flags: review?(mconley) → review-
Assignee | ||
Comment 27•8 years ago
|
||
(In reply to Mike Conley (:mconley) - (Digging through needinfos and reviews) from comment #26) > Comment on attachment 8787404 [details] [diff] [review] > dummy_plugin_test.patch > > Review of attachment 8787404 [details] [diff] [review]: > ----------------------------------------------------------------- > > Just a few questions - see below. Thanks for the test! > > ::: dom/plugins/test/mochitest/plugin-utils.js > @@ +33,5 @@ > > // propagate to the child. Yuck! > > SpecialPowers.Services.tm.currentThread.processNextEvent(true); > > } > > SimpleTest.registerCleanupFunction(function() { > > SpecialPowers.setTestPluginEnabledState(oldEnabledState, pluginName); > > In the case that oldEnabledState is false-y, how will > setTestPluginEnabledState take that when passed that false-y value? I think this utility function is just wrong. If the old enabled state was 0 (disabled) then we just fail when trying to set it to something else currently. I think whoever wrote this thought that a false return value meant failure. > > Remind me again, what is the value of navigator.plugins.length in these > sorts of mochitests when the hidden_ctp_plugin pref isn't set? I assume we > have several plugins available by default? I'm seeing 16 plugins on my system (before this test disables them), of which I think 7 are test plugins. This test disables all the plugins except for one that it makes c2p and hides.
Assignee | ||
Comment 28•8 years ago
|
||
Attachment #8787404 -
Attachment is obsolete: true
Attachment #8789079 -
Flags: review?(mconley)
Comment 29•8 years ago
|
||
Comment on attachment 8789079 [details] [diff] [review] dummy_plugin_test.patch Review of attachment 8789079 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me, assuming all green on try. Thanks for the test!
Attachment #8789079 -
Flags: review?(mconley) → review+
Assignee | ||
Comment 30•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=21891e889592
Keywords: checkin-needed
Comment 31•8 years ago
|
||
Try push has test failures. Please add proper commit messages to the patches while you're at it. https://treeherder.mozilla.org/logviewer.html#?job_id=27320625&repo=try https://treeherder.mozilla.org/logviewer.html#?job_id=27323208&repo=try
Keywords: checkin-needed
Assignee | ||
Comment 32•8 years ago
|
||
two test issues. Debug builds assert that the plugin's file name has a period in it (so it can strip off the extension). This makes the file name dummy.plugin to work around that. Linux 32bit test machines have a DivX plugin that shows up in navigator.plugins even when all the plugins are disabled, so this patch disables its own test on that platform. https://treeherder.mozilla.org/#/jobs?repo=try&revision=98f4db84874d&selectedJob=28081096
Attachment #8795309 -
Flags: review?(benjamin)
Updated•8 years ago
|
Attachment #8795309 -
Flags: review?(benjamin) → review+
Comment 33•8 years ago
|
||
Pushed by blassey@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/154d446586b4 put dummy plugin in navigator.plugins when a click to play plugin is hidden and its the only plugin r=bsmedberg https://hg.mozilla.org/integration/mozilla-inbound/rev/be81e6841555 pref to control which CTP plugins should be hidden r=bsmedberg https://hg.mozilla.org/integration/mozilla-inbound/rev/5a582bbcc549 test for dummy plugin r=mconley https://hg.mozilla.org/integration/mozilla-inbound/rev/0f9c9d933a42 disable test on linux 32 and add a fake file name to avoid an assertion in debug builds r=bsmedberg
Comment 34•8 years ago
|
||
Pushed by kwierso@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/183727ce6551 Also skip the test on linux64 because tests were failing
We were still intermittently failing on linux64 (twice so far that I've noticed), so I pushed a followup to disable the test on linux64: https://treeherder.mozilla.org/logviewer.html#?job_id=36648596&repo=mozilla-inbound
All backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/cd47fc2d3202 because now I've seen the test intermittently fail on Windows like https://treeherder.mozilla.org/logviewer.html#?job_id=36662375&repo=mozilla-inbound#L2747
Flags: needinfo?(blassey.bugs)
Assignee | ||
Comment 37•8 years ago
|
||
Benjamin, I'm coming to the conclusion that our test machines are a mess with a bunch of plugins we can't disable. Disabling all the plugins is the pre-req for testing this, not the thing we're trying to test. I'm of the opinion we should land this without the test. What say you?
Flags: needinfo?(blassey.bugs) → needinfo?(benjamin)
Assignee | ||
Comment 38•8 years ago
|
||
this is the same change you already r+'d minus disabling the test for linux 32
Attachment #8795309 -
Attachment is obsolete: true
Attachment #8796212 -
Flags: review?(benjamin)
Assignee | ||
Comment 39•8 years ago
|
||
This changes the test to only assert that navigator.plugins is not empty, which is really all we care about https://treeherder.mozilla.org/#/jobs?repo=try&revision=cf730a412d87
Attachment #8796213 -
Flags: review?(benjamin)
Updated•8 years ago
|
Flags: needinfo?(benjamin)
Attachment #8796212 -
Flags: review?(benjamin) → review+
Comment 40•8 years ago
|
||
Comment on attachment 8796213 [details] [diff] [review] fix_test.patch Maybe we can do better when Flash-only lands in 43, but this is good enough for now.
Attachment #8796213 -
Flags: review?(benjamin) → review+
Comment 41•8 years ago
|
||
Pushed by blassey@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/a480a95a9e6d put dummy plugin in navigator.plugins when a click to play plugin is hidden and its the only plugin r=bsmedberg https://hg.mozilla.org/integration/mozilla-inbound/rev/4f2d1ce84a07 pref to control which CTP plugins should be hidden r=bsmedberg https://hg.mozilla.org/integration/mozilla-inbound/rev/6bd48531bded test for dummy plugin r=mconley https://hg.mozilla.org/integration/mozilla-inbound/rev/8d536cd5e5ab add a fake filename to avoid an assertion that plugin filenames have periods in them r=bsmedberg https://hg.mozilla.org/integration/mozilla-inbound/rev/71e521c11c8b only assert that navigator.plugins is not empty when there is a hidden CTP plugin r=bsmedberg
Comment 42•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a480a95a9e6d https://hg.mozilla.org/mozilla-central/rev/4f2d1ce84a07 https://hg.mozilla.org/mozilla-central/rev/6bd48531bded https://hg.mozilla.org/mozilla-central/rev/8d536cd5e5ab https://hg.mozilla.org/mozilla-central/rev/71e521c11c8b
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Virtual_ManPL [:Virtual] 🇵🇱 - (please needinfo? me - so I will see your comment/reply/question/etc.)
Reporter
|
||
Comment 43•8 years ago
|
||
I want to confirm that, the issue is fixed with latest Nightly 52.0a1 (2016-10-04) (64-bit) with "plugins.navigator_hide_disabled_flash" preference set to "true" in about:config (per bug #1296004). Thank you very much.
Status: RESOLVED → VERIFIED
Virtual_ManPL [:Virtual] 🇵🇱 - (please needinfo? me - so I will see your comment/reply/question/etc.)
Reporter
|
||
Updated•8 years ago
|
Has Regression Range: --- → yes
Has STR: --- → yes
Comment 44•8 years ago
|
||
Maybe I'm misunderstanding this bug, but when I visit: http://, with "Ask to Activate" enabled (and "Click to Play per-element" extension installed), I'm still getting asked to install flash -- regardless of whether "plugins.navigator_hide_disabled_flash" is true or false.
Comment 45•8 years ago
|
||
Oops. That link should be: http://www.ctvnews.ca/video
Virtual_ManPL [:Virtual] 🇵🇱 - (please needinfo? me - so I will see your comment/reply/question/etc.)
Reporter
|
||
Comment 46•8 years ago
|
||
(In reply to IU from comment #44) > Maybe I'm misunderstanding this bug, but when I visit: http://, with "Ask to > Activate" enabled (and "Click to Play per-element" extension installed), I'm > still getting asked to install flash -- regardless of whether > "plugins.navigator_hide_disabled_flash" is true or false. + (In reply to IU from comment #45) > Oops. That link should be: http://www.ctvnews.ca/video Looks like you need to refresh that site manually, so it will be working, at least it works for me, and don't forget that Click to Play per-element extension is broken (see bug #1294344) with "plugins.navigator_hide_disabled_flash" preference set to "true" in about:config (per bug #1296004).
Comment 47•8 years ago
|
||
This change is what made "Ask to Activate" basically unusable for me because it affects a game I play (one of the two sites with Flash that I still use). Despite being set to "Allow and Remember", that site always shows me information to install Flash (it's the game http://startrek.gamesamba.com/ and I guess it needs an account to get to actually see this, which I experience when trying to enter a server). Emptying plugins.navigator.hidden_ctp_plugin makes the site work as expected. Bug 1312091 may play a role there, as they may use an iframe for running the actual Flash content.
Virtual_ManPL [:Virtual] 🇵🇱 - (please needinfo? me - so I will see your comment/reply/question/etc.)
Reporter
|
||
Updated•7 years ago
|
Keywords: nightly-community
Virtual_ManPL [:Virtual] 🇵🇱 - (please needinfo? me - so I will see your comment/reply/question/etc.)
Reporter
|
||
Updated•7 years ago
|
QA Contact: Virtual
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•