Bug 919326 - Minimize the #includes in layout/ IDL files; r=roc
authorEhsan Akhgari <ehsan@mozilla.com>
Sun, 22 Sep 2013 19:24:27 -0400
changeset 148244 3a21097df258672510a448368e226bb37ed23d1b
parent 148243 aee35ffedb611db15dd4c24d1791b1054629b146
child 148245 69da3bab9facb91f0e845443f90bf611b6b46a53
push id2782
push usercbook@mozilla.com
push dateMon, 23 Sep 2013 12:10:50 +0000
treeherderfx-team@d50f590056fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs919326
milestone27.0a1
Bug 919326 - Minimize the #includes in layout/ IDL files; r=roc
layout/inspector/public/inIDeepTreeWalker.idl
layout/inspector/src/inDOMView.cpp
layout/printing/nsIPrintProgress.idl
layout/xul/base/public/nsIListBoxObject.idl
layout/xul/base/public/nsIMenuBoxObject.idl
layout/xul/base/public/nsIPopupBoxObject.idl
layout/xul/base/public/nsIScrollBoxObject.idl
layout/xul/base/public/nsPIBoxObject.h
layout/xul/base/src/nsXULTooltipListener.cpp
layout/xul/tree/nsITreeBoxObject.idl
layout/xul/tree/nsITreeContentView.idl
layout/xul/tree/nsITreeView.idl
toolkit/components/autocomplete/nsAutoCompleteController.cpp
--- a/layout/inspector/public/inIDeepTreeWalker.idl
+++ b/layout/inspector/public/inIDeepTreeWalker.idl
@@ -1,13 +1,12 @@
 /* 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 "nsISupports.idl"
 #include "nsIDOMTreeWalker.idl"
 
 interface nsIDOMNode;
 
 [scriptable, uuid(91FCA0E9-99D6-406b-9D78-4C96F11E9EE4)]
 interface inIDeepTreeWalker : nsIDOMTreeWalker
 {
   attribute boolean showAnonymousContent;
--- a/layout/inspector/src/inDOMView.cpp
+++ b/layout/inspector/src/inDOMView.cpp
@@ -19,16 +19,17 @@
 #include "nsIDOMAttr.h"
 #include "nsIDOMMozNamedAttrMap.h"
 #include "nsIDOMMutationEvent.h"
 #include "nsBindingManager.h"
 #include "nsINameSpaceManager.h"
 #include "nsIDocument.h"
 #include "nsIServiceManager.h"
 #include "nsITreeColumns.h"
+#include "nsITreeBoxObject.h"
 #include "mozilla/dom/Element.h"
 
 #ifdef ACCESSIBILITY
 #include "nsIAccessible.h"
 #include "nsIAccessibilityService.h"
 #endif
 
 using namespace mozilla;
--- a/layout/printing/nsIPrintProgress.idl
+++ b/layout/printing/nsIPrintProgress.idl
@@ -1,13 +1,12 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "nsISupports.idl"
 #include "nsIWebProgressListener.idl"
 
 interface nsIDOMWindow;
 interface nsIObserver;
 interface nsIPrompt;
 
 [scriptable, uuid(594fd36d-5b1b-412f-a74e-ab72099a5bb2)]
 interface nsIPrintProgress: nsIWebProgressListener {
--- a/layout/xul/base/public/nsIListBoxObject.idl
+++ b/layout/xul/base/public/nsIListBoxObject.idl
@@ -1,14 +1,14 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "nsIBoxObject.idl"
+#include "nsISupports.idl"
 
 interface nsIDOMElement;
 
 [scriptable, uuid(AA9DEF4E-2E59-412d-A6DF-B76F52167795)]
 interface nsIListBoxObject : nsISupports
 {
   long getRowCount();
   long getNumberOfVisibleRows();
@@ -18,12 +18,14 @@ interface nsIListBoxObject : nsISupports
   void scrollToIndex(in long rowIndex);
   void scrollByLines(in long numLines);
 
   nsIDOMElement getItemAtIndex(in long index);
   long getIndexOfItem(in nsIDOMElement item);
 };
 
 %{C++
+class nsIBoxObject;
+
 nsresult
 NS_NewListBoxObject(nsIBoxObject** aResult);
 
 %}
--- a/layout/xul/base/public/nsIMenuBoxObject.idl
+++ b/layout/xul/base/public/nsIMenuBoxObject.idl
@@ -1,14 +1,14 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "nsIBoxObject.idl"
+#include "nsISupports.idl"
 
 interface nsIDOMElement;
 interface nsIDOMKeyEvent;
 
 [scriptable, uuid(689ebf3d-0184-450a-9bfa-5a26be0e7a8c)]
 interface nsIMenuBoxObject : nsISupports
 {
   void openMenu(in boolean openFlag);
@@ -17,12 +17,14 @@ interface nsIMenuBoxObject : nsISupports
 
   boolean handleKeyPress(in nsIDOMKeyEvent keyEvent);
 
   // true if the menu or menubar was opened via a keypress.
   readonly attribute boolean openedWithKey;
 };
 
 %{C++
+class nsIBoxObject;
+
 nsresult
 NS_NewMenuBoxObject(nsIBoxObject** aResult);
 
 %}
--- a/layout/xul/base/public/nsIPopupBoxObject.idl
+++ b/layout/xul/base/public/nsIPopupBoxObject.idl
@@ -1,14 +1,14 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "nsIBoxObject.idl"
+#include "nsISupports.idl"
 
 interface nsIDOMElement;
 interface nsIDOMNode;
 interface nsIDOMEvent;
 interface nsIDOMClientRect;
 
 [scriptable, uuid(b1192cac-467b-42ca-88d6-fcdec5bb4ef7)]
 interface nsIPopupBoxObject : nsISupports
@@ -170,12 +170,14 @@ interface nsIPopupBoxObject : nsISupport
   /** Returns the alignment position where the popup has appeared relative to its
    *  anchor node or point, accounting for any flipping that occurred.
    */
   readonly attribute AString alignmentPosition;
   readonly attribute long alignmentOffset;
 };
 
 %{C++
+class nsIBoxObject;
+
 nsresult
 NS_NewPopupBoxObject(nsIBoxObject** aResult);
 
 %}
