Index: editor/libeditor/html/nsHTMLEditor.cpp
===================================================================
RCS file: /cvsroot/mozilla/editor/libeditor/html/nsHTMLEditor.cpp,v
retrieving revision 1.559
diff -u -9 -p -r1.559 nsHTMLEditor.cpp
--- editor/libeditor/html/nsHTMLEditor.cpp 26 Aug 2007 05:53:38 -0000 1.559
+++ editor/libeditor/html/nsHTMLEditor.cpp 17 Sep 2007 02:50:40 -0000
@@ -279,21 +279,18 @@ nsHTMLEditor::Init(nsIDOMDocument *aDoc,
if (1)
{
// block to scope nsAutoEditInitRulesTrigger
nsAutoEditInitRulesTrigger rulesTrigger(static_cast(this), rulesRes);
// Init the plaintext editor
result = nsPlaintextEditor::Init(aDoc, aPresShell, aRoot, aSelCon, aFlags);
if (NS_FAILED(result)) { return result; }
- // the HTML Editor is CSS-aware only in the case of Composer
- mCSSAware = (0 == aFlags);
-
// disable Composer-only features
if (aFlags & eEditorMailMask)
{
SetAbsolutePositioningEnabled(PR_FALSE);
SetSnapToGridEnabled(PR_FALSE);
}
// Init the HTML-CSS utils
if (mHTMLCSSUtils)
@@ -416,20 +413,18 @@ nsHTMLEditor::GetFlags(PRUint32 *aFlags)
if (!mRules || !aFlags) { return NS_ERROR_NULL_POINTER; }
return mRules->GetFlags(aFlags);
}
NS_IMETHODIMP
nsHTMLEditor::SetFlags(PRUint32 aFlags)
{
if (!mRules) { return NS_ERROR_NULL_POINTER; }
- mCSSAware = ((aFlags & (eEditorNoCSSMask | eEditorMailMask)) == 0);
-
return mRules->SetFlags(aFlags);
}
NS_IMETHODIMP
nsHTMLEditor::InitRules()
{
// instantiate the rules for the html editor
nsresult res = NS_NewHTMLEditRules(getter_AddRefs(mRules));
if (NS_FAILED(res)) return res;
Index: editor/libeditor/html/nsHTMLEditor.h
===================================================================
RCS file: /cvsroot/mozilla/editor/libeditor/html/nsHTMLEditor.h,v
retrieving revision 1.233
diff -u -9 -p -r1.233 nsHTMLEditor.h
--- editor/libeditor/html/nsHTMLEditor.h 26 Aug 2007 05:53:38 -0000 1.233
+++ editor/libeditor/html/nsHTMLEditor.h 17 Sep 2007 02:50:41 -0000
@@ -763,19 +763,18 @@ protected:
nsCOMArray mContentFilters;
TypeInState* mTypeInState;
nsCOMPtr mCachedNode;
PRPackedBool mCRInParagraphCreatesParagraph;
- PRPackedBool mCSSAware;
nsHTMLCSSUtils *mHTMLCSSUtils;
// Used by GetFirstSelectedCell and GetNextSelectedCell
PRInt32 mSelectedCellIndex;
nsString mLastStyleSheetURL;
nsString mLastOverrideStyleSheetURL;
// Maintain a list of associated style sheets and their urls.
Index: editor/libeditor/html/nsHTMLEditorStyle.cpp
===================================================================
RCS file: /cvsroot/mozilla/editor/libeditor/html/nsHTMLEditorStyle.cpp,v
retrieving revision 1.72
diff -u -9 -p -r1.72 nsHTMLEditorStyle.cpp
--- editor/libeditor/html/nsHTMLEditorStyle.cpp 8 Jul 2007 07:08:15 -0000 1.72
+++ editor/libeditor/html/nsHTMLEditorStyle.cpp 17 Sep 2007 02:50:44 -0000
@@ -1910,23 +1910,20 @@ nsHTMLEditor::GetFontColorState(PRBool *
}
// the return value is true only if the instance of the HTML editor we created
// can handle CSS styles (for instance, Composer can, Messenger can't) and if
// the CSS preference is checked
nsresult
nsHTMLEditor::GetIsCSSEnabled(PRBool *aIsCSSEnabled)
{
*aIsCSSEnabled = PR_FALSE;
- if (mCSSAware) {
- // TBD later : removal of mCSSAware and use only the presence of mHTMLCSSUtils
- if (mHTMLCSSUtils) {
- *aIsCSSEnabled = mHTMLCSSUtils->IsCSSPrefChecked();
- }
+ if (mHTMLCSSUtils) {
+ *aIsCSSEnabled = mHTMLCSSUtils->IsCSSPrefChecked();
}
return NS_OK;
}
nsresult
nsHTMLEditor::HasStyleOrIdOrClass(nsIDOMElement * aElement, PRBool *aHasStyleOrIdOrClass)
{
NS_ENSURE_TRUE(aElement, NS_ERROR_NULL_POINTER);
nsCOMPtr node = do_QueryInterface(aElement);