From 58abe3322627ab520f1fe27d1c6b3579e4a98f1e Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Mon, 11 Sep 2017 15:19:22 -0700 Subject: [PATCH] Bug 1216885 - Make nsISelectionPrivate not inherit from nsISelection. r=smaug nsISelectionPrivate is accessible to script, while nsISelection is not, so making the former inherit from the latter means script doesn't have a complete view of the inheritance chain so the XPIDL compiler produces an error. It turns out that nothing in script relies on this inheritance, which makes sense because I'm not sure how it would even work, so just remove it. MozReview-Commit-ID: 3Py2T7cprlD --HG-- extra : rebase_source : 89fac3ad0f7a30c1c71da79d554ebfa153d5fb33 --- dom/base/Selection.h | 5 +++-- dom/base/nsISelectionPrivate.idl | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dom/base/Selection.h b/dom/base/Selection.h index 275ec54b893b..261e164c1b46 100644 --- a/dom/base/Selection.h +++ b/dom/base/Selection.h @@ -56,8 +56,9 @@ struct RangeData namespace mozilla { namespace dom { -class Selection final : public nsISelectionPrivate, +class Selection final : public nsISelection, public nsWrapperCache, + public nsISelectionPrivate, public nsSupportsWeakReference { protected: @@ -68,7 +69,7 @@ public: explicit Selection(nsFrameSelection *aList); NS_DECL_CYCLE_COLLECTING_ISUPPORTS - NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Selection, nsISelectionPrivate) + NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Selection, nsISelection) NS_DECL_NSISELECTION NS_DECL_NSISELECTIONPRIVATE diff --git a/dom/base/nsISelectionPrivate.idl b/dom/base/nsISelectionPrivate.idl index 00cdbd7dd140..2a22f48f1cad 100644 --- a/dom/base/nsISelectionPrivate.idl +++ b/dom/base/nsISelectionPrivate.idl @@ -28,7 +28,7 @@ native nsDirection(nsDirection); native ScrollAxis(nsIPresShell::ScrollAxis); [scriptable, builtinclass, uuid(0c9f4f74-ee7e-4fe9-be6b-0ba856368178)] -interface nsISelectionPrivate : nsISelection +interface nsISelectionPrivate : nsISupports { const short ENDOFPRECEDINGLINE=0; const short STARTOFNEXTLINE=1;