Closed
Bug 2004890
Opened 7 months ago
Closed 7 months ago
Move loadBlockedImage() into its own module
Categories
(Thunderbird :: Message Compose Window, enhancement)
Thunderbird
Message Compose Window
Tracking
(Not tracked)
RESOLVED
FIXED
148 Branch
People
(Reporter: john, Assigned: john)
References
Details
(Keywords: leave-open)
Attachments
(1 file)
The fix for Bug 1997519 no longer requires this patch, and it was moved into a different bug for follow-up dicussions. A use-case I do see is a cache:
- Bug 1997519 is triggered by late conversion of images from replied messages.
- A WebExtension grabbing the content of the composer after the window was created could still get the content with the original URLs.
- A WebExtension manipulating that content and then writing it back to the composer caused image display errors, as the "error" event handler which would convert them was also removed - this is fixed now by https://phabricator.services.mozilla.com/D275536.
- The original idea was to manually convert images in the markdown before returning them to the caller, so that writing it back to the composer would not cause image fails - here I would have called loadBlockedImage() in the API implementation.
- We could try to skip re-converting the images when the original composer content is written back by using a cache, which could live inside ComposeUtils.mjs and have loadBlockedImage() return the value cached from the previous conversion.
- The cache could be global (same for all compose windows) or attached to each individual compose window.
- The cache could be auto-purged after about 5s, to cover only the startup situation.
| Assignee | ||
Comment 1•7 months ago
|
||
To make loadBlockedImage usable outside of MsgComposeCommands.js, it
is moved into a newly created ComposeUtils.sys.mjs module.
Updated•7 months ago
|
Assignee: nobody → john
Status: NEW → ASSIGNED
| Assignee | ||
Updated•7 months ago
|
Blocks: tb-maintenance-2025-q4
| Assignee | ||
Updated•7 months ago
|
Keywords: checkin-needed-tb
Target Milestone: --- → 148 Branch
| Assignee | ||
Updated•7 months ago
|
Keywords: leave-open
Pushed by john@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/955ec0abbc26
Move loadBlockedImage() into ComposeUtils.sys.mjs. r=freaktechnik
Keywords: checkin-needed-tb
| Assignee | ||
Updated•7 months ago
|
Summary: Move loadBlockedImage() into its own module, maybe add a cache. → Move loadBlockedImage() into its own module
| Assignee | ||
Updated•7 months ago
|
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•