--- a/layout/xul/base/public/nsIScrollBoxObject.idl
+++ b/layout/xul/base/public/nsIScrollBoxObject.idl
@@ -1,14 +1,14 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "nsIBoxObject.idl"
+#include "nsISupports.idl"
 
 interface nsIDOMElement;
 
 
 [scriptable, uuid(56E2ADA8-4631-11d4-BA11-001083023C1E)]
 interface nsIScrollBoxObject : nsISupports
 {
   /**
@@ -39,12 +39,14 @@ interface nsIScrollBoxObject : nsISuppor
 
   void getScrolledSize(out long width, out long height);
   void ensureElementIsVisible(in nsIDOMElement child);
   void ensureIndexIsVisible(in long index);
   void ensureLineIsVisible(in long line);
 };
 
 %{C++
+class nsIBoxObject;
+
 nsresult
 NS_NewScrollBoxObject(nsIBoxObject** aResult);
 
 %}
--- a/layout/xul/base/public/nsPIBoxObject.h
+++ b/layout/xul/base/public/nsPIBoxObject.h
@@ -1,16 +1,18 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 nsPIBoxObject_h___
 #define nsPIBoxObject_h___
 
+#include "nsIBoxObject.h"
+
 // {2b8bb262-1b0f-4572-ba87-5d4ae4954445}
 #define NS_PIBOXOBJECT_IID \
 { 0x2b8bb262, 0x1b0f, 0x4572, \
   { 0xba, 0x87, 0x5d, 0x4a, 0xe4, 0x95, 0x44, 0x45 } }
 
 
 class nsIContent;
 
--- a/layout/xul/base/src/nsXULTooltipListener.cpp
+++ b/layout/xul/base/src/nsXULTooltipListener.cpp
@@ -21,16 +21,17 @@
 #endif
 #include "nsGUIEvent.h"
 #include "nsIScriptContext.h"
 #include "nsPIDOMWindow.h"
 #ifdef MOZ_XUL
 #include "nsXULPopupManager.h"
 #endif
 #include "nsIRootBox.h"
+#include "nsIBoxObject.h"
 #include "nsEventDispatcher.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/LookAndFeel.h"
 #include "mozilla/dom/Element.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
--- a/layout/xul/tree/nsITreeBoxObject.idl
+++ b/layout/xul/tree/nsITreeBoxObject.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "nsISupports.idl"
-#include "domstubs.idl"
 
+interface nsIDOMElement;
 interface nsITreeView;
 interface nsITreeSelection;
 interface nsITreeColumn;
 interface nsITreeColumns;
 interface nsIScriptableRegion;
 
 [scriptable, uuid(64BA5199-C4F4-4498-BBDC-F8E4C369086C)]
 interface nsITreeBoxObject : nsISupports
--- a/layout/xul/tree/nsITreeContentView.idl
+++ b/layout/xul/tree/nsITreeContentView.idl
@@ -1,15 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "nsISupports.idl"
-#include "nsIDOMElement.idl"
+
+interface nsIDOMElement;
 
 [scriptable, uuid(5ef62896-0c0a-41f1-bb3c-44a60f5dfdab)]
 interface nsITreeContentView : nsISupports
 {
   /**
    * Retrieve the content item associated with the specified index.
    */
   nsIDOMElement getItemAtIndex(in long index);
--- a/layout/xul/tree/nsITreeView.idl
+++ b/layout/xul/tree/nsITreeView.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "nsITreeBoxObject.idl"
-#include "domstubs.idl"
+#include "nsISupports.idl"
 
+interface nsITreeBoxObject;
 interface nsITreeSelection;
 interface nsITreeColumn;
 interface nsIDOMDataTransfer;
 
 [scriptable, uuid(091116f0-0bdc-4b32-b9c8-c8d5a37cb088)]
 interface nsITreeView : nsISupports
 {
   /**
--- a/toolkit/components/autocomplete/nsAutoCompleteController.cpp
+++ b/toolkit/components/autocomplete/nsAutoCompleteController.cpp
@@ -9,16 +9,17 @@
 #include "nsAutoPtr.h"
 #include "nsNetCID.h"
 #include "nsIIOService.h"
 #include "nsToolkitCompsCID.h"
 #include "nsIServiceManager.h"
 #include "nsIAtomService.h"
 #include "nsReadableUtils.h"
 #include "nsUnicharUtils.h"
+#include "nsITreeBoxObject.h"
 #include "nsITreeColumns.h"
 #include "nsIObserverService.h"
 #include "nsIDOMKeyEvent.h"
 #include "mozilla/Services.h"
 #include "mozilla/ModuleUtils.h"
 
 static const char *kAutoCompleteSearchCID = "@mozilla.org/autocomplete/search;1?name=";