Created attachment 9593063
Bug 1698140 - Don't claim PDF channels that have no browsing context in 
PdfStreamConverter. r=Gijs


When a consumer opens a PDF channel that is not a docshell/document load (e.g.
opening a PDF attachment from the Thunderbird compose window via nsIURILoader),
the channel has no targetBrowsingContext. getConvertedType currently still
rewrites the channel's type to text/html so PDF.js can take over - but PDF.js
cannot render without a DOM window, and the rewritten text/html type then breaks
the external-helper-app fallback. Bail out early so the load is handled normally
as application/pdf and routed to the user's PDF handler.

This implements the targetBrowsingContext check suggested in comment 29.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1981163

Title:
  [upstream] In Compose window, if a PDf is joined and clicked to open,
  Thunderbird launches Firefox instead of Evince

To manage notifications about this bug go to:
https://bugs.launchpad.net/thunderbird/+bug/1981163/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to