Bug 1387143 part 20. Remove nsISelectionPrivate. r=mats
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 08 May 2018 13:52:38 -0400
changeset 474172 7fc2c97cc372ee868693db92409de6571af4f59f
parent 474171 a80dee62407afee16adf2b8093eb468f262cbe68
child 474173 feaacb78a655de78b106c8b1fcd6f5ad6af9c5e7
push id1757
push userffxbld-merge
push dateFri, 24 Aug 2018 17:02:43 +0000
treeherdermozilla-release@736023aebdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs1387143
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1387143 part 20. Remove nsISelectionPrivate. r=mats
accessible/html/HTMLTableAccessible.cpp
accessible/html/HTMLTableAccessible.h
dom/base/Selection.cpp
dom/base/Selection.h
dom/base/SelectionChangeListener.h
dom/base/moz.build
dom/base/nsDocumentEncoder.cpp
dom/base/nsISelectionPrivate.idl
dom/html/nsHTMLDocument.cpp
dom/html/nsTextEditorState.cpp
dom/webidl/Selection.webidl
editor/composer/nsEditingSession.cpp
layout/base/nsCaret.cpp
layout/generic/nsDirection.h
layout/generic/nsFrame.cpp
layout/printing/nsPrintJob.cpp
widget/nsBaseDragService.cpp
--- a/accessible/html/HTMLTableAccessible.cpp
+++ b/accessible/html/HTMLTableAccessible.cpp
@@ -14,17 +14,16 @@
 #include "nsTextEquivUtils.h"
 #include "Relation.h"
 #include "Role.h"
 #include "States.h"
 #include "TreeWalker.h"
 
 #include "mozilla/dom/HTMLTableElement.h"
 #include "nsIDOMRange.h"
-#include "nsISelectionPrivate.h"
 #include "nsIHTMLCollection.h"
 #include "nsIDocument.h"
 #include "nsIMutableArray.h"
 #include "nsIPersistentProperties2.h"
 #include "nsIPresShell.h"
 #include "nsITableCellLayout.h"
 #include "nsFrameSelection.h"
 #include "nsError.h"
