Bug 617539 - Remove branch interfaces, nsIHTMLEditor_MOZILLA_2_0_BRANCH, straight backout of revision e9d979b4b4a0, r=ehsan
authorBenjamin Smedberg <benjamin@smedbergs.us>
Fri, 25 Mar 2011 11:03:33 -0400
changeset 63881 4751ff283ab434d7d6fbc9bb1d42fc39c04c50a3
parent 63880 66b1dae86e99e332ad80dfea0944a650b3ac6617
child 63882 ee51cd5448826d4fa2c0781c4aad974dbd9e6439
push idunknown
push userunknown
push dateunknown
reviewersehsan
bugs617539
milestone2.2a1pre
Bug 617539 - Remove branch interfaces, nsIHTMLEditor_MOZILLA_2_0_BRANCH, straight backout of revision e9d979b4b4a0, r=ehsan
content/base/src/nsHTMLContentSerializer.cpp
editor/idl/Makefile.in
editor/idl/nsIHTMLEditor.idl
editor/idl/nsIHTMLEditor_MOZILLA_2_0_BRANCH.idl
editor/libeditor/html/nsHTMLEditor.cpp
editor/libeditor/html/nsHTMLEditor.h
--- a/content/base/src/nsHTMLContentSerializer.cpp
+++ b/content/base/src/nsHTMLContentSerializer.cpp
@@ -66,17 +66,17 @@
 #include "nsIParserService.h"
 #include "nsContentUtils.h"
 #include "nsLWBrkCIID.h"
 #include "nsIScriptElement.h"
 #include "nsAttrName.h"
 #include "nsIDocShell.h"
 #include "nsIEditorDocShell.h"
 #include "nsIEditor.h"
