Bug 1399787 - Part 1. Fix namespacing and include issues hidden by unified compilation. r=jwatt
authorcku <cku@mozilla.com>
Fri, 06 Oct 2017 22:01:22 +0800
changeset 396002 b6b78f4aa40fc67b891fef7c6fb995e3e380379f
parent 396001 6d431fb67f3a76e20da22d11782d7fc9a65b1a75
child 396003 f0df14d5edab03bf2f00b0ffe401713f85f5f100
push id33067
push usertoros@mozilla.com
push dateMon, 11 Dec 2017 09:54:39 +0000
treeherdermozilla-central@6d926a50dcf5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1399787
milestone59.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 1399787 - Part 1. Fix namespacing and include issues hidden by unified compilation. r=jwatt We will create several new files in the following patches for IPC and a new subprocess. Several already existed files will be shifted into new build units, we will meet several compile errors because of it. This patch fixes those compile error in advance. MozReview-Commit-ID: 5hd0sNYfBu0
gfx/thebes/gfxFontSrcPrincipal.cpp
widget/nsBaseClipboard.h
widget/windows/InkCollector.h
widget/windows/ScreenHelperWin.cpp
widget/windows/nsColorPicker.cpp
widget/windows/nsDataObj.cpp
widget/windows/nsDeviceContextSpecWin.cpp
widget/windows/nsSound.cpp
widget/windows/nsWindow.cpp
--- a/gfx/thebes/gfxFontSrcPrincipal.cpp
+++ b/gfx/thebes/gfxFontSrcPrincipal.cpp
@@ -2,16 +2,19 @@
  * 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 "gfxFontSrcPrincipal.h"
 
 #include "nsProxyRelease.h"
 #include "nsURIHashKey.h"
+#include "mozilla/BasePrincipal.h"
+
+using mozilla::BasePrincipal;
 
 gfxFontSrcPrincipal::gfxFontSrcPrincipal(nsIPrincipal* aPrincipal)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aPrincipal);
 
   mPrincipal = aPrincipal;
 
--- a/widget/nsBaseClipboard.h
+++ b/widget/nsBaseClipboard.h
@@ -35,13 +35,12 @@ protected:
 
   NS_IMETHOD SetNativeClipboardData ( int32_t aWhichClipboard ) = 0;
   NS_IMETHOD GetNativeClipboardData ( nsITransferable * aTransferable, int32_t aWhichClipboard ) = 0;
 
   bool                mEmptyingForSetData;
   bool                mIgnoreEmptyNotification;
   nsCOMPtr<nsIClipboardOwner> mClipboardOwner;
   nsCOMPtr<nsITransferable>   mTransferable;
-
 };
 
 #endif // nsBaseClipboard_h__
 
--- a/widget/windows/InkCollector.h
+++ b/widget/windows/InkCollector.h
@@ -59,17 +59,17 @@ public:
   HWND GetTarget();
   void SetTarget(HWND aTargetWindow);
   void ClearTarget();
 
   uint16_t GetPointerId(); // 0 shows that there is no existing pen.
   void SetPointerId(uint16_t aPointerId);
   void ClearPointerId();
 
-  static StaticAutoPtr<InkCollector> sInkCollector;
+  static mozilla::StaticAutoPtr<InkCollector> sInkCollector;
 
 protected:
   void Initialize();
   void OnInitialize();
   void Enable(bool aNewState);
 
 private:
   RefPtr<IUnknown>          mMarshaller;
--- a/widget/windows/ScreenHelperWin.cpp
+++ b/widget/windows/ScreenHelperWin.cpp
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ScreenHelperWin.h"
 
 #include "mozilla/Logging.h"
 #include "nsTArray.h"
 #include "WinUtils.h"
 
