Closed Bug 1364505 Opened 3 years ago Closed 2 years ago

Don't offer to load Flash (when Ask-to-Activate) if it has no srcURI

Categories

(Core :: Plug-ins, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: Felipe, Assigned: Felipe)

References

Details

User Story

Specification of behavior:
* when Flash marked click-to-activate
** any <object> which would have no data (no nsIObjectLoadingContent.srcURI) should not trigger any click-to-play behavior and should always use fallback content
* When Flash is active for a site
** Flash with no data should instantiate as it does today (otherwise swfobject would break)

Attachments

(2 files)

+++ This bug was initially created as a clone of Bug #1363713 +++

Copying Description & User Story from bug 1363713. That bug handled this in the shield addon, and this bug is to handle this in the favor fallback code.

========

The SWFObject library is used extensively throughout the web as a wrapper for instantiating Flash on various browsers. It has a function that it runs at startup `testPlayerVersion` which checks the Flash version by creating an "empty" Flash instance (no data).

https://github.com/swfobject/swfobject/blob/master/swfobject/src/swfobject.js#L188

This triggers the plugin infobar in every case and seems to be one of the most common reasons for seeing the infobar.
See Also: → 1363713
So the patch for this turned out to be really simple! I realized I forgot to write tests for this feature, so I write a comprehensive one that covers this new rule and all the past rules.

I intend to activate this rule + the "video" rule in bug 1317856 (for Nightly users)
Comment on attachment 8867851 [details]
Bug 1364505 - Add a rule to favor plugin fallback content when no srcURI has been specified.

https://reviewboard.mozilla.org/r/139390/#review143178
Attachment #8867851 - Flags: review?(kyle) → review+
Comment on attachment 8867852 [details]
Bug 1364505 - Write tests for plugin favor-fallback mode.

https://reviewboard.mozilla.org/r/139392/#review143180
Attachment #8867852 - Flags: review?(kyle) → review+
Didn't see a patch over there for it yet (guessing you were waiting for me here, since you mentioned in Comment #3), but just making sure, you're adding the nosrc rule in another patch on bug 1317856 then, right?
Yep, that is correct!
Pushed by felipc@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f35b966ff024
Add a rule to favor plugin fallback content when no srcURI has been specified. r=qDot
https://hg.mozilla.org/integration/mozilla-inbound/rev/e30e7ee30b7c
Write tests for plugin favor-fallback mode. r=qDot
https://hg.mozilla.org/mozilla-central/rev/f35b966ff024
https://hg.mozilla.org/mozilla-central/rev/e30e7ee30b7c
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Blocks: 1365714
You need to log in before you can comment on or make changes to this bug.