Bug 1413217 - Fix some includes etc. in widget code. r=jimm
authorJonathan Watt <jwatt@jwatt.org>
Thu, 12 Oct 2017 17:03:35 +0100
changeset 441530 ff72063115f7dfed4f6b79dafc4575e929f51f51
parent 441529 dc16f72054aaabfa0dba46155bf1524b19fffe6f
child 441531 2a8ce3becbc5a29a629c5a798e71baf3fc7e0f0a
push id8130
push userryanvm@gmail.com
push dateThu, 09 Nov 2017 00:28:20 +0000
treeherdermozilla-beta@a49a6fa54363 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1413217
milestone58.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 1413217 - Fix some includes etc. in widget code. r=jimm MozReview-Commit-ID: 8bW6WIPMun4
docshell/base/nsIDocShell.idl
widget/InProcessCompositorWidget.cpp
widget/InputData.cpp
widget/ScreenManager.cpp
widget/nsAutoRollup.h
widget/nsBaseAppShell.cpp
widget/nsBaseClipboard.h
widget/nsDragServiceProxy.cpp
--- a/docshell/base/nsIDocShell.idl
+++ b/docshell/base/nsIDocShell.idl
@@ -8,16 +8,17 @@
 #include "nsIDocShellTreeItem.idl"
 #include "nsIRequest.idl"
 
 %{ C++
 #include "js/TypeDecls.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/NotNull.h"
 #include "nsCOMPtr.h"
+#include "nsIURI.h"
 class nsPresContext;
 class nsIPresShell;
 namespace mozilla {
 class Encoding;
 class HTMLEditor;
 }
 %}
 