-#include "nsIHTMLEditor_MOZILLA_2_0_BRANCH.h"
+#include "nsIHTMLEditor.h"
 
 static const PRInt32 kLongLineLen = 128;
 
 nsresult NS_NewHTMLContentSerializer(nsIContentSerializer** aSerializer)
 {
   nsHTMLContentSerializer* it = new nsHTMLContentSerializer();
   if (!it) {
     return NS_ERROR_OUT_OF_MEMORY;
@@ -100,17 +100,17 @@ IsInvisibleBreak(nsIContent *aNode, nsIA
     nsPIDOMWindow *window = doc->GetWindow();
     if (window) {
       nsIDocShell *docShell = window->GetDocShell();
       if (docShell) {
         nsCOMPtr<nsIEditorDocShell> editorDocShell = do_QueryInterface(docShell);
         if (editorDocShell) {
           nsCOMPtr<nsIEditor> editor;
           editorDocShell->GetEditor(getter_AddRefs(editor));
-          nsCOMPtr<nsIHTMLEditor_MOZILLA_2_0_BRANCH> htmlEditor = do_QueryInterface(editor);
+          nsCOMPtr<nsIHTMLEditor> htmlEditor = do_QueryInterface(editor);
           if (htmlEditor) {
             PRBool isVisible = PR_FALSE;
             nsCOMPtr<nsIDOMNode> domNode = do_QueryInterface(aNode);
             htmlEditor->BreakIsVisible(domNode, &isVisible);
             return !isVisible;
           }
         }
       }
--- a/editor/idl/Makefile.in
+++ b/editor/idl/Makefile.in
@@ -52,17 +52,16 @@ XPIDLSRCS	= \
 		nsIEditor.idl \
 		nsIEditorIMESupport.idl \
 		nsIEditorLogging.idl \
 		nsIEditorMailSupport.idl \
 		nsIEditorObserver.idl \
 		nsIEditorSpellCheck.idl \
 		nsIEditorStyleSheets.idl \
 		nsIHTMLEditor.idl \
-		nsIHTMLEditor_MOZILLA_2_0_BRANCH.idl \
 		nsIHTMLObjectResizer.idl \
 		nsIHTMLAbsPosEditor.idl \
 		nsIHTMLObjectResizeListener.idl \
 		nsIHTMLInlineTableEditor.idl \
 		nsIPlaintextEditor.idl \
 		nsITableEditor.idl \
 		nsIURIRefObject.idl \
 		nsIContentFilter.idl \
--- a/editor/idl/nsIHTMLEditor.idl
+++ b/editor/idl/nsIHTMLEditor.idl
@@ -46,17 +46,17 @@ interface nsISupportsArray;
 interface nsISelection;
 interface nsIContentFilter;
 
 %{C++
 #define NS_EDITOR_ELEMENT_NOT_FOUND \
   NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_EDITOR, 1)
 
 %}
-[scriptable, uuid(afc36593-5787-4420-93d9-b2c0ccbf0cad)]
+[scriptable, uuid(c964b8b0-e9e8-11df-9492-0800200c9a66)]
 
 interface nsIHTMLEditor : nsISupports
 {
 %{C++
   typedef short EAlignment;
 %}
 
   // used by GetAlignment()
@@ -603,10 +603,15 @@ interface nsIHTMLEditor : nsISupports
 
   /**
    * A boolean indicating if a return key pressed in a paragraph creates
    * another paragraph or just inserts a <br> at the caret
    *
    * @return    true if CR in a paragraph creates a new paragraph
    */
   attribute boolean returnInParagraphCreatesNewParagraph;
+
+  /**
+   * Checks whether a BR node is visible to the user.
+   */
+  boolean breakIsVisible(in nsIDOMNode aNode);
 };
 
deleted file mode 100644
--- a/editor/idl/nsIHTMLEditor_MOZILLA_2_0_BRANCH.idl
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Editor code.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsISupports.idl"
-
-interface nsIDOMNode;
-
-[scriptable, uuid(278714d1-2072-440a-bb0f-6522d98d280a)]
-
-interface nsIHTMLEditor_MOZILLA_2_0_BRANCH : nsISupports
-{
-  /**
-   * Checks whether a BR node is visible to the user.
-   */
-  boolean breakIsVisible(in nsIDOMNode aNode);
-};
-
--- a/editor/libeditor/html/nsHTMLEditor.cpp
+++ b/editor/libeditor/html/nsHTMLEditor.cpp
@@ -252,17 +252,16 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mAddRowAfterButton)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_ADDREF_INHERITED(nsHTMLEditor, nsEditor)
 NS_IMPL_RELEASE_INHERITED(nsHTMLEditor, nsEditor)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsHTMLEditor)
   NS_INTERFACE_MAP_ENTRY(nsIHTMLEditor)
-  NS_INTERFACE_MAP_ENTRY(nsIHTMLEditor_MOZILLA_2_0_BRANCH)
   NS_INTERFACE_MAP_ENTRY(nsIHTMLObjectResizer)
   NS_INTERFACE_MAP_ENTRY(nsIHTMLAbsPosEditor)
   NS_INTERFACE_MAP_ENTRY(nsIHTMLInlineTableEditor)
   NS_INTERFACE_MAP_ENTRY(nsITableEditor)
   NS_INTERFACE_MAP_ENTRY(nsIEditorStyleSheets)
   NS_INTERFACE_MAP_ENTRY(nsICSSLoaderObserver)
   NS_INTERFACE_MAP_ENTRY(nsIMutationObserver)
 NS_INTERFACE_MAP_END_INHERITING(nsPlaintextEditor)
--- a/editor/libeditor/html/nsHTMLEditor.h
+++ b/editor/libeditor/html/nsHTMLEditor.h
@@ -40,17 +40,16 @@
 #ifndef nsHTMLEditor_h__
 #define nsHTMLEditor_h__
 
 #include "nsCOMPtr.h"
 #include "nsCOMArray.h"
 #include "nsPlaintextEditor.h"
 #include "nsIEditor.h"
 #include "nsIHTMLEditor.h"
-#include "nsIHTMLEditor_MOZILLA_2_0_BRANCH.h"
 #include "nsITableEditor.h"
 #include "nsIEditorMailSupport.h"
 #include "nsIEditorStyleSheets.h"
 #include "nsITextServicesDocument.h"
 
 #include "nsEditor.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMEventListener.h"
@@ -86,17 +85,16 @@ class nsILinkHandler;
 struct PropItem;
 
 /**
  * The HTML editor implementation.<br>
  * Use to edit HTML document represented as a DOM tree. 
  */
 class nsHTMLEditor : public nsPlaintextEditor,
                      public nsIHTMLEditor,
-                     public nsIHTMLEditor_MOZILLA_2_0_BRANCH,
                      public nsIHTMLObjectResizer,
                      public nsIHTMLAbsPosEditor,
                      public nsITableEditor,
                      public nsIHTMLInlineTableEditor,
                      public nsIEditorStyleSheets,
                      public nsICSSLoaderObserver,
                      public nsStubMutationObserver
 {
@@ -164,20 +162,16 @@ public:
 
   /* ------------ nsIEditorIMESupport overrides ------------ */
   NS_IMETHOD GetPreferredIMEState(PRUint32 *aState);
 
   /* ------------ nsIHTMLEditor methods -------------- */
 
   NS_DECL_NSIHTMLEDITOR
 
-  /* ------------ nsIHTMLEditor_MOZILLA_2_0_BRANCH methods -------------- */
-
-  NS_DECL_NSIHTMLEDITOR_MOZILLA_2_0_BRANCH
-
   /* ------------ nsIHTMLObjectResizer methods -------------- */
   /* -------- Implemented in nsHTMLObjectResizer.cpp -------- */
   NS_DECL_NSIHTMLOBJECTRESIZER
 
   /* ------------ nsIHTMLAbsPosEditor methods -------------- */
   /* -------- Implemented in nsHTMLAbsPosition.cpp --------- */
   NS_DECL_NSIHTMLABSPOSEDITOR