-static LazyLogModule sScreenLog("WidgetScreen");
+static mozilla::LazyLogModule sScreenLog("WidgetScreen");
 
 namespace mozilla {
 namespace widget {
 
 BOOL CALLBACK
 CollectMonitors(HMONITOR aMon, HDC hDCScreen, LPRECT, LPARAM ioParam)
 {
   auto screens = reinterpret_cast<nsTArray<RefPtr<Screen>>*>(ioParam);
--- a/widget/windows/nsColorPicker.cpp
+++ b/widget/windows/nsColorPicker.cpp
@@ -7,16 +7,17 @@
 #include "nsColorPicker.h"
 
 #include <shlwapi.h>
 
 #include "mozilla/AutoRestore.h"
 #include "nsIWidget.h"
 #include "nsString.h"
 #include "WidgetUtils.h"
+#include "nsPIDOMWindow.h"
 
 using namespace mozilla::widget;
 
 namespace
 {
 // Manages NS_NATIVE_TMP_WINDOW child windows. NS_NATIVE_TMP_WINDOWs are
 // temporary child windows of mParentWidget created to address RTL issues
 // in picker dialogs. We are responsible for destroying these.
--- a/widget/windows/nsDataObj.cpp
+++ b/widget/windows/nsDataObj.cpp
@@ -29,16 +29,17 @@
 #include "nscore.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsITimer.h"
 #include "nsThreadUtils.h"
 #include "mozilla/Preferences.h"
 #include "nsIContentPolicy.h"
 #include "nsContentUtils.h"
 #include "nsIPrincipal.h"
+#include "nsNativeCharsetUtils.h"
 
 #include "WinUtils.h"
 #include "mozilla/LazyIdleThread.h"
 #include <algorithm>
 
 
 using namespace mozilla;
 using namespace mozilla::widget;
--- a/widget/windows/nsDeviceContextSpecWin.cpp
+++ b/widget/windows/nsDeviceContextSpecWin.cpp
@@ -33,16 +33,19 @@
 #include "nsWindowsHelpers.h"
 
 #include "mozilla/gfx/Logging.h"
 
 #ifdef MOZ_ENABLE_SKIA_PDF
 #include "mozilla/gfx/PrintTargetSkPDF.h"
 #include "nsIUUIDGenerator.h"
 #include "mozilla/widget/PDFViaEMFPrintHelper.h"
+#include "nsDirectoryServiceDefs.h"
+#include "nsPrintfCString.h"
+#include "nsThreadUtils.h"
 #endif
 
 static mozilla::LazyLogModule kWidgetPrintingLogMod("printing-widget");
 #define PR_PL(_p1)  MOZ_LOG(kWidgetPrintingLogMod, mozilla::LogLevel::Debug, _p1)
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 
--- a/widget/windows/nsSound.cpp
+++ b/widget/windows/nsSound.cpp
@@ -23,16 +23,17 @@
 #include "nsIObserverService.h"
 
 #include "mozilla/Logging.h"
 #include "prtime.h"
 
 #include "nsNativeCharsetUtils.h"
 #include "nsThreadUtils.h"
 #include "mozilla/ClearOnShutdown.h"
+#include "gfxPlatform.h"
 
 using mozilla::LogLevel;
 
 static mozilla::LazyLogModule gWin32SoundLog("nsSound");
 
 class nsSoundPlayer: public mozilla::Runnable {
 public:
   explicit nsSoundPlayer(const nsAString& aSoundName)
@@ -87,17 +88,17 @@ nsSoundPlayer::~nsSoundPlayer()
 
 mozilla::StaticRefPtr<nsISound> nsSound::sInstance;
 
 /* static */ already_AddRefed<nsISound>
 nsSound::GetInstance()
 {
   if (!sInstance) {
     if (gfxPlatform::IsHeadless()) {
-      sInstance = new widget::HeadlessSound();
+      sInstance = new mozilla::widget::HeadlessSound();
     } else {
       RefPtr<nsSound> sound = new nsSound();
       nsresult rv = sound->CreatePlayerThread();
       if(NS_WARN_IF(NS_FAILED(rv))) {
         return nullptr;
       }
       sInstance = sound.forget();
     }
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -206,16 +206,17 @@
 #include "mozilla/layers/APZCTreeManager.h"
 #include "mozilla/layers/InputAPZContext.h"
 #include "mozilla/layers/KnowsCompositor.h"
 #include "mozilla/layers/ScrollInputMethods.h"
 #include "InputData.h"
 
 #include "mozilla/Telemetry.h"
 #include "mozilla/plugins/PluginProcessParent.h"
+#include "mozilla/webrender/WebRenderAPI.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
 using namespace mozilla::layers;
 using namespace mozilla::widget;
 using namespace mozilla::plugins;