Closed Bug 360288 Opened 18 years ago Closed 18 years ago

SeaMonkey Front End Support for New Remote Content Policy

Categories

(SeaMonkey :: MailNews: Message Display, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mscott, Assigned: iannbugzilla)

References

Details

(Keywords: fixed-seamonkey1.1, fixed1.8.1.1, late-l10n)

Attachments

(1 file, 3 obsolete files)

This is the seamonkey version of Bug 357321. I've done the address book changes for both seamonkey and thunderbird already, but we'll need seamonkey specific changes for: * Modifying the remote content bar to show the link for allowing remote content from this sender. * Removing the remote content address book white listing pref from the options UI. I took the liberty of checking in the new strings on the branch before seamonkey's string freeze. Thunderbird's string freeze is still a month away.
No longer depends on: 357321
dependency got lost
Depends on: 357321
Summary: Seamonkey Front End Support for New Remote Content Policy → SeaMonkey Front End Support for New Remote Content Policy
Blocks: TB2SM
This patch: * Drops the addressbook / whitelist code from the Message Display pref pane * Makes the necessary changes to the mailWindowOverlay code * Updates help to reflect above changes * Updates help to include what "Allow remote images in HTML mail" is used for
Assignee: mail → iann_bugzilla
Status: NEW → ASSIGNED
Attachment #246556 - Flags: review?(neil)
Comment on attachment 246556 [details] [diff] [review] Port TB's front end support for new remote content policy v0.1 >-function LoadMsgWithRemoteContent() >+/** >+ * LoadMsgWithRemoteContent >+ * Reload the current message, allowing remote content >+ */ >+function loadMsgWithRemoteContent() Why the L/l change? (and note that the comment still has an L...) >+function msgHdrForCurrentMessage() >+{ >+ var msgURI = GetLoadedMessage(); >+ return (msgURI && !(/type=application\/x-message-display/.test(msgURI))) ? messenger.msgHdrFromURI(msgURI) : null; >+} Can you find out why this needs to be different from a) just calling msgHdrFromURI or b) calling gDBView.hdrForFirstSelectedMessage instead? >+ numAddresses = headerParser.parseHeadersWithArray(msgHdr.author, addresses, names, fullNames); >+ var authorEmailAddress = addresses.value[0]; Why is this different to the code that displays the email address? >+ // reload the message now that we've updated the remote content policy for the sender >+ MsgReload(); What happens if the user cancels the new address card, or adds the card but changes his mind about allowing remote content? >+ <description id="allowRemoteContentForAuthorDesc" class="text-link" flex="1" >+ onclick="allowRemoteContentForSender();"></description> Ideally text-link is for labels only. Also use <label ... />.
Attachment #246556 - Flags: review?(neil) → review+
Attached patch Revised Port of TB's front end v0.1a (obsolete) (deleted) — Splinter Review
Changes since v0.1: * Fixed setting of AllowRemoteContent checkbox in abCardOverlay.js * Fixed various DOS line endings in abCardOverlay.js * Make abCardOverlay.js return current setting of allowRemoteContent * Make use of above value to determine whether need to reload message Note: Did not change from <description> to <label> as using <label> left artifacts after clicking on it.
Attachment #246556 - Attachment is obsolete: true
Attachment #246581 - Flags: review?
Attachment #246581 - Flags: review? → review?(neil)
Comment on attachment 246581 [details] [diff] [review] Revised Port of TB's front end v0.1a >+ gEditCard.card.allowRemoteContent = >+ window.arguments[0].allowRemoteContent == 'true'; >+ window.arguments[0].allowRemoteContent = 'false'; Why are these strings? Oh wait, this is shared with Thunderbird? That sucks. >+/** >+ * LoadMsgWithRemoteContent >+ * Reload the current message, allowing remote content >+ */ > function LoadMsgWithRemoteContent() I've got no problem with you changing this to a lower case l to match Thunderbird but the comment should match ;-) >+ var cardForEmailAddress; >+ var addrbook; >+ while (!cardForEmailAddress && enumerator.hasMoreElements()) >+ { >+ addrbook = enumerator.getNext(); >+ if (addrbook instanceof Components.interfaces.nsIAbMDBDirectory) >+ cardForEmailAddress = addrbook.cardForEmailAddress(authorEmailAddress); >+ } >+ >+ if (cardForEmailAddress) >+ { >+ // set the property for remote content >+ cardForEmailAddress.allowRemoteContent = true; >+ cardForEmailAddress.editCardToDatabase(""); >+ } >+ else >+ { >+ var args = {primaryEmail:authorEmailAddress, displayName:names.value[0], >+ allowRemoteContent:'true'}; >+ // create a new card and set the property >+ window.openDialog("chrome://messenger/content/addressbook/abNewCardDialog.xul", >+ "", "chrome,resizable=no,titlebar,modal,centerscreen", args); >+ cardForEmailAddress = args.allowRemoteContent == 'true'; >+ } >+ >+ // reload the message if we've updated the remote content policy for the sender >+ if (cardForEmailAddress) >+ MsgReload(); >+} This is cheating... in one case it's a card, in the other it's true/false. >+ <description id="allowRemoteContentForAuthorDesc" class="text-link" flex="1" >+ onclick="allowRemoteContentForSender();"/> I thought that by using a label it would make it tabbable so that you could activate it from the keyboard, so hopefully the artefact you're seeing is a focus outline!
Attachment #246581 - Flags: review?(neil)
Attached patch Boolean rather than string patch v0.1b (obsolete) (deleted) — Splinter Review
Changes since v0.1a: * Changed to using boolean for allowRemoteContent - abCardOverlay.js is forked from TB * Changed from <description> to <label> * Stop cheating and use new variable for showing whether allowRemoteContent is set or not.
Attachment #246581 - Attachment is obsolete: true
Attachment #246674 - Flags: review?(neil)
I'll try to synch up the Thunderbird changes with the good review comments from Neil if someone doesn't beat me to it.
Comment on attachment 246674 [details] [diff] [review] Boolean rather than string patch v0.1b >+ window.arguments[0].allowRemoteContent = gEditCard.card.allowRemoteContent; File/New Card opens the dialog without any arguments, so you need to allow for that (OnLoadNewCard already does this). r=me with that fixed.
Attachment #246674 - Flags: review?(neil) → review+
Changes since v0.1b: * Adds check for arguments in window before trying to set .allowRemoteContent Carrying forward r= and requesting sr=
Attachment #246674 - Attachment is obsolete: true
Attachment #246731 - Flags: superreview?(bienvenu)
Attachment #246731 - Flags: review+
Attachment #246731 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 246731 [details] [diff] [review] Test for arguments patch v0.1c (Checked into trunk & 1.8.1 branch) we need this for SM1.1 as the backend changes went into the branch in bug 357321. The string changes, outside of help, do not matter if they don't get picked up by l10n.
Attachment #246731 - Flags: approval-seamonkey1.1?
Comment on attachment 246731 [details] [diff] [review] Test for arguments patch v0.1c (Checked into trunk & 1.8.1 branch) a=me for SeaMonkey 1.1 - please add the late-l10n keyword and notify m.d.l10n on checkin. Even if the string changes are minor, localizers should know about them.
Attachment #246731 - Flags: approval-seamonkey1.1? → approval-seamonkey1.1+
Comment on attachment 246731 [details] [diff] [review] Test for arguments patch v0.1c (Checked into trunk & 1.8.1 branch) Checking in (trunk) mailnews/addrbook/resources/content/abCardOverlay.js; new revision: 1.64; previous revision: 1.63 mailnews/base/prefs/resources/content/pref-viewing_messages.xul; new revision: 1.52; previous revision: 1.51 mailnews/base/prefs/resources/locale/en-US/pref-viewing_messages.dtd; new revision: 1.28; previous revision: 1.27 mailnews/base/resources/content/mailWindowOverlay.js; new revision: 1.247; previous revision: 1.246 mailnews/base/resources/content/mailWindowOverlay.xul; new revision: 1.322; previous revision: 1.321 mailnews/base/resources/locale/en-US/messenger.properties; new revision: 1.137; previous revision: 1.136 suite/locales/en-US/chrome/common/help/mail_help.xhtml; new revision: 1.79; previous revision: 1.78 themes/classic/messenger/primaryToolbar.css; new revision: 1.14; previous revision: 1.13 themes/modern/messenger/primaryToolbar.css; new revision: 1.18; previous revision: 1.17 done
Attachment #246731 - Attachment description: Test for arguments patch v0.1c → Test for arguments patch v0.1c (Checked into trunk)
Comment on attachment 246731 [details] [diff] [review] Test for arguments patch v0.1c (Checked into trunk & 1.8.1 branch) Checking in (1.8.1 branch) extensions/help/resources/locale/en-US/mail_help.xhtml; new revision: 1.62.2.15; previous revision: 1.62.2.14 mailnews/addrbook/resources/content/abCardOverlay.js; new revision: 1.55.2.7; previous revision: 1.55.2.6 mailnews/base/prefs/resources/content/pref-viewing_messages.xul; new revision: 1.47.6.5; previous revision: 1.47.6.4 mailnews/base/prefs/resources/locale/en-US/pref-viewing_messages.dtd; new revision: 1.23.6.5; previous revision: 1.23.6.4 mailnews/base/resources/content/mailWindowOverlay.js; new revision: 1.222.2.18; previous revision: 1.222.2.17 mailnews/base/resources/content/mailWindowOverlay.xul; new revision: 1.298.2.20; previous revision: 1.298.2.19 mailnews/base/resources/locale/en-US/messenger.properties; new revision: 1.122.2.10; previous revision: 1.122.2.9 themes/classic/messenger/primaryToolbar.css; new revision: 1.12.2.1; previous revision: 1.12 themes/modern/messenger/primaryToolbar.css; new revision: 1.17.2.1; previous revision: 1.17 done
Attachment #246731 - Attachment description: Test for arguments patch v0.1c (Checked into trunk) → Test for arguments patch v0.1c (Checked into trunk & 1.8.1 branch)
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
No longer blocks: TB2SM
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: