зеркало из https://github.com/mozilla/pjs.git
Adding noCSS flag to nsHTMLEditor; b=bugscape11956, r=brade, sr=kin
This commit is contained in:
Родитель
792ca39aca
Коммит
76f1156090
|
@ -60,6 +60,7 @@ interface nsIPlaintextEditor : nsISupports
|
||||||
const short eEditorDisableForcedReflowsBit = 8; /* prevent immediate reflows */
|
const short eEditorDisableForcedReflowsBit = 8; /* prevent immediate reflows */
|
||||||
const short eEditorEnableWrapHackBit = 9; /* allow the editor to set font: monospace on the root node */
|
const short eEditorEnableWrapHackBit = 9; /* allow the editor to set font: monospace on the root node */
|
||||||
const short eEditorWidgetBit = 10; /* bit for widgets */
|
const short eEditorWidgetBit = 10; /* bit for widgets */
|
||||||
|
const short eEditorNoCSSBit = 11; /* this HTML editor should not create css styles */
|
||||||
|
|
||||||
const long eEditorPlaintextMask = 1;
|
const long eEditorPlaintextMask = 1;
|
||||||
const long eEditorSingleLineMask = 2;
|
const long eEditorSingleLineMask = 2;
|
||||||
|
@ -72,6 +73,7 @@ interface nsIPlaintextEditor : nsISupports
|
||||||
const long eEditorDisableForcedReflowsMask = 256;
|
const long eEditorDisableForcedReflowsMask = 256;
|
||||||
const long eEditorEnableWrapHackMask = 512;
|
const long eEditorEnableWrapHackMask = 512;
|
||||||
const long eEditorWidgetMask = 1024;
|
const long eEditorWidgetMask = 1024;
|
||||||
|
const long eEditorNoCSSMask = 2048;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The length of the contents in characters.
|
* The length of the contents in characters.
|
||||||
|
|
|
@ -445,6 +445,8 @@ NS_IMETHODIMP
|
||||||
nsHTMLEditor::SetFlags(PRUint32 aFlags)
|
nsHTMLEditor::SetFlags(PRUint32 aFlags)
|
||||||
{
|
{
|
||||||
if (!mRules) { return NS_ERROR_NULL_POINTER; }
|
if (!mRules) { return NS_ERROR_NULL_POINTER; }
|
||||||
|
mCSSAware = !PRBool(aFlags | nsIPlaintextEditor::eEditorNoCSSMask);
|
||||||
|
|
||||||
return mRules->SetFlags(aFlags);
|
return mRules->SetFlags(aFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче