diff options
103 files changed, 231 insertions, 418 deletions
diff --git a/dom/canvas/WebGLExtensions.h b/dom/canvas/WebGLExtensions.h index 7b6b6b54b..595d1c948 100644 --- a/dom/canvas/WebGLExtensions.h +++ b/dom/canvas/WebGLExtensions.h @@ -8,7 +8,7 @@ #include "mozilla/AlreadyAddRefed.h" #include "nsWrapperCache.h" -#include "WebGLObjectModel.h" +#include "WebGLContext.h" #include "WebGLTypes.h" namespace mozilla { diff --git a/dom/canvas/WebGLFramebuffer.h b/dom/canvas/WebGLFramebuffer.h index ac457c098..53e01dfe7 100644 --- a/dom/canvas/WebGLFramebuffer.h +++ b/dom/canvas/WebGLFramebuffer.h @@ -12,7 +12,7 @@ #include "mozilla/WeakPtr.h" #include "nsWrapperCache.h" -#include "WebGLObjectModel.h" +#include "WebGLContext.h" #include "WebGLRenderbuffer.h" #include "WebGLStrongTypes.h" #include "WebGLTexture.h" diff --git a/dom/canvas/WebGLVertexAttribData.cpp b/dom/canvas/WebGLVertexAttribData.cpp index b5aee18e5..cea78eb14 100644 --- a/dom/canvas/WebGLVertexAttribData.cpp +++ b/dom/canvas/WebGLVertexAttribData.cpp @@ -7,6 +7,7 @@ #include "GLContext.h" #include "WebGLBuffer.h" +#include "WebGLContext.h" namespace mozilla { diff --git a/dom/crypto/WebCryptoThreadPool.cpp b/dom/crypto/WebCryptoThreadPool.cpp index 000e42d42..a2b8e6239 100644 --- a/dom/crypto/WebCryptoThreadPool.cpp +++ b/dom/crypto/WebCryptoThreadPool.cpp @@ -9,6 +9,7 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "nsComponentManagerUtils.h" +#include "nsContentUtils.h" #include "nsNSSComponent.h" #include "nsString.h" #include "nsXPCOMCIDInternal.h" diff --git a/dom/events/Event.cpp b/dom/events/Event.cpp index aff65b40f..2f8800fb4 100755 --- a/dom/events/Event.cpp +++ b/dom/events/Event.cpp @@ -45,9 +45,6 @@ extern bool IsCurrentThreadRunningChromeWorker(); static char *sPopupAllowedEvents; -static bool sReturnHighResTimeStamp = false; -static bool sReturnHighResTimeStampIsSet = false; - Event::Event(EventTarget* aOwner, nsPresContext* aPresContext, WidgetEvent* aEvent) @@ -68,13 +65,6 @@ Event::ConstructorInit(EventTarget* aOwner, SetOwner(aOwner); mIsMainThreadEvent = NS_IsMainThread(); - if (mIsMainThreadEvent && !sReturnHighResTimeStampIsSet) { - Preferences::AddBoolVarCache(&sReturnHighResTimeStamp, - "dom.event.highrestimestamp.enabled", - sReturnHighResTimeStamp); - sReturnHighResTimeStampIsSet = true; - } - mPrivateDataDuplicated = false; mWantsPopupControlCheck = false; @@ -1093,10 +1083,6 @@ Event::TimeStamp() const double Event::TimeStampImpl() const { - if (!sReturnHighResTimeStamp) { - return static_cast<double>(mEvent->mTime); - } - if (mEvent->mTimeStamp.IsNull()) { return 0.0; } diff --git a/dom/events/test/test_eventTimeStamp.html b/dom/events/test/test_eventTimeStamp.html index 056203e92..5ca5cd47d 100644 --- a/dom/events/test/test_eventTimeStamp.html +++ b/dom/events/test/test_eventTimeStamp.html @@ -35,12 +35,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=77992 SimpleTest.waitForExplicitFinish(); SimpleTest.requestFlakyTimeout("untriaged"); -// We don't use SpecialPowers.pushPrefEnv since it can delay the test -// function until after the load event has fired which means we can't -// test the timestamp of the load event. -const kPrefName = "dom.event.highrestimestamp.enabled"; -var prevPrefValue = SpecialPowers.getBoolPref(kPrefName); -SpecialPowers.setBoolPref(kPrefName, true); testRegularEvents(); // Event.timeStamp should be relative to the time origin which is: diff --git a/dom/gamepad/cocoa/CocoaGamepad.cpp b/dom/gamepad/cocoa/CocoaGamepad.cpp index 24786f5ef..7fcf48532 100644 --- a/dom/gamepad/cocoa/CocoaGamepad.cpp +++ b/dom/gamepad/cocoa/CocoaGamepad.cpp @@ -10,6 +10,7 @@ #include "mozilla/dom/Gamepad.h" #include "mozilla/dom/GamepadPlatformService.h" #include "mozilla/ArrayUtils.h" +#include "mozilla/Unused.h" #include "nsThreadUtils.h" #include <CoreFoundation/CoreFoundation.h> #include <IOKit/hid/IOHIDBase.h> diff --git a/dom/media/platforms/PlatformDecoderModule.h b/dom/media/platforms/PlatformDecoderModule.h index 7480d8ff9..d57bf54f8 100644 --- a/dom/media/platforms/PlatformDecoderModule.h +++ b/dom/media/platforms/PlatformDecoderModule.h @@ -7,6 +7,7 @@ #if !defined(PlatformDecoderModule_h_) #define PlatformDecoderModule_h_ +#include "DecoderDoctorDiagnostics.h" #include "MediaDecoderReader.h" #include "MediaInfo.h" #include "mozilla/MozPromise.h" diff --git a/dom/media/platforms/wrappers/H264Converter.cpp b/dom/media/platforms/wrappers/H264Converter.cpp index 0edbfc10c..3b3859f92 100644 --- a/dom/media/platforms/wrappers/H264Converter.cpp +++ b/dom/media/platforms/wrappers/H264Converter.cpp @@ -9,6 +9,7 @@ #include "H264Converter.h" #include "ImageContainer.h" #include "MediaInfo.h" +#include "PDMFactory.h" #include "mp4_demuxer/AnnexB.h" #include "mp4_demuxer/H264.h" diff --git a/dom/quota/QuotaManagerService.cpp b/dom/quota/QuotaManagerService.cpp index fb5f0f3a1..bd811dc9b 100644 --- a/dom/quota/QuotaManagerService.cpp +++ b/dom/quota/QuotaManagerService.cpp @@ -16,6 +16,7 @@ #include "mozilla/ipc/BackgroundParent.h" #include "mozilla/ipc/BackgroundUtils.h" #include "mozilla/ipc/PBackgroundChild.h" +#include "nsContentUtils.h" #include "nsIIdleService.h" #include "nsIIPCBackgroundChildCreateCallback.h" #include "nsIObserverService.h" diff --git a/dom/smil/test/test_smilTimeEvents.xhtml b/dom/smil/test/test_smilTimeEvents.xhtml index bf6924ddb..002be5539 100644 --- a/dom/smil/test/test_smilTimeEvents.xhtml +++ b/dom/smil/test/test_smilTimeEvents.xhtml @@ -236,14 +236,10 @@ function sanityCheckEvent(evt) is(evt.eventPhase, evt.AT_TARGET); is(evt.bubbles, false, "Event should not bubble"); is(evt.cancelable, false, "Event should not be cancelable"); - if (SpecialPowers.getBoolPref("dom.event.highrestimestamp.enabled")) { - var now = window.performance.now(); - ok(evt.timeStamp > 0 && evt.timeStamp < now, - "Event timeStamp (" + evt.timeStamp + ") should be > 0 but " + - "before the current time (" + now + ")"); - } else { - is(evt.timeStamp, 0, "Event timeStamp should be 0"); - } + var now = window.performance.now(); + ok(evt.timeStamp > 0 && evt.timeStamp < now, + "Event timeStamp (" + evt.timeStamp + ") should be > 0 but " + + "before the current time (" + now + ")"); ok(evt.view !== null, "Event view not set"); } diff --git a/dom/url/URLSearchParams.cpp b/dom/url/URLSearchParams.cpp index f762299f8..e2172ea0e 100644 --- a/dom/url/URLSearchParams.cpp +++ b/dom/url/URLSearchParams.cpp @@ -448,6 +448,15 @@ URLSearchParams::GetValueAtIndex(uint32_t aIndex) const return mParams->GetValueAtIndex(aIndex); } +void +URLSearchParams::Sort(ErrorResult& aRv) +{ + aRv = mParams->Sort(); + if (!aRv.Failed()) { + NotifyObserver(); + } +} + // Helper functions for structured cloning inline bool ReadString(JSStructuredCloneReader* aReader, nsString& aString) @@ -472,6 +481,39 @@ ReadString(JSStructuredCloneReader* aReader, nsString& aString) return true; } +nsresult +URLParams::Sort() +{ + // Unfortunately we cannot use nsTArray<>.Sort() because it doesn't keep the + // correct order of the values for equal keys. + + // Let's sort the keys, without duplicates. + FallibleTArray<nsString> keys; + for (const Param& param : mParams) { + if (!keys.Contains(param.mKey) && + !keys.InsertElementSorted(param.mKey, fallible)) { + return NS_ERROR_OUT_OF_MEMORY; + } + } + + FallibleTArray<Param> params; + + // Here we recreate the array starting from the sorted keys. + for (uint32_t keyId = 0, keysLength = keys.Length(); keyId < keysLength; + ++keyId) { + const nsString& key = keys[keyId]; + for (const Param& param : mParams) { + if (param.mKey.Equals(key) && + !params.AppendElement(param, fallible)) { + return NS_ERROR_OUT_OF_MEMORY; + } + } + } + + mParams.SwapElements(params); + return NS_OK; +} + inline bool WriteString(JSStructuredCloneWriter* aWriter, const nsString& aString) { diff --git a/dom/url/URLSearchParams.h b/dom/url/URLSearchParams.h index 9fefd78dd..e02c1179f 100644 --- a/dom/url/URLSearchParams.h +++ b/dom/url/URLSearchParams.h @@ -70,7 +70,7 @@ public: void Get(const nsAString& aName, nsString& aRetval); - void GetAll(const nsAString& aName, nsTArray<nsString >& aRetval); + void GetAll(const nsAString& aName, nsTArray<nsString>& aRetval); void Set(const nsAString& aName, const nsAString& aValue); @@ -103,6 +103,8 @@ public: return mParams[aIndex].mValue; } + nsresult Sort(); + bool ReadStructuredClone(JSStructuredCloneReader* aReader); @@ -171,6 +173,8 @@ public: const nsAString& GetKeyAtIndex(uint32_t aIndex) const; const nsAString& GetValueAtIndex(uint32_t aIndex) const; + void Sort(ErrorResult& aRv); + void Stringify(nsString& aRetval) const { Serialize(aRetval); diff --git a/dom/webidl/URLSearchParams.webidl b/dom/webidl/URLSearchParams.webidl index b93f4e8b1..2828d81dd 100644 --- a/dom/webidl/URLSearchParams.webidl +++ b/dom/webidl/URLSearchParams.webidl @@ -22,6 +22,10 @@ interface URLSearchParams { sequence<USVString> getAll(USVString name); boolean has(USVString name); void set(USVString name, USVString value); + + [Throws] + void sort(); + iterable<USVString, USVString>; stringifier; }; diff --git a/editor/libeditor/tests/test_dom_input_event_on_htmleditor.html b/editor/libeditor/tests/test_dom_input_event_on_htmleditor.html index d1716a228..dc8790750 100644 --- a/editor/libeditor/tests/test_dom_input_event_on_htmleditor.html +++ b/editor/libeditor/tests/test_dom_input_event_on_htmleditor.html @@ -67,21 +67,11 @@ function runTests() "input event is fired on unexpected element: " + aEvent.target.tagName); ok(!aEvent.cancelable, "input event must not be cancelable"); ok(aEvent.bubbles, "input event must be bubbles"); - if (SpecialPowers.getBoolPref("dom.event.highrestimestamp.enabled")) { - var duration = Math.abs(window.performance.now() - aEvent.timeStamp); - ok(duration < 30 * 1000, - "perhaps, timestamp wasn't set correctly :" + aEvent.timeStamp + - " (expected it to be within 30s of the current time but it " + - "differed by " + duration + "ms)"); - } else { - var eventTime = new Date(aEvent.timeStamp); - var duration = Math.abs(Date.now() - aEvent.timeStamp); - ok(duration < 30 * 1000, - "perhaps, timestamp wasn't set correctly :" + - eventTime.toLocaleString() + - " (expected it to be within 30s of the current time but it " + - "differed by " + duration + "ms)"); - } + var duration = Math.abs(window.performance.now() - aEvent.timeStamp); + ok(duration < 30 * 1000, + "perhaps, timestamp wasn't set correctly :" + aEvent.timeStamp + + " (expected it to be within 30s of the current time but it " + + "differed by " + duration + "ms)"); inputEvent = aEvent; }; diff --git a/editor/libeditor/tests/test_dom_input_event_on_texteditor.html b/editor/libeditor/tests/test_dom_input_event_on_texteditor.html index b1395e99c..abdd5f5d0 100644 --- a/editor/libeditor/tests/test_dom_input_event_on_texteditor.html +++ b/editor/libeditor/tests/test_dom_input_event_on_texteditor.html @@ -41,21 +41,11 @@ function runTests() "input event is fired on unexpected element: " + aEvent.target.tagName); ok(!aEvent.cancelable, "input event must not be cancelable"); ok(aEvent.bubbles, "input event must be bubbles"); - if (SpecialPowers.getBoolPref("dom.event.highrestimestamp.enabled")) { - var duration = Math.abs(window.performance.now() - aEvent.timeStamp); - ok(duration < 30 * 1000, - "perhaps, timestamp wasn't set correctly :" + aEvent.timeStamp + - " (expected it to be within 30s of the current time but it " + - "differed by " + duration + "ms)"); - } else { - var eventTime = new Date(aEvent.timeStamp); - var duration = Math.abs(Date.now() - aEvent.timeStamp); - ok(duration < 30 * 1000, - "perhaps, timestamp wasn't set correctly :" + - eventTime.toLocaleString() + - " (expected it to be within 30s of the current time but it " + - "differed by " + duration + "ms)"); - } + var duration = Math.abs(window.performance.now() - aEvent.timeStamp); + ok(duration < 30 * 1000, + "perhaps, timestamp wasn't set correctly :" + aEvent.timeStamp + + " (expected it to be within 30s of the current time but it " + + "differed by " + duration + "ms)"); inputEvent = aEvent; }; diff --git a/gfx/layers/d3d9/CompositorD3D9.cpp b/gfx/layers/d3d9/CompositorD3D9.cpp index 85c19139f..6f01e7d15 100644 --- a/gfx/layers/d3d9/CompositorD3D9.cpp +++ b/gfx/layers/d3d9/CompositorD3D9.cpp @@ -11,7 +11,6 @@ #include "mozilla/layers/ContentHost.h" #include "mozilla/layers/Effects.h" #include "nsWindowsHelpers.h" -#include "Nv3DVUtils.h" #include "gfxFailure.h" #include "mozilla/layers/LayerManagerComposite.h" #include "gfxPrefs.h" @@ -426,44 +425,6 @@ CompositorD3D9::DrawQuad(const gfx::Rect &aRect, MOZ_ASSERT(sourceCb->GetD3D9Texture()); MOZ_ASSERT(sourceCr->GetD3D9Texture()); - /* - * Send 3d control data and metadata - */ - if (mDeviceManager->GetNv3DVUtils()) { - Nv_Stereo_Mode mode; - switch (source->AsSourceD3D9()->GetStereoMode()) { - case StereoMode::LEFT_RIGHT: - mode = NV_STEREO_MODE_LEFT_RIGHT; - break; - case StereoMode::RIGHT_LEFT: - mode = NV_STEREO_MODE_RIGHT_LEFT; - break; - case StereoMode::BOTTOM_TOP: - mode = NV_STEREO_MODE_BOTTOM_TOP; - break; - case StereoMode::TOP_BOTTOM: - mode = NV_STEREO_MODE_TOP_BOTTOM; - break; - case StereoMode::MONO: - mode = NV_STEREO_MODE_MONO; - break; - } - - // Send control data even in mono case so driver knows to leave stereo mode. - mDeviceManager->GetNv3DVUtils()->SendNv3DVControl(mode, true, FIREFOX_3DV_APP_HANDLE); - - if (source->AsSourceD3D9()->GetStereoMode() != StereoMode::MONO) { - mDeviceManager->GetNv3DVUtils()->SendNv3DVControl(mode, true, FIREFOX_3DV_APP_HANDLE); - - RefPtr<IDirect3DSurface9> renderTarget; - d3d9Device->GetRenderTarget(0, getter_AddRefs(renderTarget)); - mDeviceManager->GetNv3DVUtils()->SendNv3DVMetaData((unsigned int)aRect.width, - (unsigned int)aRect.height, - (HANDLE)(sourceY->GetD3D9Texture()), - (HANDLE)(renderTarget)); - } - } - // Linear scaling is default here, adhering to mFilter is difficult since // presumably even with point filtering we'll still want chroma upsampling // to be linear. In the current approach we can't. diff --git a/gfx/layers/d3d9/DeviceManagerD3D9.cpp b/gfx/layers/d3d9/DeviceManagerD3D9.cpp index 09778bc9c..5aa0e9825 100644 --- a/gfx/layers/d3d9/DeviceManagerD3D9.cpp +++ b/gfx/layers/d3d9/DeviceManagerD3D9.cpp @@ -8,7 +8,6 @@ #include "nsIServiceManager.h" #include "nsIConsoleService.h" #include "nsPrintfCString.h" -#include "Nv3DVUtils.h" #include "plstr.h" #include <algorithm> #include "gfx2DGlue.h" @@ -263,21 +262,6 @@ DeviceManagerD3D9::Initialize() return false; } - if (gfxPrefs::StereoVideoEnabled()) { - /* Create an Nv3DVUtils instance */ - if (!mNv3DVUtils) { - mNv3DVUtils = new Nv3DVUtils(); - if (!mNv3DVUtils) { - NS_WARNING("Could not create a new instance of Nv3DVUtils."); - } - } - - /* Initialize the Nv3DVUtils object */ - if (mNv3DVUtils) { - mNv3DVUtils->Initialize(); - } - } - HMODULE d3d9 = LoadLibraryW(L"d3d9.dll"); decltype(Direct3DCreate9)* d3d9Create = (decltype(Direct3DCreate9)*) GetProcAddress(d3d9, "Direct3DCreate9"); @@ -385,14 +369,6 @@ DeviceManagerD3D9::Initialize() /* * Do some post device creation setup */ - if (mNv3DVUtils) { - IUnknown* devUnknown = nullptr; - if (mDevice) { - mDevice->QueryInterface(IID_IUnknown, (void **)&devUnknown); - } - mNv3DVUtils->SetDeviceInfo(devUnknown); - } - auto failCreateShaderMsg = "[D3D9] failed to create a critical resource (shader) code"; hr = mDevice->CreateVertexShader((DWORD*)LayerQuadVS, diff --git a/gfx/layers/d3d9/DeviceManagerD3D9.h b/gfx/layers/d3d9/DeviceManagerD3D9.h index d27b679ab..394f84d9c 100644 --- a/gfx/layers/d3d9/DeviceManagerD3D9.h +++ b/gfx/layers/d3d9/DeviceManagerD3D9.h @@ -18,7 +18,6 @@ namespace mozilla { namespace layers { class DeviceManagerD3D9; -class Nv3DVUtils; class Layer; class TextureSourceD3D9; @@ -179,11 +178,6 @@ public: // returns the register to be used for the mask texture, if appropriate uint32_t SetShaderMode(ShaderMode aMode, MaskType aMaskType); - /** - * Return pointer to the Nv3DVUtils instance - */ - Nv3DVUtils *GetNv3DVUtils() { return mNv3DVUtils; } - /** * Returns true if this device was removed. */ @@ -338,9 +332,6 @@ private: /* If this device was removed */ bool mDeviceWasRemoved; - /* Nv3DVUtils instance */ - nsAutoPtr<Nv3DVUtils> mNv3DVUtils; - /** * Verifies all required device capabilities are present. */ diff --git a/gfx/layers/d3d9/Nv3DVUtils.cpp b/gfx/layers/d3d9/Nv3DVUtils.cpp deleted file mode 100644 index 72638228f..000000000 --- a/gfx/layers/d3d9/Nv3DVUtils.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* -*- Mode: C++; tab-width: 20; 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 "mozilla/DebugOnly.h" - -#include "nsIServiceManager.h" -#include "nsIConsoleService.h" -#include <initguid.h> -#include "Nv3DVUtils.h" - -DEFINE_GUID(CLSID_NV3DVStreaming, -0xf7747266, 0x777d, 0x4f61, 0xa1, 0x75, 0xdd, 0x5a, 0xdf, 0x1e, 0x37, 0xdf); - -DEFINE_GUID(IID_INV3DVStreaming, -0xf98f9bb2, 0xb914, 0x4d44, 0x98, 0xfa, 0x6e, 0x37, 0x85, 0x16, 0x98, 0x55); - -namespace mozilla { -namespace layers { - -/** - * Constructor and Destructor - */ -Nv3DVUtils::Nv3DVUtils() - : m3DVStreaming (nullptr) -{ -} - -Nv3DVUtils::~Nv3DVUtils() -{ - UnInitialize(); -} - - -// Silence spurious warnings! -#if defined(WARNING) || defined WARN_IF_FALSE -#error We shouldn't be redefining these! -#endif -// Uncomment these to enable spurious warnings. -//#define WARNING(str) NS_WARNING(str) -//#define WARN_IF_FALSE(b, str) NS_WARNING_ASSERTION(b, str) -#define WARNING(str) -#define WARN_IF_FALSE(b, str) - -/** - * Initializes the Nv3DVUtils object. - */ -void -Nv3DVUtils::Initialize() -{ - /* - * Detect if 3D Streaming object is already loaded. Do nothing in that case. - */ - if (m3DVStreaming) { - WARNING("Nv3DVStreaming COM object already instantiated.\n"); - return; - } - - /* - * Create the COM object. If we fail at any stage, just return - */ - HRESULT hr = CoCreateInstance(CLSID_NV3DVStreaming, nullptr, CLSCTX_INPROC_SERVER, IID_INV3DVStreaming, (void**)(getter_AddRefs(m3DVStreaming))); - if (FAILED(hr) || !m3DVStreaming) { - WARNING("Nv3DVStreaming CoCreateInstance failed (disabled)."); - return; - } - - /* - * Initialize the object. Note that m3DVStreaming cannot be nullptr at this point. - */ - bool bRetVal = m3DVStreaming->Nv3DVInitialize(); - - if (!bRetVal) { - WARNING("Nv3DVStreaming Nv3DVInitialize failed!"); - return; - } -} - -/** - * Release resources used by the COM Object, and then release - * the COM Object (nsRefPtr gets released by setting to nullptr) - * - */ -void -Nv3DVUtils::UnInitialize() -{ - if (m3DVStreaming) { - m3DVStreaming->Nv3DVRelease(); - } -} - -/** - * Sets the device info, along with any other initialization that is needed after device creation - * Pass the D3D9 device pointer is an IUnknown input argument. - */ -void -Nv3DVUtils::SetDeviceInfo(IUnknown *devUnknown) -{ - if (!devUnknown) { - WARNING("D3D Device Pointer (IUnknown) is nullptr.\n"); - return; - } - - if (!m3DVStreaming) { - return; - } - - bool rv = m3DVStreaming->Nv3DVSetDevice(devUnknown); - if (!rv) { - WARNING("Nv3DVStreaming Nv3DVControl failed!"); - return; - } - - rv = m3DVStreaming->Nv3DVControl(NV_STEREO_MODE_RIGHT_LEFT, true, FIREFOX_3DV_APP_HANDLE); - WARN_IF_FALSE(rv, "Nv3DVStreaming Nv3DVControl failed!"); -} - -/* - * Send Stereo Control Information. Used mainly to re-route - * calls from ImageLayerD3D9 to the 3DV COM object - */ -void -Nv3DVUtils::SendNv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle) -{ - if (!m3DVStreaming) - return; - - DebugOnly<bool> rv = m3DVStreaming->Nv3DVControl(eStereoMode, bEnableStereo, dw3DVAppHandle); - WARN_IF_FALSE(rv, "Nv3DVStreaming Nv3DVControl failed!"); -} - -/* - * Send Stereo Metadata. Used mainly to re-route calls - * from ImageLayerD3D9 to the 3DV COM object - */ -void -Nv3DVUtils::SendNv3DVMetaData(unsigned int dwWidth, unsigned int dwHeight, HANDLE hSrcLuma, HANDLE hDst) -{ - if (!m3DVStreaming) - return; - - DebugOnly<bool> rv = m3DVStreaming->Nv3DVMetaData((DWORD)dwWidth, (DWORD)dwHeight, hSrcLuma, hDst); - WARN_IF_FALSE(rv, "Nv3DVStreaming Nv3DVMetaData failed!"); -} - -} /* namespace layers */ -} /* namespace mozilla */ diff --git a/gfx/layers/d3d9/Nv3DVUtils.h b/gfx/layers/d3d9/Nv3DVUtils.h deleted file mode 100644 index 0712dd888..000000000 --- a/gfx/layers/d3d9/Nv3DVUtils.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- Mode: C++; tab-width: 20; 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/. */ - -#ifndef GFX_NV3DVUTILS_H -#define GFX_NV3DVUTILS_H - -#include "Layers.h" -#include <windows.h> -#include <d3d9.h> - -namespace mozilla { -namespace layers { - -#define FIREFOX_3DV_APP_HANDLE 0xECB992B6 - -enum Nv_Stereo_Mode { - NV_STEREO_MODE_LEFT_RIGHT = 0, - NV_STEREO_MODE_RIGHT_LEFT = 1, - NV_STEREO_MODE_TOP_BOTTOM = 2, - NV_STEREO_MODE_BOTTOM_TOP = 3, - NV_STEREO_MODE_MONO = 4, - NV_STEREO_MODE_LAST = 5 -}; - -class INv3DVStreaming : public IUnknown { - -public: - virtual bool Nv3DVInitialize() = 0; - virtual bool Nv3DVRelease() = 0; - virtual bool Nv3DVSetDevice(IUnknown* pDevice) = 0; - virtual bool Nv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle) = 0; - virtual bool Nv3DVMetaData(DWORD dwWidth, DWORD dwHeight, HANDLE hSrcLuma, HANDLE hDst) = 0; -}; - -/* - * Nv3DVUtils class - */ -class Nv3DVUtils { - -public: - Nv3DVUtils(); - ~Nv3DVUtils(); - - /* - * Initializes the Nv3DVUtils object. - */ - void Initialize(); - - /* - * Release any resources if needed - * - */ - void UnInitialize(); - - /* - * Sets the device info, along with any other initialization that is needed after device creation - * Pass the D3D9 device pointer is an IUnknown input argument - */ - void SetDeviceInfo(IUnknown *devUnknown); - - /* - * Send Stereo Control Information. Used mainly to re-route - * calls from ImageLayerD3D9 to the 3DV COM object - */ - void SendNv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle); - - /* - * Send Stereo Metadata. Used mainly to re-route calls - * from ImageLayerD3D9 to the 3DV COM object - */ - void SendNv3DVMetaData(unsigned int dwWidth, unsigned int dwHeight, HANDLE hSrcLuma, HANDLE hDst); - -private: - - /* Nv3DVStreaming interface pointer */ - RefPtr<INv3DVStreaming> m3DVStreaming; - -}; - - -} // namespace layers -} // namespace mozilla - -#endif /* GFX_NV3DVUTILS_H */ diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index 2a2fa1169..164f04350 100644 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -72,7 +72,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': SOURCES += [ 'd3d9/CompositorD3D9.cpp', 'd3d9/DeviceManagerD3D9.cpp', - 'd3d9/Nv3DVUtils.cpp', ] if CONFIG['MOZ_ENABLE_D3D10_LAYER']: EXPORTS.mozilla.layers += [ diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h index d02f15699..c38352c0d 100644 --- a/gfx/thebes/gfxPrefs.h +++ b/gfx/thebes/gfxPrefs.h @@ -511,7 +511,6 @@ private: DECL_GFX_PREF(Live, "layers.progressive-paint", ProgressivePaint, bool, false); DECL_GFX_PREF(Live, "layers.shared-buffer-provider.enabled", PersistentBufferProviderSharedEnabled, bool, false); DECL_GFX_PREF(Live, "layers.single-tile.enabled", LayersSingleTileEnabled, bool, true); - DECL_GFX_PREF(Once, "layers.stereo-video.enabled", StereoVideoEnabled, bool, false); // We allow for configurable and rectangular tile size to avoid wasting memory on devices whose // screen size does not align nicely to the default tile size. Although layers can be any size, diff --git a/layout/base/MaskLayerImageCache.h b/layout/base/MaskLayerImageCache.h index b18fe5aa1..61881de83 100644 --- a/layout/base/MaskLayerImageCache.h +++ b/layout/base/MaskLayerImageCache.h @@ -10,6 +10,7 @@ #include "nsAutoPtr.h" #include "nsPresContext.h" #include "mozilla/gfx/Matrix.h" +#include "mozilla/layers/ShadowLayers.h" namespace mozilla { diff --git a/layout/base/MobileViewportManager.h b/layout/base/MobileViewportManager.h index 63128b281..6324a8645 100644 --- a/layout/base/MobileViewportManager.h +++ b/layout/base/MobileViewportManager.h @@ -7,8 +7,11 @@ #define MobileViewportManager_h_ #include "mozilla/Maybe.h" +#include "nsIDocument.h" #include "nsIDOMEventListener.h" +#include "nsIDOMEventTarget.h" #include "nsIObserver.h" +#include "nsViewportInfo.h" #include "Units.h" class nsIDOMEventTarget; diff --git a/layout/base/PositionedEventTargeting.cpp b/layout/base/PositionedEventTargeting.cpp index 8374ab9d2..668ff2938 100644 --- a/layout/base/PositionedEventTargeting.cpp +++ b/layout/base/PositionedEventTargeting.cpp @@ -8,6 +8,7 @@ #include "mozilla/EventStates.h" #include "mozilla/MouseEvents.h" #include "mozilla/Preferences.h" +#include "nsIContentInlines.h" #include "nsLayoutUtils.h" #include "nsGkAtoms.h" #include "nsFontMetrics.h" diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp index 5c599e1ef..9e80ef7bc 100644 --- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -241,11 +241,6 @@ RestyleManager::AnimationsWithDestroyedFrame::StopAnimationsWithoutFrame( } } -static inline dom::Element* -ElementForStyleContext(nsIContent* aParentContent, - nsIFrame* aFrame, - CSSPseudoElementType aPseudoType); - // Forwarded nsIDocumentObserver method, to handle restyling (and // passing the notification to the frame). void @@ -1009,7 +1004,7 @@ RestyleManager::TryInitiatingTransition(nsPresContext* aPresContext, return *aNewStyleContext != sc; } -static dom::Element* +dom::Element* ElementForStyleContext(nsIContent* aParentContent, nsIFrame* aFrame, CSSPseudoElementType aPseudoType) diff --git a/layout/base/RestyleManager.h b/layout/base/RestyleManager.h index 3b60b331a..dd58f4bb4 100644 --- a/layout/base/RestyleManager.h +++ b/layout/base/RestyleManager.h @@ -191,6 +191,7 @@ public: MOZ_ASSERT(false, "unexpected aPseudoType"); return nullptr; } + private: RestyleManager* mRestyleManager; AutoRestore<ReframingStyleContexts*> mRestorePointer; @@ -880,6 +881,11 @@ private: AutoTArray<mozilla::dom::Element*, 4> mAncestors; }; +dom::Element* +ElementForStyleContext(nsIContent* aParentContent, + nsIFrame* aFrame, + CSSPseudoElementType aPseudoType); + } // namespace mozilla #endif /* mozilla_RestyleManager_h */ diff --git a/layout/base/RestyleManagerBase.cpp b/layout/base/RestyleManagerBase.cpp index 1a3cae4bf..69c2d9899 100644 --- a/layout/base/RestyleManagerBase.cpp +++ b/layout/base/RestyleManagerBase.cpp @@ -5,8 +5,26 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/RestyleManagerBase.h" +#include "mozilla/RestyleManager.h" #include "mozilla/StyleSetHandle.h" +#include "mozilla/StyleSetHandleInlines.h" // for Ptr::HasStateDependentStyle +#include "ActiveLayerTracker.h" +#include "nsCSSFrameConstructor.h" +#include "nsCSSRendering.h" #include "nsIFrame.h" +#include "nsIFrameInlines.h" // for IsAbsPosContainingBlock +#include "nsPlaceholderFrame.h" +#include "nsStyleChangeList.h" +#include "nsStyleStructInlines.h" // for HasTransform +#include "nsSVGEffects.h" +#include "nsSVGIntegrationUtils.h" +#include "nsSVGUtils.h" +#include "nsViewportFrame.h" +#include "StickyScrollContainer.h" +#include "SVGTextFrame.h" + +using namespace mozilla; +using namespace mozilla::layers; namespace mozilla { diff --git a/layout/base/ServoRestyleManager.cpp b/layout/base/ServoRestyleManager.cpp index 0659ab857..e7b295845 100644 --- a/layout/base/ServoRestyleManager.cpp +++ b/layout/base/ServoRestyleManager.cpp @@ -9,6 +9,7 @@ #include "mozilla/ServoStyleSet.h" #include "mozilla/dom/ChildIterator.h" #include "nsContentUtils.h" +#include "nsCSSFrameConstructor.h" #include "nsPrintfCString.h" #include "nsStyleChangeList.h" diff --git a/layout/base/TouchManager.cpp b/layout/base/TouchManager.cpp index 5167ca588..e7972d5af 100644 --- a/layout/base/TouchManager.cpp +++ b/layout/base/TouchManager.cpp @@ -12,6 +12,8 @@ #include "nsPresShell.h" #include "nsView.h" +using namespace mozilla::dom; + namespace mozilla { nsDataHashtable<nsUint32HashKey, TouchManager::TouchInfo>* TouchManager::sCaptureTouchList; diff --git a/layout/base/moz.build b/layout/base/moz.build index afc683665..f115280ce 100644 --- a/layout/base/moz.build +++ b/layout/base/moz.build @@ -119,7 +119,7 @@ EXPORTS.mozilla += [ 'StaticPresData.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'AccessibleCaret.cpp', 'AccessibleCaretEventHub.cpp', 'AccessibleCaretManager.cpp', @@ -151,9 +151,11 @@ UNIFIED_SOURCES += [ 'nsLayoutDebugger.cpp', 'nsLayoutHistoryState.cpp', 'nsLayoutUtils.cpp', + 'nsPresArena.cpp', 'nsPresContext.cpp', 'nsPresShell.cpp', 'nsQuoteList.cpp', + 'nsRefreshDriver.cpp', 'nsStyleChangeList.cpp', 'nsStyleSheetService.cpp', 'PaintTracker.cpp', @@ -169,13 +171,6 @@ UNIFIED_SOURCES += [ 'ZoomConstraintsClient.cpp', ] -# nsPresArena.cpp needs to be built separately because it uses plarena.h. -# nsRefreshDriver.cpp needs to be built separately because of name clashes in the OS X headers -SOURCES += [ - 'nsPresArena.cpp', - 'nsRefreshDriver.cpp', -] - if CONFIG['ENABLE_TESTS']: DIRS += ['gtest'] diff --git a/layout/base/nsFrameTraversal.cpp b/layout/base/nsFrameTraversal.cpp index 76dd40af1..0c6a655a2 100644 --- a/layout/base/nsFrameTraversal.cpp +++ b/layout/base/nsFrameTraversal.cpp @@ -10,6 +10,7 @@ #include "nsPlaceholderFrame.h" #include "nsContainerFrame.h" +using namespace mozilla; class nsFrameIterator : public nsIFrameEnumerator { diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 7496a4946..710463a5f 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -118,6 +118,7 @@ #include "mozilla/StyleSetHandleInlines.h" #include "RegionBuilder.h" #include "SVGSVGElement.h" +#include "nsDocument.h" #ifdef MOZ_XUL #include "nsXULPopupManager.h" diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index bd5125637..8b469185f 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -58,6 +58,7 @@ #include "nsNameSpaceManager.h" // for Pref-related rule management (bugs 22963,20760,31816) #include "nsFrame.h" #include "FrameLayerBuilder.h" +#include "FrameMetrics.h" // for ViewID #include "nsViewManager.h" #include "nsView.h" #include "nsCRTGlue.h" @@ -162,11 +163,12 @@ #endif -#include "mozilla/layers/CompositorBridgeChild.h" #include "GeckoProfiler.h" #include "gfxPlatform.h" #include "Layers.h" #include "LayerTreeInvalidation.h" +#include "ClientLayerManager.h" +#include "mozilla/layers/CompositorBridgeChild.h" #include "mozilla/css/ImageLoader.h" #include "mozilla/dom/DocumentTimeline.h" #include "mozilla/Preferences.h" @@ -221,6 +223,8 @@ using namespace mozilla::gfx; using namespace mozilla::layout; using PaintFrameFlags = nsLayoutUtils::PaintFrameFlags; +typedef FrameMetrics::ViewID ViewID; + CapturingContentInfo nsIPresShell::gCaptureInfo = { false /* mAllowed */, false /* mPointerLock */, false /* mRetargetToElement */, false /* mPreventDrag */ }; diff --git a/layout/generic/CSSAlignUtils.h b/layout/generic/CSSAlignUtils.h index 3693038b2..a258f4103 100644 --- a/layout/generic/CSSAlignUtils.h +++ b/layout/generic/CSSAlignUtils.h @@ -9,6 +9,7 @@ #define mozilla_CSSAlignUtils_h #include "mozilla/WritingModes.h" +#include "ReflowInput.h" namespace mozilla { diff --git a/layout/generic/ReflowOutput.cpp b/layout/generic/ReflowOutput.cpp index e64e41dc5..1c61484e7 100644 --- a/layout/generic/ReflowOutput.cpp +++ b/layout/generic/ReflowOutput.cpp @@ -8,6 +8,8 @@ #include "mozilla/ReflowOutput.h" #include "mozilla/ReflowInput.h" +using namespace mozilla; + void nsOverflowAreas::UnionWith(const nsOverflowAreas& aOther) { diff --git a/layout/generic/RubyUtils.h b/layout/generic/RubyUtils.h index 8c9545f70..9bba89d0b 100644 --- a/layout/generic/RubyUtils.h +++ b/layout/generic/RubyUtils.h @@ -10,6 +10,7 @@ #include "nsTArray.h" #include "nsGkAtoms.h" #include "nsCSSAnonBoxes.h" +#include "nsIFrame.h" #define RTC_ARRAY_SIZE 1 diff --git a/layout/generic/ScrollSnap.h b/layout/generic/ScrollSnap.h index a2877564d..37609017b 100644 --- a/layout/generic/ScrollSnap.h +++ b/layout/generic/ScrollSnap.h @@ -6,6 +6,8 @@ #ifndef mozilla_layout_ScrollSnap_h_ #define mozilla_layout_ScrollSnap_h_ +#include "nsIScrollableFrame.h" + namespace mozilla { namespace layers { diff --git a/layout/generic/moz.build b/layout/generic/moz.build index 0fe98afec..ad186ef7a 100644 --- a/layout/generic/moz.build +++ b/layout/generic/moz.build @@ -123,7 +123,7 @@ EXPORTS.mozilla.layout += [ 'FrameChildList.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'AsyncScrollBase.cpp', 'BlockReflowInput.cpp', 'CSSAlignUtils.cpp', @@ -157,9 +157,11 @@ UNIFIED_SOURCES += [ 'nsIntervalSet.cpp', 'nsLeafFrame.cpp', 'nsLineBox.cpp', + 'nsLineLayout.cpp', 'nsPageContentFrame.cpp', 'nsPageFrame.cpp', 'nsPlaceholderFrame.cpp', + 'nsPluginFrame.cpp', 'nsRubyBaseContainerFrame.cpp', 'nsRubyBaseFrame.cpp', 'nsRubyContentFrame.cpp', @@ -185,13 +187,6 @@ UNIFIED_SOURCES += [ 'TextOverflow.cpp', ] -# nsLineLayout.cpp needs to be built separately because it uses plarena.h. -# nsPluginFrame.cpp needs to be built separately because of name clashes in the OS X headers. -SOURCES += [ - 'nsLineLayout.cpp', - 'nsPluginFrame.cpp', -] - include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' diff --git a/layout/generic/nsAbsoluteContainingBlock.cpp b/layout/generic/nsAbsoluteContainingBlock.cpp index a92a2062d..f444757e8 100644 --- a/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/layout/generic/nsAbsoluteContainingBlock.cpp @@ -18,6 +18,7 @@ #include "nsPresContext.h" #include "nsCSSFrameConstructor.h" #include "nsGridContainerFrame.h" +#include "nsPlaceholderFrame.h" #include "mozilla/Sprintf.h" diff --git a/layout/generic/nsBRFrame.cpp b/layout/generic/nsBRFrame.cpp index 057210350..08c0fe3dd 100644 --- a/layout/generic/nsBRFrame.cpp +++ b/layout/generic/nsBRFrame.cpp @@ -6,6 +6,7 @@ /* rendering object for HTML <br> elements */ #include "nsCOMPtr.h" +#include "nsContainerFrame.h" #include "nsFontMetrics.h" #include "nsFrame.h" #include "nsPresContext.h" diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index e2537968c..3ec93b762 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -29,10 +29,12 @@ #include "nsBoxLayoutState.h" #include "nsCSSFrameConstructor.h" #include "nsBlockFrame.h" +#include "nsBulletFrame.h" #include "nsPlaceholderFrame.h" #include "mozilla/AutoRestore.h" #include "nsIFrameInlines.h" #include "nsPrintfCString.h" +#include "nsAttrValueInlines.h" #include <algorithm> using namespace mozilla; diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index ea29c6945..024cc39bd 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -53,6 +53,7 @@ #include "nsGkAtoms.h" #include "nsHtml5Atoms.h" #include "nsCSSAnonBoxes.h" +#include "nsGenericHTMLElement.h" #include "nsFrameTraversal.h" #include "nsRange.h" diff --git a/layout/generic/nsRubyBaseContainerFrame.cpp b/layout/generic/nsRubyBaseContainerFrame.cpp index 401b7d576..566dee14f 100644 --- a/layout/generic/nsRubyBaseContainerFrame.cpp +++ b/layout/generic/nsRubyBaseContainerFrame.cpp @@ -22,6 +22,7 @@ #include "RubyUtils.h" using namespace mozilla; +using namespace mozilla::gfx; //---------------------------------------------------------------------- diff --git a/layout/generic/nsTextFrameUtils.cpp b/layout/generic/nsTextFrameUtils.cpp index d07400f2b..8562839cc 100644 --- a/layout/generic/nsTextFrameUtils.cpp +++ b/layout/generic/nsTextFrameUtils.cpp @@ -13,6 +13,8 @@ #include "nsUnicharUtils.h" #include <algorithm> +using namespace mozilla; + static bool IsDiscardable(char16_t ch, uint32_t* aFlags) { // Unlike IS_DISCARDABLE, we don't discard \r. \r will be ignored by gfxTextRun diff --git a/layout/generic/nsTextRunTransformations.cpp b/layout/generic/nsTextRunTransformations.cpp index 84d669ed6..ac3edd0b9 100644 --- a/layout/generic/nsTextRunTransformations.cpp +++ b/layout/generic/nsTextRunTransformations.cpp @@ -20,6 +20,7 @@ #include "IrishCasing.h" using namespace mozilla; +using namespace mozilla::gfx; // Unicode characters needing special casing treatment in tr/az languages #define LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE 0x0130 diff --git a/layout/generic/nsTextRunTransformations.h b/layout/generic/nsTextRunTransformations.h index 662a5d2f8..db29c7315 100644 --- a/layout/generic/nsTextRunTransformations.h +++ b/layout/generic/nsTextRunTransformations.h @@ -12,6 +12,8 @@ #include "gfxTextRun.h" #include "nsStyleContext.h" +using namespace mozilla; + class nsTransformedTextRun; struct nsTransformedCharStyle final { diff --git a/layout/generic/nsViewportFrame.cpp b/layout/generic/nsViewportFrame.cpp index 39491a0ed..20378e766 100644 --- a/layout/generic/nsViewportFrame.cpp +++ b/layout/generic/nsViewportFrame.cpp @@ -16,6 +16,7 @@ #include "nsAbsoluteContainingBlock.h" #include "GeckoProfiler.h" #include "nsIMozBrowserFrame.h" +#include "nsPlaceholderFrame.h" using namespace mozilla; typedef nsAbsoluteContainingBlock::AbsPosReflowFlags AbsPosReflowFlags; diff --git a/layout/printing/ipc/RemotePrintJobParent.cpp b/layout/printing/ipc/RemotePrintJobParent.cpp index 2f4dbd56e..d49927da3 100644 --- a/layout/printing/ipc/RemotePrintJobParent.cpp +++ b/layout/printing/ipc/RemotePrintJobParent.cpp @@ -18,7 +18,6 @@ #include "nsIDeviceContextSpec.h" #include "nsIPrintSettings.h" #include "nsIWebProgressListener.h" -#include "PrintTranslator.h" namespace mozilla { namespace layout { diff --git a/layout/printing/ipc/RemotePrintJobParent.h b/layout/printing/ipc/RemotePrintJobParent.h index a96cc7eaa..752ef601e 100644 --- a/layout/printing/ipc/RemotePrintJobParent.h +++ b/layout/printing/ipc/RemotePrintJobParent.h @@ -13,11 +13,11 @@ #include "nsCOMPtr.h" #include "mozilla/RefPtr.h" #include "mozilla/UniquePtr.h" +#include "mozilla/layout/PrintTranslator.h" class nsDeviceContext; class nsIPrintSettings; class nsIWebProgressListener; -class PrintTranslator; namespace mozilla { namespace layout { diff --git a/layout/printing/moz.build b/layout/printing/moz.build index 1a82d7cdb..745c45c4b 100644 --- a/layout/printing/moz.build +++ b/layout/printing/moz.build @@ -13,11 +13,12 @@ XPIDL_SOURCES += [ EXPORTS.mozilla.layout += [ 'ipc/RemotePrintJobChild.h', 'ipc/RemotePrintJobParent.h', + 'PrintTranslator.h', ] XPIDL_MODULE = 'layout_printing' -UNIFIED_SOURCES += [ +SOURCES += [ 'ipc/RemotePrintJobChild.cpp', 'ipc/RemotePrintJobParent.cpp', 'nsPagePrintTimer.cpp', diff --git a/layout/printing/nsPrintData.cpp b/layout/printing/nsPrintData.cpp index 1914f779b..d760f7f0a 100644 --- a/layout/printing/nsPrintData.cpp +++ b/layout/printing/nsPrintData.cpp @@ -7,9 +7,11 @@ #include "nsIStringBundle.h" #include "nsIServiceManager.h" +#include "nsPIDOMWindow.h" #include "nsPrintObject.h" #include "nsPrintPreviewListener.h" #include "nsIWebProgressListener.h" +#include "nsIWidget.h" #include "mozilla/Services.h" //----------------------------------------------------- diff --git a/layout/printing/nsPrintEngine.cpp b/layout/printing/nsPrintEngine.cpp index 0c455f563..732a7dc92 100644 --- a/layout/printing/nsPrintEngine.cpp +++ b/layout/printing/nsPrintEngine.cpp @@ -16,6 +16,7 @@ #include "nsPIDOMWindow.h" #include "nsIDocShell.h" #include "nsIURI.h" +#include "nsIFile.h" #include "nsITextToSubURI.h" #include "nsError.h" @@ -143,7 +144,7 @@ using namespace mozilla::dom; #define DUMP_LAYOUT_LEVEL 9 // this turns on the dumping of each doucment's layout info #ifndef PR_PL -static mozilla::LazyLogModule gPrintingLog("printing") +static mozilla::LazyLogModule gPrintingLog("printing"); #define PR_PL(_p1) MOZ_LOG(gPrintingLog, mozilla::LogLevel::Debug, _p1); #endif diff --git a/layout/printing/nsPrintObject.cpp b/layout/printing/nsPrintObject.cpp index 9165374c2..fe9622a1c 100644 --- a/layout/printing/nsPrintObject.cpp +++ b/layout/printing/nsPrintObject.cpp @@ -6,6 +6,7 @@ #include "nsPrintObject.h" #include "nsIContentViewer.h" #include "nsIDOMDocument.h" +#include "nsIDOMElement.h" #include "nsContentUtils.h" // for nsAutoScriptBlocker #include "nsIInterfaceRequestorUtils.h" #include "nsPIDOMWindow.h" @@ -14,6 +15,9 @@ #include "nsIDocShellTreeItem.h" #include "nsIBaseWindow.h" #include "nsIDocument.h" +#include "nsIWidget.h" +#include "mozilla/Unused.h" +#include "mozilla/dom/Element.h" //--------------------------------------------------- //-- nsPrintObject Class Impl diff --git a/layout/style/CSSLexer.h b/layout/style/CSSLexer.h index 8b41d2778..4eff7a528 100644 --- a/layout/style/CSSLexer.h +++ b/layout/style/CSSLexer.h @@ -9,6 +9,7 @@ #include "mozilla/UniquePtr.h" #include "nsCSSScanner.h" #include "mozilla/dom/CSSLexerBinding.h" +#include "mozilla/dom/NonRefcountedDOMObject.h" namespace mozilla { namespace dom { diff --git a/layout/style/CSSStyleSheet.cpp b/layout/style/CSSStyleSheet.cpp index 43d47100d..40a4ee4d8 100644 --- a/layout/style/CSSStyleSheet.cpp +++ b/layout/style/CSSStyleSheet.cpp @@ -47,6 +47,7 @@ #include "mozilla/RuleProcessorCache.h" #include "nsIStyleSheetLinkingElement.h" #include "nsDOMWindowUtils.h" +#include "nsStyleSet.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/layout/style/Declaration.cpp b/layout/style/Declaration.cpp index b2de159ed..9d7ca312c 100644 --- a/layout/style/Declaration.cpp +++ b/layout/style/Declaration.cpp @@ -14,6 +14,7 @@ #include "mozilla/css/Declaration.h" #include "nsPrintfCString.h" #include "gfxFontConstants.h" +#include "nsCSSRules.h" #include "nsStyleUtil.h" namespace mozilla { diff --git a/layout/style/DocumentStyleRootIterator.h b/layout/style/DocumentStyleRootIterator.h index 7dcdc7fa1..98d9fd32f 100644 --- a/layout/style/DocumentStyleRootIterator.h +++ b/layout/style/DocumentStyleRootIterator.h @@ -8,6 +8,7 @@ #define DocumentStyleRootIterator_h #include "nsTArray.h" +#include "mozilla/dom/Element.h" class nsIContent; class nsIDocument; diff --git a/layout/style/RuleProcessorCache.cpp b/layout/style/RuleProcessorCache.cpp index 23832c230..e2e788c56 100644 --- a/layout/style/RuleProcessorCache.cpp +++ b/layout/style/RuleProcessorCache.cpp @@ -13,6 +13,7 @@ #include <algorithm> #include "nsCSSRuleProcessor.h" #include "nsThreadUtils.h" +#include "CSSStyleSheet.h" using namespace mozilla; diff --git a/layout/style/ServoStyleSet.cpp b/layout/style/ServoStyleSet.cpp index 331e2322a..38e02e66d 100644 --- a/layout/style/ServoStyleSet.cpp +++ b/layout/style/ServoStyleSet.cpp @@ -6,6 +6,7 @@ #include "mozilla/ServoStyleSet.h" +#include "ServoBindings.h" #include "mozilla/ServoRestyleManager.h" #include "mozilla/dom/ChildIterator.h" #include "nsCSSAnonBoxes.h" diff --git a/layout/style/ServoStyleSheet.cpp b/layout/style/ServoStyleSheet.cpp index 5f2a925b5..e03ad2865 100644 --- a/layout/style/ServoStyleSheet.cpp +++ b/layout/style/ServoStyleSheet.cpp @@ -4,8 +4,12 @@ * 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 "ServoBindings.h" #include "mozilla/ServoStyleSheet.h" #include "mozilla/StyleBackendType.h" +#include "CSSRuleList.h" + +using namespace mozilla::dom; namespace mozilla { diff --git a/layout/style/StyleRule.cpp b/layout/style/StyleRule.cpp index aca97a505..8fde72534 100644 --- a/layout/style/StyleRule.cpp +++ b/layout/style/StyleRule.cpp @@ -36,6 +36,7 @@ class nsIDOMCSSStyleDeclaration; class nsIDOMCSSStyleSheet; using namespace mozilla; +using namespace mozilla::dom; #define NS_IF_CLONE(member_) \ PR_BEGIN_MACRO \ diff --git a/layout/style/StyleSheet.cpp b/layout/style/StyleSheet.cpp index f125cf97e..d4bc94186 100644 --- a/layout/style/StyleSheet.cpp +++ b/layout/style/StyleSheet.cpp @@ -6,6 +6,7 @@ #include "mozilla/StyleSheet.h" +#include "mozilla/dom/BindingDeclarations.h" // for Optional<> #include "mozilla/dom/CSSRuleList.h" #include "mozilla/dom/ShadowRoot.h" #include "mozilla/ServoStyleSheet.h" @@ -16,6 +17,8 @@ #include "nsIMediaList.h" #include "nsNullPrincipal.h" +using namespace mozilla::dom; + namespace mozilla { StyleSheet::StyleSheet(StyleBackendType aType, css::SheetParsingMode aParsingMode) diff --git a/layout/style/moz.build b/layout/style/moz.build index 40b9fd659..74caf94df 100644 --- a/layout/style/moz.build +++ b/layout/style/moz.build @@ -140,7 +140,7 @@ EXPORTS.mozilla.css += [ 'StyleRule.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'AnimationCollection.cpp', 'AnimationCommon.cpp', 'CounterStyleManager.cpp', @@ -171,6 +171,7 @@ UNIFIED_SOURCES += [ 'nsCSSProps.cpp', 'nsCSSPseudoClasses.cpp', 'nsCSSPseudoElements.cpp', + 'nsCSSRuleProcessor.cpp', 'nsCSSRules.cpp', 'nsCSSScanner.cpp', 'nsCSSValue.cpp', @@ -183,6 +184,7 @@ UNIFIED_SOURCES += [ 'nsFontFaceUtils.cpp', 'nsHTMLCSSStyleSheet.cpp', 'nsHTMLStyleSheet.cpp', + 'nsLayoutStylesheetCache.cpp', 'nsMediaFeatures.cpp', 'nsNthIndexCache.cpp', 'nsROCSSPrimitiveValue.cpp', @@ -208,14 +210,6 @@ UNIFIED_SOURCES += [ 'SVGAttrAnimationRuleProcessor.cpp', ] -# nsCSSRuleProcessor.cpp needs to be built separately because it uses plarena.h. -# nsLayoutStylesheetCache.cpp needs to be built separately because it uses -# nsExceptionHandler.h, which includes windows.h. -SOURCES += [ - 'nsCSSRuleProcessor.cpp', - 'nsLayoutStylesheetCache.cpp', -] - EXTRA_COMPONENTS += [ 'CSSUnprefixingService.js', 'CSSUnprefixingService.manifest', diff --git a/layout/style/nsCSSProps.h b/layout/style/nsCSSProps.h index e67e1d41d..aabbac07a 100644 --- a/layout/style/nsCSSProps.h +++ b/layout/style/nsCSSProps.h @@ -345,7 +345,7 @@ public: // KTableEntry objects can be initialized either with an int16_t value // or a value of an enumeration type that can fit within an int16_t. - constexpr KTableEntry(nsCSSKeyword aKeyword, int16_t aValue) + KTableEntry(nsCSSKeyword aKeyword, int16_t aValue) : mKeyword(aKeyword) , mValue(aValue) { @@ -353,7 +353,7 @@ public: template<typename T, typename = typename std::enable_if<std::is_enum<T>::value>::type> - constexpr KTableEntry(nsCSSKeyword aKeyword, T aValue) + KTableEntry(nsCSSKeyword aKeyword, T aValue) : mKeyword(aKeyword) , mValue(static_cast<int16_t>(aValue)) { diff --git a/layout/style/nsCSSPseudoClassList.h b/layout/style/nsCSSPseudoClassList.h index 12f43af5b..7f620ec32 100644 --- a/layout/style/nsCSSPseudoClassList.h +++ b/layout/style/nsCSSPseudoClassList.h @@ -38,6 +38,8 @@ * automatically defined to CSS_PSEUDO_CLASS. */ +#include "nsCSSPseudoElements.h" + // OUTPUT_CLASS=nsCSSPseudoClasses // MACRO_NAME=CSS_PSEUDO_CLASS diff --git a/layout/style/nsCSSPseudoClasses.cpp b/layout/style/nsCSSPseudoClasses.cpp index 9b26459dd..a174525b1 100644 --- a/layout/style/nsCSSPseudoClasses.cpp +++ b/layout/style/nsCSSPseudoClasses.cpp @@ -13,6 +13,7 @@ #include "nsString.h" using namespace mozilla; +using namespace mozilla::css; // define storage for all atoms #define CSS_PSEUDO_CLASS(_name, _value, _flags, _pref) \ diff --git a/layout/style/nsCSSPseudoClasses.h b/layout/style/nsCSSPseudoClasses.h index ca1cb2f39..55e5bf9d2 100644 --- a/layout/style/nsCSSPseudoClasses.h +++ b/layout/style/nsCSSPseudoClasses.h @@ -9,6 +9,8 @@ #define nsCSSPseudoClasses_h___ #include "nsStringFwd.h" +#include "mozilla/CSSEnabledState.h" +#include "nsStyleStruct.h" // The following two flags along with the pref defines where this pseudo // class can be used: diff --git a/layout/style/nsCSSRules.h b/layout/style/nsCSSRules.h index 1bd468cb6..1c6361c3e 100644 --- a/layout/style/nsCSSRules.h +++ b/layout/style/nsCSSRules.h @@ -41,7 +41,6 @@ namespace mozilla { namespace dom { class DocGroup; -class DocGroup; } // namespace dom class ErrorResult; diff --git a/layout/style/nsCSSScanner.cpp b/layout/style/nsCSSScanner.cpp index 2110be78c..b1524a3bb 100644 --- a/layout/style/nsCSSScanner.cpp +++ b/layout/style/nsCSSScanner.cpp @@ -14,6 +14,8 @@ #include "mozilla/Likely.h" #include <algorithm> +using mozilla::IsNaN; + /* Character class tables and related helper functions. */ static const uint8_t IS_HEX_DIGIT = 0x01; diff --git a/layout/style/nsCSSValue.cpp b/layout/style/nsCSSValue.cpp index baf5b7897..0a905a055 100644 --- a/layout/style/nsCSSValue.cpp +++ b/layout/style/nsCSSValue.cpp @@ -6,11 +6,12 @@ /* representation of simple property values within CSS declarations */ +#include "mozilla/ArrayUtils.h" + #include "nsCSSValue.h" #include "mozilla/StyleSheetInlines.h" #include "mozilla/Likely.h" -#include "mozilla/MemoryReporting.h" #include "mozilla/Move.h" #include "mozilla/css/ImageLoader.h" #include "CSSCalc.h" @@ -18,8 +19,6 @@ #include "imgIRequest.h" #include "imgRequestProxy.h" #include "nsIDocument.h" -#include "nsIPrincipal.h" -#include "nsCSSProps.h" #include "nsNetUtil.h" #include "nsPresContext.h" #include "nsStyleUtil.h" @@ -27,7 +26,9 @@ #include "nsStyleSet.h" #include "nsContentUtils.h" + using namespace mozilla; +using namespace mozilla::css; static bool IsLocalRefURL(nsStringBuffer* aString) diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index 20e5651bd..1032be651 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -54,6 +54,8 @@ using namespace mozilla; using namespace mozilla::dom; +typedef nsCSSProps::KTableEntry KTableEntry; + #if defined(DEBUG_bzbarsky) || defined(DEBUG_caillon) #define DEBUG_ComputedDOMStyle #endif diff --git a/layout/style/nsDOMCSSAttrDeclaration.cpp b/layout/style/nsDOMCSSAttrDeclaration.cpp index 7b659a8cc..652bd4ad1 100644 --- a/layout/style/nsDOMCSSAttrDeclaration.cpp +++ b/layout/style/nsDOMCSSAttrDeclaration.cpp @@ -10,6 +10,7 @@ #include "mozilla/css/Declaration.h" #include "mozilla/css/StyleRule.h" #include "mozilla/dom/Element.h" +#include "mozilla/dom/DocGroup.h" #include "nsIDocument.h" #include "nsIDOMMutationEvent.h" #include "nsIURI.h" @@ -17,8 +18,12 @@ #include "nsWrapperCacheInlines.h" #include "nsIFrame.h" #include "ActiveLayerTracker.h" +#include "ServoDeclarationBlock.h" +#include "StyleSetHandle.h" +#include "DeclarationBlockInlines.h" using namespace mozilla; +using namespace mozilla::dom; nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(dom::Element* aElement, bool aIsSMILOverride) diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp index 854236e51..f33f8dd33 100644 --- a/layout/style/nsMediaFeatures.cpp +++ b/layout/style/nsMediaFeatures.cpp @@ -19,6 +19,7 @@ #include "nsDeviceContext.h" #include "nsIBaseWindow.h" #include "nsIDocument.h" +#include "nsIWidget.h" #include "nsContentUtils.h" #include "mozilla/StyleSheet.h" #include "mozilla/StyleSheetInlines.h" diff --git a/layout/style/nsStyleContext.cpp b/layout/style/nsStyleContext.cpp index 7ad260f1b..4b1a14897 100644 --- a/layout/style/nsStyleContext.cpp +++ b/layout/style/nsStyleContext.cpp @@ -12,6 +12,8 @@ #include "nsCSSAnonBoxes.h" #include "nsCSSPseudoElements.h" #include "nsStyleConsts.h" +#include "nsStyleStruct.h" +#include "nsStyleStructInlines.h" #include "nsString.h" #include "nsPresContext.h" #include "nsIStyleRule.h" @@ -35,6 +37,7 @@ #include "mozilla/ReflowInput.h" #include "nsLayoutUtils.h" #include "nsCoord.h" +#include "nsFontMetrics.h" // Ensure the binding function declarations in nsStyleContext.h matches // those in ServoBindings.h. diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 72c103724..200f934c5 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -40,6 +40,7 @@ #include <algorithm> using namespace mozilla; +using namespace mozilla::dom; static_assert((((1 << nsStyleStructID_Length) - 1) & ~(NS_STYLE_INHERIT_MASK)) == 0, diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp index 6ba267ee8..ebb5298b7 100644 --- a/layout/svg/SVGTextFrame.cpp +++ b/layout/svg/SVGTextFrame.cpp @@ -37,6 +37,7 @@ #include "nsTextNode.h" #include "SVGAnimatedNumberList.h" #include "SVGContentUtils.h" +#include "SVGContextPaint.h" #include "SVGLengthList.h" #include "SVGNumberList.h" #include "SVGPathElement.h" diff --git a/layout/svg/moz.build b/layout/svg/moz.build index b1481f4ef..69d5d2a3b 100644 --- a/layout/svg/moz.build +++ b/layout/svg/moz.build @@ -21,7 +21,7 @@ EXPORTS.mozilla += [ 'SVGContextPaint.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsCSSClipPathInstance.cpp', 'nsCSSFilterInstance.cpp', 'nsFilterInstance.cpp', diff --git a/layout/svg/nsFilterInstance.cpp b/layout/svg/nsFilterInstance.cpp index fe52b8a8f..0735807ce 100644 --- a/layout/svg/nsFilterInstance.cpp +++ b/layout/svg/nsFilterInstance.cpp @@ -28,6 +28,7 @@ using namespace mozilla; using namespace mozilla::dom; using namespace mozilla::gfx; +using namespace mozilla::image; FilterDescription nsFilterInstance::GetFilterDescription(nsIContent* aFilteredElement, diff --git a/layout/svg/nsISVGChildFrame.h b/layout/svg/nsISVGChildFrame.h index c9fd0f12a..f74ff89c0 100644 --- a/layout/svg/nsISVGChildFrame.h +++ b/layout/svg/nsISVGChildFrame.h @@ -8,6 +8,7 @@ #include "gfxRect.h" #include "nsQueryFrame.h" +#include "imgIContainer.h" class gfxContext; class gfxMatrix; diff --git a/layout/svg/nsSVGContainerFrame.cpp b/layout/svg/nsSVGContainerFrame.cpp index 750dcc9da..15af5da99 100644 --- a/layout/svg/nsSVGContainerFrame.cpp +++ b/layout/svg/nsSVGContainerFrame.cpp @@ -17,6 +17,7 @@ #include "SVGTextFrame.h" using namespace mozilla; +using namespace mozilla::image; NS_QUERYFRAME_HEAD(nsSVGContainerFrame) NS_QUERYFRAME_ENTRY(nsSVGContainerFrame) diff --git a/layout/svg/nsSVGFilterInstance.cpp b/layout/svg/nsSVGFilterInstance.cpp index 59b5a27ba..462c0098b 100644 --- a/layout/svg/nsSVGFilterInstance.cpp +++ b/layout/svg/nsSVGFilterInstance.cpp @@ -13,6 +13,7 @@ #include "mozilla/dom/HTMLCanvasElement.h" #include "mozilla/dom/SVGFilterElement.h" #include "nsReferencedElement.h" +#include "nsSVGEffects.h" #include "nsSVGFilterFrame.h" #include "nsSVGUtils.h" #include "SVGContentUtils.h" diff --git a/layout/svg/nsSVGIntegrationUtils.h b/layout/svg/nsSVGIntegrationUtils.h index e3eb3c5f2..471e3fb04 100644 --- a/layout/svg/nsSVGIntegrationUtils.h +++ b/layout/svg/nsSVGIntegrationUtils.h @@ -10,6 +10,7 @@ #include "gfxRect.h" #include "nsRegionFwd.h" #include "mozilla/gfx/Rect.h" +#include "imgIContainer.h" class gfxContext; class gfxDrawable; diff --git a/layout/svg/nsSVGMarkerFrame.cpp b/layout/svg/nsSVGMarkerFrame.cpp index 93b76b17f..af19cc025 100644 --- a/layout/svg/nsSVGMarkerFrame.cpp +++ b/layout/svg/nsSVGMarkerFrame.cpp @@ -15,6 +15,7 @@ using namespace mozilla::dom; using namespace mozilla::gfx; +using namespace mozilla::image; nsContainerFrame* NS_NewSVGMarkerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) diff --git a/layout/svg/nsSVGOuterSVGFrame.cpp b/layout/svg/nsSVGOuterSVGFrame.cpp index b1ee54eb9..306b3de7a 100644 --- a/layout/svg/nsSVGOuterSVGFrame.cpp +++ b/layout/svg/nsSVGOuterSVGFrame.cpp @@ -18,9 +18,12 @@ #include "mozilla/dom/SVGSVGElement.h" #include "mozilla/dom/SVGViewElement.h" #include "nsSubDocumentFrame.h" +#include "gfxMatrix.h" using namespace mozilla; using namespace mozilla::dom; +using namespace mozilla::gfx; +using namespace mozilla::image; //---------------------------------------------------------------------- // Implementation helpers diff --git a/layout/svg/nsSVGSwitchFrame.cpp b/layout/svg/nsSVGSwitchFrame.cpp index 26e77071b..e68043228 100644 --- a/layout/svg/nsSVGSwitchFrame.cpp +++ b/layout/svg/nsSVGSwitchFrame.cpp @@ -11,6 +11,7 @@ #include "nsSVGUtils.h" using namespace mozilla::gfx; +using namespace mozilla::image; class nsSVGSwitchFrame : public nsSVGGFrame { diff --git a/layout/svg/nsSVGUtils.cpp b/layout/svg/nsSVGUtils.cpp index c3394e292..103a4ce1a 100644 --- a/layout/svg/nsSVGUtils.cpp +++ b/layout/svg/nsSVGUtils.cpp @@ -58,6 +58,7 @@ using namespace mozilla; using namespace mozilla::dom; using namespace mozilla::gfx; +using namespace mozilla::image; static bool sSVGPathCachingEnabled; static bool sSVGDisplayListHitTestingEnabled; diff --git a/layout/tables/FixedTableLayoutStrategy.cpp b/layout/tables/FixedTableLayoutStrategy.cpp index 427765795..d69946a33 100644 --- a/layout/tables/FixedTableLayoutStrategy.cpp +++ b/layout/tables/FixedTableLayoutStrategy.cpp @@ -15,6 +15,10 @@ #include "nsTableCellFrame.h" #include <algorithm> +#include "mozilla/WritingModes.h" + +using namespace mozilla; + FixedTableLayoutStrategy::FixedTableLayoutStrategy(nsTableFrame *aTableFrame) : nsITableLayoutStrategy(nsITableLayoutStrategy::Fixed) , mTableFrame(aTableFrame) diff --git a/layout/tables/SpanningCellSorter.cpp b/layout/tables/SpanningCellSorter.cpp index c67d784bb..686b02d89 100644 --- a/layout/tables/SpanningCellSorter.cpp +++ b/layout/tables/SpanningCellSorter.cpp @@ -12,6 +12,8 @@ #include "nsQuickSort.h" #include "nsIPresShell.h" +using mozilla::fallible; + //#define DEBUG_SPANNING_CELL_SORTER SpanningCellSorter::SpanningCellSorter() diff --git a/layout/tables/moz.build b/layout/tables/moz.build index e28e21ee0..554ffebec 100644 --- a/layout/tables/moz.build +++ b/layout/tables/moz.build @@ -13,7 +13,7 @@ EXPORTS += [ 'nsITableCellLayout.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'BasicTableLayoutStrategy.cpp', 'FixedTableLayoutStrategy.cpp', 'nsCellMap.cpp', diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index e5a48139a..648fa7ddf 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -41,6 +41,7 @@ #include "nsCSSFrameConstructor.h" #include "mozilla/StyleSetHandle.h" #include "mozilla/StyleSetHandleInlines.h" +#include "mozilla/gfx/Helpers.h" #include "nsDisplayList.h" #include "nsIScrollableFrame.h" #include "nsCSSProps.h" @@ -48,6 +49,7 @@ #include <algorithm> using namespace mozilla; +using namespace mozilla::gfx; using namespace mozilla::image; using namespace mozilla::layout; diff --git a/layout/xul/ContainerBoxObject.h b/layout/xul/ContainerBoxObject.h index b3da97991..d9da164ea 100644 --- a/layout/xul/ContainerBoxObject.h +++ b/layout/xul/ContainerBoxObject.h @@ -8,6 +8,7 @@ #define mozilla_dom_ContainerBoxObject_h #include "mozilla/dom/BoxObject.h" +#include "nsIDocShell.h" namespace mozilla { namespace dom { diff --git a/layout/xul/grid/moz.build b/layout/xul/grid/moz.build index 074985aaf..049489ab2 100644 --- a/layout/xul/grid/moz.build +++ b/layout/xul/grid/moz.build @@ -19,7 +19,7 @@ EXPORTS += [ 'nsIGridPart.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsGrid.cpp', 'nsGridCell.cpp', 'nsGridLayout2.cpp', diff --git a/layout/xul/moz.build b/layout/xul/moz.build index 8ed304c9f..18b120b34 100644 --- a/layout/xul/moz.build +++ b/layout/xul/moz.build @@ -44,7 +44,7 @@ EXPORTS.mozilla.dom += [ 'ScrollBoxObject.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'BoxObject.cpp', 'nsBox.cpp', 'nsBoxFrame.cpp', @@ -64,7 +64,7 @@ UNIFIED_SOURCES += [ ] if CONFIG['MOZ_XUL']: - UNIFIED_SOURCES += [ + SOURCES += [ 'ContainerBoxObject.cpp', 'ListBoxObject.cpp', 'MenuBoxObject.cpp', diff --git a/layout/xul/nsButtonBoxFrame.cpp b/layout/xul/nsButtonBoxFrame.cpp index 45d934516..e69c91929 100644 --- a/layout/xul/nsButtonBoxFrame.cpp +++ b/layout/xul/nsButtonBoxFrame.cpp @@ -12,6 +12,7 @@ #include "nsPresContext.h" #include "nsIPresShell.h" #include "nsIDOMElement.h" +#include "nsIDOMEvent.h" #include "nsDisplayList.h" #include "nsContentUtils.h" #include "mozilla/dom/Element.h" diff --git a/layout/xul/nsMenuBarListener.cpp b/layout/xul/nsMenuBarListener.cpp index 0fce497b8..23df81937 100644 --- a/layout/xul/nsMenuBarListener.cpp +++ b/layout/xul/nsMenuBarListener.cpp @@ -21,6 +21,7 @@ #include "mozilla/BasicEvents.h" #include "mozilla/Preferences.h" #include "mozilla/TextEvents.h" +#include "mozilla/dom/Event.h" using namespace mozilla; diff --git a/layout/xul/nsMenuFrame.cpp b/layout/xul/nsMenuFrame.cpp index 67fcdbe43..cb12dfc0a 100644 --- a/layout/xul/nsMenuFrame.cpp +++ b/layout/xul/nsMenuFrame.cpp @@ -48,6 +48,7 @@ #include <algorithm> using namespace mozilla; +using namespace mozilla::dom; #define NS_MENU_POPUP_LIST_INDEX 0 diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp index 6e706e49c..3f934b208 100644 --- a/layout/xul/nsMenuPopupFrame.cpp +++ b/layout/xul/nsMenuPopupFrame.cpp @@ -18,6 +18,7 @@ #include "nsMenuBarFrame.h" #include "nsPopupSetFrame.h" #include "nsPIDOMWindow.h" +#include "nsIDOMEvent.h" #include "nsIDOMKeyEvent.h" #include "nsIDOMScreen.h" #include "nsIPresShell.h" @@ -45,6 +46,7 @@ #include "nsThemeConstants.h" #include "nsTransitionManager.h" #include "nsDisplayList.h" +#include "nsIDOMXULMenuListElement.h" #include "nsIDOMXULSelectCntrlItemEl.h" #include "mozilla/EventDispatcher.h" #include "mozilla/EventStateManager.h" @@ -53,6 +55,7 @@ #include "mozilla/LookAndFeel.h" #include "mozilla/MouseEvents.h" #include "mozilla/dom/Element.h" +#include "mozilla/dom/Event.h" #include "mozilla/dom/PopupBoxObject.h" #include <algorithm> diff --git a/layout/xul/nsResizerFrame.h b/layout/xul/nsResizerFrame.h index 92656bc76..41efa79a7 100644 --- a/layout/xul/nsResizerFrame.h +++ b/layout/xul/nsResizerFrame.h @@ -8,9 +8,12 @@ #include "mozilla/Attributes.h" #include "mozilla/EventForwards.h" #include "nsTitleBarFrame.h" +#include "Units.h" class nsIBaseWindow; +using namespace mozilla; + class nsResizerFrame : public nsTitleBarFrame { protected: diff --git a/layout/xul/tree/moz.build b/layout/xul/tree/moz.build index ccac5bde9..7d150881a 100644 --- a/layout/xul/tree/moz.build +++ b/layout/xul/tree/moz.build @@ -27,7 +27,7 @@ EXPORTS.mozilla.dom += [ 'TreeBoxObject.h' ] -UNIFIED_SOURCES += [ +SOURCES += [ 'nsTreeBodyFrame.cpp', 'nsTreeColFrame.cpp', 'nsTreeColumns.cpp', diff --git a/media/ffvpx/libavcodec/moz.build b/media/ffvpx/libavcodec/moz.build index 05217a6e4..210ea0ba8 100644 --- a/media/ffvpx/libavcodec/moz.build +++ b/media/ffvpx/libavcodec/moz.build @@ -67,6 +67,11 @@ SOURCES += [ SYMBOLS_FILE = 'avcodec.symbols' NO_VISIBILITY_FLAGS = True +# GCC 10 defaults -fno-common, we don't care to solve this "properly" yet +# so use GCC < 10 behavior. +if CONFIG['GNU_CC'] and CONFIG['CC_VERSION'] >= '10.0.0': + CFLAGS += ['-fcommon'] + USE_LIBS += [ 'mozavutil' ] diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 80379ffe7..ca96bcb07 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -1247,7 +1247,6 @@ pref("privacy.trackingprotection.pbmode.enabled", false); pref("dom.event.contextmenu.enabled", true); pref("dom.event.clipboardevents.enabled", true); -pref("dom.event.highrestimestamp.enabled", true); pref("dom.webcomponents.enabled", false); |