--- a/widget/InProcessCompositorWidget.cpp
+++ b/widget/InProcessCompositorWidget.cpp
@@ -1,13 +1,15 @@
 /* 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 "InProcessCompositorWidget.h"
+
+#include "mozilla/VsyncDispatcher.h"
 #include "nsBaseWidget.h"
 
 #if defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING)
 #include "mozilla/widget/AndroidCompositorWidget.h"
 #endif
 
 namespace mozilla {
 namespace widget {
--- a/widget/InputData.cpp
+++ b/widget/InputData.cpp
@@ -1,16 +1,17 @@
 /* -*- 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 "InputData.h"
 
 #include "mozilla/dom/Touch.h"
+#include "mozilla/TextEvents.h"
 #include "nsContentUtils.h"
 #include "nsDebug.h"
 #include "nsThreadUtils.h"
 #include "mozilla/MouseEvents.h"
 #include "mozilla/TouchEvents.h"
 #include "UnitTransforms.h"
 
 namespace mozilla {
--- a/widget/ScreenManager.cpp
+++ b/widget/ScreenManager.cpp
@@ -3,26 +3,27 @@
 /* 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 "ScreenManager.h"
 
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/dom/ContentParent.h"
+#include "mozilla/dom/DOMTypes.h"
 #include "mozilla/Logging.h"
 #include "mozilla/StaticPtr.h"
 
-static LazyLogModule sScreenLog("WidgetScreen");
-
-NS_IMPL_ISUPPORTS(ScreenManager, nsIScreenManager)
+static mozilla::LazyLogModule sScreenLog("WidgetScreen");
 
 namespace mozilla {
 namespace widget {
 
+NS_IMPL_ISUPPORTS(ScreenManager, nsIScreenManager)
+
 ScreenManager::ScreenManager()
 {
 }
 
 ScreenManager::~ScreenManager()
 {
 }
 
@@ -73,31 +74,31 @@ ScreenManager::Refresh(nsTArray<mozilla:
 
   CopyScreensToAllRemotesIfIsParent();
 }
 
 template<class Range>
 void
 ScreenManager::CopyScreensToRemoteRange(Range aRemoteRange)
 {
-  AutoTArray<ScreenDetails, 4> screens;
+  AutoTArray<dom::ScreenDetails, 4> screens;
   for (auto& screen : mScreenList) {
     screens.AppendElement(screen->ToScreenDetails());
   }
   for (auto cp : aRemoteRange) {
     MOZ_LOG(sScreenLog, LogLevel::Debug, ("Send screens to [Pid %d]", cp->Pid()));
     if (!cp->SendRefreshScreens(screens)) {
       MOZ_LOG(sScreenLog, LogLevel::Error,
               ("SendRefreshScreens to [Pid %d] failed", cp->Pid()));
     }
   }
 }
 
 void
-ScreenManager::CopyScreensToRemote(ContentParent* aContentParent)
+ScreenManager::CopyScreensToRemote(dom::ContentParent* aContentParent)
 {
   MOZ_ASSERT(aContentParent);
   MOZ_ASSERT(XRE_IsParentProcess());
 
   auto range = { aContentParent };
   CopyScreensToRemoteRange(range);
 }
 
@@ -105,17 +106,17 @@ void
 ScreenManager::CopyScreensToAllRemotesIfIsParent()
 {
   if (XRE_IsContentProcess()) {
     return;
   }
 
   MOZ_LOG(sScreenLog, LogLevel::Debug, ("Refreshing all ContentParents"));
 
-  CopyScreensToRemoteRange(ContentParent::AllProcesses(ContentParent::eLive));
+  CopyScreensToRemoteRange(dom::ContentParent::AllProcesses(dom::ContentParent::eLive));
 }
 
 // Returns the screen that contains the rectangle. If the rect overlaps
 // multiple screens, it picks the screen with the greatest area of intersection.
 //
 // The coordinates are in desktop pixels.
 //
 NS_IMETHODIMP
--- a/widget/nsAutoRollup.h
+++ b/widget/nsAutoRollup.h
@@ -2,18 +2,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 nsAutoRollup_h__
 #define nsAutoRollup_h__
 
 #include "mozilla/Attributes.h"     // for MOZ_RAII
 #include "mozilla/StaticPtr.h"      // for StaticRefPtr
-
-class nsIContent;
+#include "nsIContent.h"
 
 namespace mozilla {
 namespace widget {
 
 // A situation can occur when a mouse event occurs over a menu label while the
 // menu popup is already open. The expected behaviour is to close the popup.
 // This happens by calling nsIRollupListener::Rollup before the mouse event is
 // processed. However, in cases where the mouse event is not consumed, this
--- a/widget/nsBaseAppShell.cpp
+++ b/widget/nsBaseAppShell.cpp
@@ -8,16 +8,17 @@
 #include "nsBaseAppShell.h"
 #if defined(MOZ_CRASHREPORTER)
 #include "nsExceptionHandler.h"
 #endif
 #include "nsThreadUtils.h"
 #include "nsIObserverService.h"
 #include "nsServiceManagerUtils.h"
 #include "mozilla/Services.h"
+#include "nsXULAppAPI.h"
 
 // When processing the next thread event, the appshell may process native
 // events (if not in performance mode), which can result in suppressing the
 // next thread event for at most this many ticks:
 #define THREAD_EVENT_STARVATION_LIMIT PR_MillisecondsToInterval(10)
 
 NS_IMPL_ISUPPORTS(nsBaseAppShell, nsIAppShell, nsIThreadObserver, nsIObserver)
 
--- a/widget/nsBaseClipboard.h
+++ b/widget/nsBaseClipboard.h
@@ -3,16 +3,17 @@
  * 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 nsBaseClipboard_h__
 #define nsBaseClipboard_h__
 
 #include "nsIClipboard.h"
 #include "nsITransferable.h"
+#include "nsCOMPtr.h"
 
 class nsITransferable;
 class nsIClipboardOwner;
 class nsIWidget;
 
 /**
  * Native Win32 BaseClipboard wrapper
  */
--- a/widget/nsDragServiceProxy.cpp
+++ b/widget/nsDragServiceProxy.cpp
@@ -11,16 +11,18 @@
 #include "mozilla/gfx/2D.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/Unused.h"
 #include "nsContentUtils.h"
 
 using mozilla::ipc::Shmem;
 using mozilla::dom::TabChild;
 using mozilla::dom::OptionalShmem;
+using mozilla::LayoutDeviceIntRect;
+using mozilla::Maybe;
 
 NS_IMPL_ISUPPORTS_INHERITED0(nsDragServiceProxy, nsBaseDragService)
 
 nsDragServiceProxy::nsDragServiceProxy()
 {
 }
 
 nsDragServiceProxy::~nsDragServiceProxy()