Closed Bug 282278 Opened 17 years ago Closed 17 years ago

Don't spell check message headers when forwarding as inline

Categories

(Thunderbird :: Message Compose Window, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird1.1

People

(Reporter: mscott, Assigned: mscott)

Details

Attachments

(1 file)

Currently, if you forward a message as inline, you should notice the inline
spell checker underlines names inside the table that contains the headers for
the forwarded message.

The inline spell checker and the regular spell checker should skip these parts.
We just need to make nsComposeTxtSrvFilter check for this header table and skip it.
Status: NEW → ASSIGNED
Target Milestone: --- → Thunderbird1.1
Attached patch the fixSplinter Review
Asking Daniel for the moa on the editor change to nsComposeTxtSrvFilter
Attachment #174343 - Flags: superreview?(bienvenu)
Attachment #174343 - Flags: review?(daniel)
Comment on attachment 174343 [details] [diff] [review]
the fix

sr=bienvenu, pending moa.
Attachment #174343 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 174343 [details] [diff] [review]
the fix

>+    } else if (tag == mTableAtom) {
>+      if (mIsForMail) {
>+          nsAutoString className;
>+          if (NS_SUCCEEDED(content->GetAttr(kNameSpaceID_None, mClassAtom, className))) {
>+            *_retval = className.EqualsLiteral("moz-email-headers-table");
>+        }
>+      } 

A class attribute's value is a whitespace-separated (see HTML 4 spec for the
extended definition of 'white-space' here) list of classes... Checking equality
is not enough here.
If you are 100000% sure that you'll never need an extra class on that table for
presentational reasons, well, I can live with that and you have my conditional
r=, and I ask you to flag it yourself in the bug.

BUT it would be much CLEANER - and probably future-proof - to assume className
is a whitespace separated list of classes... I am specifically thinking of XPI
extensions that could need an extra class on the header to render it
differently.
Comment on attachment 174343 [details] [diff] [review]
the fix

I'm positive we don't. If we do later on, we have lots of class names in this
file to make work with spaces not just this one.
Attachment #174343 - Flags: review?(daniel) → review+
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
This fix only applies to HTML mail, right?

Is there some reason you couldn't apply the same class to the header lines in a 
plain-text inline-forward?  (After all, quotes are handled as a class within the 
plain-text editor.)

This could even provide a nicety in that we could make rendering rules to show 
the forwarded headers in, e.g., italics.
You need to log in before you can comment on or make changes to this bug.