--- a/accessible/html/HTMLTableAccessible.h
+++ b/accessible/html/HTMLTableAccessible.h
@@ -177,17 +177,17 @@ protected:
 
   // HTMLTableAccessible
 
   /**
    * Add row or column to selection.
    *
    * @param aIndex   [in] index of row or column to be selected
    * @param aTarget  [in] indicates what should be selected, either row or column
-   *                  (see nsISelectionPrivate)
+   *                  (see nsFrameSelection)
    */
   nsresult AddRowOrColumnToSelection(int32_t aIndex, TableSelection aTarget);
 
   /**
    * Removes rows or columns at the given index or outside it from selection.
    *
    * @param  aIndex    [in] row or column index
    * @param  aTarget   [in] indicates whether row or column should unselected
--- a/dom/base/Selection.cpp
+++ b/dom/base/Selection.cpp
@@ -758,17 +758,16 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSelectionListeners)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(Selection)
 
 // QueryInterface implementation for Selection
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Selection)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISelection)
-  NS_INTERFACE_MAP_ENTRY(nsISelectionPrivate)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsISelection)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_MAIN_THREAD_ONLY_CYCLE_COLLECTING_ADDREF(Selection)
 NS_IMPL_MAIN_THREAD_ONLY_CYCLE_COLLECTING_RELEASE(Selection)
 
 const RangeBoundary&
--- a/dom/base/Selection.h
+++ b/dom/base/Selection.h
@@ -9,21 +9,23 @@
 
 #include "nsIWeakReference.h"
 
 #include "mozilla/AutoRestore.h"
 #include "mozilla/RangeBoundary.h"
 #include "mozilla/TextRange.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/WeakPtr.h"
+#include "nsDirection.h"
+#include "nsIPresShell.h"  // For ScrollAxis
 #include "nsISelection.h"
 #include "nsISelectionController.h"
 #include "nsISelectionListener.h"
-#include "nsISelectionPrivate.h"
 #include "nsRange.h"
+#include "nsTArrayForwardDeclare.h"
 #include "nsThreadUtils.h"
 #include "nsWrapperCache.h"
 
 struct CachedOffsetForFrame;
 class nsAutoScrollTimer;
 class nsIContentIterator;
 class nsIDocument;
 class nsIFrame;
@@ -59,33 +61,31 @@ namespace dom {
 
 // Note, the ownership of mozilla::dom::Selection depends on which way the
 // object is created. When nsFrameSelection has created Selection,
 // addreffing/releasing the Selection object is aggregated to nsFrameSelection.
 // Otherwise normal addref/release is used.  This ensures that nsFrameSelection
 // is never deleted before its Selections.
 class Selection final : public nsISelection,
                         public nsWrapperCache,
-                        public nsISelectionPrivate,
                         public nsSupportsWeakReference,
                         public SupportsWeakPtr<Selection>
 {
 protected:
   virtual ~Selection();
 
 public:
   Selection();
   explicit Selection(nsFrameSelection *aList);
 
   MOZ_DECLARE_WEAKREFERENCE_TYPENAME(Selection)
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Selection, nsISelection)
   NS_DECL_NSISELECTION
-  NS_DECL_NSISELECTIONPRIVATE
 
   // match this up with EndbatchChanges. will stop ui updates while multiple
   // selection methods are called
   void StartBatchChanges();
 
   // match this up with StartBatchChanges
   void EndBatchChanges(int16_t aReason = nsISelectionListener::NO_REASON);
 
--- a/dom/base/SelectionChangeListener.h
+++ b/dom/base/SelectionChangeListener.h
@@ -3,17 +3,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_SelectionChangeListener_h_
 #define mozilla_SelectionChangeListener_h_
 
 #include "nsISelectionListener.h"
-#include "nsISelectionPrivate.h"
 #include "mozilla/Attributes.h"
 
 namespace mozilla {
 namespace dom {
 
 class SelectionChangeListener final : public nsISelectionListener
 {
 public:
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -24,17 +24,16 @@ XPIDL_SOURCES += [
     'nsIObjectLoadingContent.idl',
     'nsIPerformanceMetrics.idl',
     'nsIRemoteWindowContext.idl',
     'nsIScriptChannel.idl',
     'nsISelection.idl',
     'nsISelectionController.idl',
     'nsISelectionDisplay.idl',
     'nsISelectionListener.idl',
-    'nsISelectionPrivate.idl',
     'nsISlowScriptDebug.idl',
 ]
 
 XPIDL_MODULE = 'dom'
 
 EXPORTS += [
     'AutocompleteFieldList.h',
     'Crypto.h',
--- a/dom/base/nsDocumentEncoder.cpp
+++ b/dom/base/nsDocumentEncoder.cpp
@@ -23,17 +23,16 @@
 #include "nsRange.h"
 #include "nsIDOMDocument.h"
 #include "nsGkAtoms.h"
 #include "nsIContent.h"
 #include "nsIScriptContext.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsIScriptSecurityManager.h"
 #include "mozilla/dom/Selection.h"
-#include "nsISelectionPrivate.h"
 #include "nsITransferable.h" // for kUnicodeMime
 #include "nsContentUtils.h"
 #include "nsElementTable.h"
 #include "nsNodeUtils.h"
 #include "nsUnicharUtils.h"
 #include "nsReadableUtils.h"
 #include "nsTArray.h"
 #include "nsIFrame.h"
deleted file mode 100644
--- a/dom/base/nsISelectionPrivate.idl
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISelection.idl"
-
-interface nsRange;
-interface nsIDOMNode;
-interface nsISelectionListener;
-interface nsIContent;
-interface nsINode;
-interface nsIDOMRange;
-
-%{C++
-class nsIFrame;
-struct nsPoint;
-struct ScrollAxis;
-#include "nsDirection.h"
-#include "nsIPresShell.h" // TODO: Remove this include
-#include "nsTArrayForwardDeclare.h"
-#include "mozilla/EventForwards.h"
-%}
-
-[ptr] native nsIFrame(nsIFrame);
-[ptr] native RangeArray(nsTArray<nsRange*>);
-[ref] native nsPointRef(nsPoint);
-native nsDirection(nsDirection);
-native ScrollAxis(nsIPresShell::ScrollAxis);
-
-[uuid(0c9f4f74-ee7e-4fe9-be6b-0ba856368178)]
-interface nsISelectionPrivate : nsISupports
-{
-};
-
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -55,17 +55,16 @@
 #include "nsIComponentManager.h"
 #include "nsParserCIID.h"
 #include "nsNameSpaceManager.h"
 #include "nsGenericHTMLElement.h"
 #include "mozilla/css/Loader.h"
 #include "nsIHttpChannel.h"
 #include "nsIFile.h"
 #include "nsFrameSelection.h"
-#include "nsISelectionPrivate.h" //for toStringwithformat code
 
 #include "nsContentUtils.h"
 #include "nsJSUtils.h"
 #include "nsIDocumentInlines.h"
 #include "nsIDocumentEncoder.h" //for outputting selection
 #include "nsICachingChannel.h"
 #include "nsIContentViewer.h"
 #include "nsIWyciwygChannel.h"
--- a/dom/html/nsTextEditorState.cpp
+++ b/dom/html/nsTextEditorState.cpp
@@ -22,17 +22,16 @@
 #include "nsIControllerContext.h"
 #include "nsAttrValue.h"
 #include "nsAttrValueInlines.h"
 #include "nsGenericHTMLElement.h"
 #include "nsIDOMEventListener.h"
 #include "nsIEditorObserver.h"
 #include "nsIWidget.h"
 #include "nsIDocumentEncoder.h"
-#include "nsISelectionPrivate.h"
 #include "nsPIDOMWindow.h"
 #include "nsServiceManagerUtils.h"
 #include "mozilla/dom/Selection.h"
 #include "mozilla/TextEditRules.h"
 #include "mozilla/EventListenerManager.h"
 #include "nsContentUtils.h"
 #include "mozilla/Preferences.h"
 #include "nsTextNode.h"
--- a/dom/webidl/Selection.webidl
+++ b/dom/webidl/Selection.webidl
@@ -71,17 +71,17 @@ interface Selection {
 
 // Additional methods not currently in the spec
 partial interface Selection {
   [Throws]
   void modify(DOMString alter, DOMString direction,
               DOMString granularity);
 };
 
-// Additional chrome-only methods from nsISelectionPrivate
+// Additional chrome-only methods.
 interface nsISelectionListener;
 partial interface Selection {
   /**
    * A true value means "selection after newline"; false means "selection before
    * newline" when a selection is positioned "between lines".
    */
   [ChromeOnly,Throws]
   attribute boolean interlinePosition;
