mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 12:20:56 +00:00

This patch modifies the behaviour of loads when the DONT_RETARGET nsIURILoader flag is set, making them ignore the Content-Disposition header. This means that loads which cannot trigger downloads will attempt to display handleable content which would otherwise be downloaded. This keeps overall behaviour of object/embed elements more similar to their behaviour pre-Fission, while allowing them to load attachment PDFs and Images as-if they were being displayed by a plugin. This patch does not change the existing behaviour around unknown/unhandleable resource types in object/embed elements. In Gecko, object/embed elements are prevented from triggering downloads or external protocol handlers during their initial load. Other browser engines can trigger a download for an unknown resource type (or sometimes an attachment resource). The new pref dom.navigation.object_embed.allow_retargeting can be enabled to instead trigger a download when loading these resources within an object/embed element. Differential Revision: https://phabricator.services.mozilla.com/D201645