mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-02 20:42:49 +00:00
Bug #201866 --> Spell checker should not check qutoed text for plain text compose.
r=mkapply sr=kin
This commit is contained in:
parent
1db54cf6bc
commit
e12c07dc7c
@ -47,6 +47,9 @@ nsComposeTxtSrvFilter::nsComposeTxtSrvFilter() :
|
||||
{
|
||||
|
||||
mBlockQuoteAtom = do_GetAtom("blockquote");
|
||||
mPreAtom = do_GetAtom("pre");
|
||||
mSpanAtom = do_GetAtom("span");
|
||||
mMozQuoteAtom = do_GetAtom("_moz_quote");
|
||||
mTypeAtom = do_GetAtom("type");
|
||||
mScriptAtom = do_GetAtom("script");
|
||||
mTextAreaAtom = do_GetAtom("textarea");
|
||||
@ -76,6 +79,13 @@ nsComposeTxtSrvFilter::Skip(nsIDOMNode* aNode, PRBool *_retval)
|
||||
*_retval = cite.EqualsIgnoreCase("cite");
|
||||
}
|
||||
}
|
||||
} else if (tag == mPreAtom || tag == mSpanAtom) {
|
||||
if (mIsForMail) {
|
||||
nsAutoString mozQuote;
|
||||
if (NS_SUCCEEDED(content->GetAttr(kNameSpaceID_None, mMozQuoteAtom, mozQuote))) {
|
||||
*_retval = mozQuote.EqualsIgnoreCase("true");
|
||||
}
|
||||
}
|
||||
} else if (tag == mScriptAtom ||
|
||||
tag == mTextAreaAtom ||
|
||||
tag == mSelectAreaAtom ||
|
||||
|
@ -67,6 +67,9 @@ public:
|
||||
protected:
|
||||
PRBool mIsForMail;
|
||||
nsCOMPtr<nsIAtom> mBlockQuoteAtom;
|
||||
nsCOMPtr<nsIAtom> mPreAtom; // mail plain text quotes are wrapped in pre tags
|
||||
nsCOMPtr<nsIAtom> mSpanAtom; //or they may be wrapped in span tags (editor.quotesPreformatted).
|
||||
nsCOMPtr<nsIAtom> mMozQuoteAtom; // _moz_quote_
|
||||
nsCOMPtr<nsIAtom> mTypeAtom;
|
||||
nsCOMPtr<nsIAtom> mScriptAtom;
|
||||
nsCOMPtr<nsIAtom> mTextAreaAtom;
|
||||
|
Loading…
x
Reference in New Issue
Block a user