--- a/editor/composer/nsEditingSession.cpp
+++ b/editor/composer/nsEditingSession.cpp
@@ -32,17 +32,16 @@
 #include "nsIEditor.h"                  // for nsIEditor
 #include "nsIHTMLDocument.h"            // for nsIHTMLDocument, etc
 #include "nsIInterfaceRequestorUtils.h"  // for do_GetInterface
 #include "nsIPlaintextEditor.h"         // for nsIPlaintextEditor, etc
 #include "nsIPresShell.h"               // for nsIPresShell
 #include "nsIRefreshURI.h"              // for nsIRefreshURI
 #include "nsIRequest.h"                 // for nsIRequest
 #include "nsISelection.h"               // for nsISelection
-#include "nsISelectionPrivate.h"        // for nsISelectionPrivate
 #include "nsITimer.h"                   // for nsITimer, etc
 #include "nsITransactionManager.h"      // for nsITransactionManager
 #include "nsIWeakReference.h"           // for nsISupportsWeakReference, etc
 #include "nsIWebNavigation.h"           // for nsIWebNavigation
 #include "nsIWebProgress.h"             // for nsIWebProgress, etc
 #include "nsLiteralString.h"            // for NS_LITERAL_STRING
 #include "nsPICommandUpdater.h"         // for nsPICommandUpdater
 #include "nsPIDOMWindow.h"              // for nsPIDOMWindow
--- a/layout/base/nsCaret.cpp
+++ b/layout/base/nsCaret.cpp
@@ -14,17 +14,16 @@
 #include "mozilla/gfx/2D.h"
 #include "nsCOMPtr.h"
 #include "nsFontMetrics.h"
 #include "nsITimer.h"
 #include "nsFrameSelection.h"
 #include "nsIFrame.h"
 #include "nsIScrollableFrame.h"
 #include "nsIDOMNode.h"
-#include "nsISelectionPrivate.h"
 #include "nsIContent.h"
 #include "nsIPresShell.h"
 #include "nsLayoutUtils.h"
 #include "nsPresContext.h"
 #include "nsBlockFrame.h"
 #include "nsISelectionController.h"
 #include "nsTextFrame.h"
 #include "nsXULPopupManager.h"
--- a/layout/generic/nsDirection.h
+++ b/layout/generic/nsDirection.h
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsDirection_h___
 #define nsDirection_h___
 
 // This file makes the nsDirection enum present both in nsIFrame.h and
-// nsISelectionPrivate.h.
+// Selection.h.
 
 enum nsDirection {
   eDirNext    = 0,
   eDirPrevious= 1
 };
 
 #endif
 
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -45,17 +45,16 @@
 #include "nsIPresShell.h"
 #include "mozilla/Logging.h"
 #include "mozilla/Sprintf.h"
 #include "nsLayoutUtils.h"
 #include "LayoutLogging.h"
 #include "mozilla/RestyleManager.h"
 #include "nsInlineFrame.h"
 #include "nsIDOMNode.h"
-#include "nsISelectionPrivate.h"
 #include "nsFrameSelection.h"
 #include "nsGkAtoms.h"
 #include "nsCSSAnonBoxes.h"
 #include "nsCSSClipPathInstance.h"
 
 #include "nsFrameTraversal.h"
 #include "nsRange.h"
 #include "nsITextControlFrame.h"
--- a/layout/printing/nsPrintJob.cpp
+++ b/layout/printing/nsPrintJob.cpp
@@ -74,17 +74,16 @@ static const char kPrintingPromptService
 #include "gfxContext.h"
 #include "mozilla/gfx/DrawEventRecorder.h"
 #include "mozilla/layout/RemotePrintJobChild.h"
 #include "nsISupportsUtils.h"
 #include "nsIScriptContext.h"
 #include "nsIDOMDocument.h"
 #include "nsIDocumentObserver.h"
 #include "nsISelectionListener.h"
-#include "nsISelectionPrivate.h"
 #include "nsContentCID.h"
 #include "nsLayoutCID.h"
 #include "nsContentUtils.h"
 #include "nsIPresShell.h"
 #include "nsLayoutStylesheetCache.h"
 #include "nsLayoutUtils.h"
 #include "mozilla/Preferences.h"
 #include "Text.h"
--- a/widget/nsBaseDragService.cpp
+++ b/widget/nsBaseDragService.cpp
@@ -14,17 +14,16 @@
 #include "nsCOMPtr.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIFrame.h"
 #include "nsIDocument.h"
 #include "nsIContent.h"
 #include "nsIPresShell.h"
 #include "nsViewManager.h"
 #include "nsIDOMNode.h"
-#include "nsISelectionPrivate.h"
 #include "nsPresContext.h"
 #include "nsIImageLoadingContent.h"
 #include "imgIContainer.h"
 #include "imgIRequest.h"
 #include "ImageRegion.h"
 #include "nsQueryObject.h"
 #include "nsRegion.h"
 #include "nsXULPopupManager.h"