From fa45a3c67062f16d67af43098305af36949d4148 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 16 Mar 2018 14:29:15 +0100 Subject: [PATCH] Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan MozReview-Commit-ID: JwHh4bzxuTR --HG-- extra : rebase_source : 5f5e37517aa80c2e7b5933962178d761074886e7 --- accessible/base/nsAccessibilityService.cpp | 4 +- accessible/xpcom/xpcAccessibilityService.cpp | 6 +- dom/base/Link.cpp | 2 +- dom/base/nsDOMWindowUtils.cpp | 2 +- dom/base/nsGlobalWindowOuter.cpp | 2 +- dom/canvas/CanvasRenderingContext2D.cpp | 2 +- dom/canvas/CanvasRenderingContext2D.h | 2 +- dom/canvas/ImageBitmapRenderingContext.cpp | 2 +- dom/canvas/WebGLRenderbuffer.cpp | 2 +- dom/html/input/InputType.cpp | 2 +- dom/indexedDB/ActorsParent.cpp | 10 +-- dom/indexedDB/FileInfo.cpp | 2 +- dom/ipc/ColorPickerParent.cpp | 2 +- dom/ipc/TabChild.cpp | 2 +- dom/media/systemservices/CamerasChild.h | 8 +-- dom/media/systemservices/MediaParent.cpp | 2 +- dom/media/webaudio/blink/HRTFPanner.cpp | 2 +- .../synth/ipc/SpeechSynthesisChild.cpp | 2 +- .../PresentationConnectionList.cpp | 4 +- .../WebBrowserPersistRemoteDocument.cpp | 2 +- dom/xbl/nsBindingManager.cpp | 2 +- dom/xul/XULDocument.cpp | 2 +- editor/libeditor/HTMLAnonymousNodeEditor.cpp | 2 +- editor/libeditor/HTMLEditRules.cpp | 6 +- .../spellcheck/src/mozInlineSpellChecker.cpp | 2 +- extensions/spellcheck/src/mozSpellChecker.cpp | 2 +- gfx/gl/GLReadTexImageHelper.cpp | 2 +- gfx/ipc/SharedDIB.cpp | 2 +- gfx/src/nsFontMetrics.cpp | 2 +- ipc/glue/IPCStreamUtils.cpp | 8 +-- js/src/jsnum.cpp | 2 +- js/src/perf/jsperf.cpp | 2 +- js/src/vm/Runtime.cpp | 2 +- js/src/vm/TypedArrayObject.h | 2 +- js/xpconnect/loader/URLPreloader.h | 2 +- js/xpconnect/wrappers/XrayWrapper.cpp | 2 +- js/xpconnect/wrappers/XrayWrapper.h | 2 +- layout/base/AccessibleCaretEventHub.cpp | 30 ++++----- layout/base/PresShell.cpp | 2 +- layout/base/ServoRestyleManager.cpp | 2 +- layout/base/nsCounterManager.cpp | 4 +- layout/generic/nsGfxScrollFrame.cpp | 12 ++-- layout/generic/nsGridContainerFrame.cpp | 2 +- layout/generic/nsSimplePageSequenceFrame.cpp | 4 +- layout/mathml/nsMathMLContainerFrame.cpp | 2 +- layout/painting/ActiveLayerTracker.cpp | 2 +- layout/painting/FrameLayerBuilder.cpp | 2 +- layout/painting/nsCSSRenderingGradients.cpp | 12 ++-- layout/style/RuleProcessorCache.h | 2 +- layout/svg/SVGTextFrame.cpp | 61 ++++++++----------- layout/svg/nsSVGIntegrationUtils.cpp | 4 +- layout/xul/nsMenuPopupFrame.cpp | 14 ++--- layout/xul/nsSplitterFrame.cpp | 6 +- .../signaling/gtest/rtpsources_unittests.cpp | 6 +- .../signaling/src/jsep/JsepSessionImpl.cpp | 8 +-- netwerk/cache/nsCacheService.cpp | 2 +- rdf/base/nsRDFXMLSerializer.cpp | 8 +-- security/manager/ssl/PSMContentListener.cpp | 2 +- .../components/extensions/MatchPattern.cpp | 2 +- .../components/places/nsNavHistoryResult.cpp | 8 +-- .../printingui/ipc/PrintingParent.cpp | 4 +- .../linux/minidump_writer/minidump_writer.cc | 2 +- toolkit/profile/nsToolkitProfileService.cpp | 4 +- toolkit/xre/nsAppRunner.cpp | 2 +- toolkit/xre/nsConsoleWriter.cpp | 2 +- .../exthandler/ExternalHelperAppParent.cpp | 2 +- widget/nsBaseWidget.cpp | 2 +- 67 files changed, 155 insertions(+), 166 deletions(-) diff --git a/accessible/base/nsAccessibilityService.cpp b/accessible/base/nsAccessibilityService.cpp index a4de57ef2a20..03440474a74e 100644 --- a/accessible/base/nsAccessibilityService.cpp +++ b/accessible/base/nsAccessibilityService.cpp @@ -1765,7 +1765,7 @@ MaybeShutdownAccService(uint32_t aFormerConsumer) nsAccessibilityService* accService = nsAccessibilityService::gAccessibilityService; - if (!accService || accService->IsShutdown()) { + if (!accService || nsAccessibilityService::IsShutdown()) { return; } @@ -1863,7 +1863,7 @@ PrefChanged(const char* aPref, void* aClosure) if (ReadPlatformDisabledState() == ePlatformIsDisabled) { // Force shut down accessibility. nsAccessibilityService* accService = nsAccessibilityService::gAccessibilityService; - if (accService && !accService->IsShutdown()) { + if (accService && !nsAccessibilityService::IsShutdown()) { accService->Shutdown(); } } diff --git a/accessible/xpcom/xpcAccessibilityService.cpp b/accessible/xpcom/xpcAccessibilityService.cpp index 053524854ed8..17b8d1174188 100644 --- a/accessible/xpcom/xpcAccessibilityService.cpp +++ b/accessible/xpcom/xpcAccessibilityService.cpp @@ -39,7 +39,7 @@ xpcAccessibilityService::AddRef(void) { MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING(xpcAccessibilityService) MOZ_ASSERT(int32_t(mRefCnt) >= 0, "illegal refcnt"); - if (!mRefCnt.isThreadSafe) + if (!nsAutoRefCnt::isThreadSafe) NS_ASSERT_OWNINGTHREAD(xpcAccessibilityService); nsrefcnt count = ++mRefCnt; NS_LOG_ADDREF(this, count, "xpcAccessibilityService", sizeof(*this)); @@ -63,7 +63,7 @@ xpcAccessibilityService::Release(void) { MOZ_ASSERT(int32_t(mRefCnt) > 0, "dup release"); - if (!mRefCnt.isThreadSafe) { + if (!nsAutoRefCnt::isThreadSafe) { NS_ASSERT_OWNINGTHREAD(xpcAccessibilityService); } @@ -71,7 +71,7 @@ xpcAccessibilityService::Release(void) NS_LOG_RELEASE(this, count, "xpcAccessibilityService"); if (count == 0) { - if (!mRefCnt.isThreadSafe) { + if (!nsAutoRefCnt::isThreadSafe) { NS_ASSERT_OWNINGTHREAD(xpcAccessibilityService); } diff --git a/dom/base/Link.cpp b/dom/base/Link.cpp index 07483d951c4a..77f0531f90ec 100644 --- a/dom/base/Link.cpp +++ b/dom/base/Link.cpp @@ -184,7 +184,7 @@ Link::TryDNSPrefetchOrPreconnectOrPrefetchOrPreloadOrPrerender() nsCOMPtr uri(GetURI()); if (uri && mElement->OwnerDoc()) { mElement->OwnerDoc()->MaybePreconnect(uri, - mElement->AttrValueToCORSMode(mElement->GetParsedAttr(nsGkAtoms::crossorigin))); + Element::AttrValueToCORSMode(mElement->GetParsedAttr(nsGkAtoms::crossorigin))); return; } } diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index b0cb16dcb9fc..4c3718c74ea7 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -329,7 +329,7 @@ nsDOMWindowUtils::GetPhysicalMillimeterInCSSPixels(float* aPhysicalMillimeter) return NS_ERROR_NOT_AVAILABLE; } - *aPhysicalMillimeter = presContext->AppUnitsToFloatCSSPixels( + *aPhysicalMillimeter = nsPresContext::AppUnitsToFloatCSSPixels( presContext->PhysicalMillimetersToAppUnits(1)); return NS_OK; } diff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp index 75133a988893..d53669b94626 100644 --- a/dom/base/nsGlobalWindowOuter.cpp +++ b/dom/base/nsGlobalWindowOuter.cpp @@ -6149,7 +6149,7 @@ nsGlobalWindowOuter::EnterModalState() nsContentUtils::ContentIsCrossDocDescendantOf(mDoc, activeShell->GetDocument()))) { EventStateManager::ClearGlobalActiveContent(activeESM); - activeShell->SetCapturingContent(nullptr, 0); + nsIPresShell::SetCapturingContent(nullptr, 0); if (activeShell) { RefPtr frameSelection = activeShell->FrameSelection(); diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp index 91ad0b532057..ef3f868bdbf7 100644 --- a/dom/canvas/CanvasRenderingContext2D.cpp +++ b/dom/canvas/CanvasRenderingContext2D.cpp @@ -4042,7 +4042,7 @@ CanvasRenderingContext2D::SetFontInternal(const nsAString& aFont, // pixels to CSS pixels, to adjust for the difference in expectations from // other nsFontMetrics clients. resizedFont.size = - (fontStyle->mSize * c->AppUnitsPerDevPixel()) / c->AppUnitsPerCSSPixel(); + (fontStyle->mSize * c->AppUnitsPerDevPixel()) / nsPresContext::AppUnitsPerCSSPixel(); nsFontMetrics::Params params; params.language = fontStyle->mLanguage; diff --git a/dom/canvas/CanvasRenderingContext2D.h b/dom/canvas/CanvasRenderingContext2D.h index e34ffd3e6264..f39b43632169 100644 --- a/dom/canvas/CanvasRenderingContext2D.h +++ b/dom/canvas/CanvasRenderingContext2D.h @@ -1157,7 +1157,7 @@ protected: pc = ps->GetPresContext(); if (!pc) goto FINISH; devPixel = pc->AppUnitsPerDevPixel(); - cssPixel = pc->AppUnitsPerCSSPixel(); + cssPixel = nsPresContext::AppUnitsPerCSSPixel(); FINISH: if (aPerDevPixel) diff --git a/dom/canvas/ImageBitmapRenderingContext.cpp b/dom/canvas/ImageBitmapRenderingContext.cpp index 13512b775d43..fe42beb6b089 100644 --- a/dom/canvas/ImageBitmapRenderingContext.cpp +++ b/dom/canvas/ImageBitmapRenderingContext.cpp @@ -233,7 +233,7 @@ ImageBitmapRenderingContext::GetCanvasLayer(nsDisplayListBuilder* aBuilder, RefPtr imageContainer = imageLayer->GetContainer(); if (!imageContainer) { - imageContainer = aManager->CreateImageContainer(); + imageContainer = LayerManager::CreateImageContainer(); imageLayer->SetContainer(imageContainer); } diff --git a/dom/canvas/WebGLRenderbuffer.cpp b/dom/canvas/WebGLRenderbuffer.cpp index 20a72b80e310..bc4afdd40f1a 100644 --- a/dom/canvas/WebGLRenderbuffer.cpp +++ b/dom/canvas/WebGLRenderbuffer.cpp @@ -209,7 +209,7 @@ WebGLRenderbuffer::RenderbufferStorage(const char* funcName, uint32_t samples, const GLenum error = DoRenderbufferStorage(samples, usage, width, height); if (error) { - const char* errorName = mContext->ErrorName(error); + const char* errorName = WebGLContext::ErrorName(error); mContext->GenerateWarning("%s generated error %s", funcName, errorName); return; } diff --git a/dom/html/input/InputType.cpp b/dom/html/input/InputType.cpp index 1ffeca40e0f5..f63fa6d0faaf 100644 --- a/dom/html/input/InputType.cpp +++ b/dom/html/input/InputType.cpp @@ -451,7 +451,7 @@ bool InputType::ParseTime(const nsAString& aValue, uint32_t* aResult) const { // see comment in InputType::ParseDate(). - return mInputElement->ParseTime(aValue, aResult); + return mozilla::dom::HTMLInputElement::ParseTime(aValue, aResult); } bool diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp index ac217c710950..63cc740f01ae 100644 --- a/dom/indexedDB/ActorsParent.cpp +++ b/dom/indexedDB/ActorsParent.cpp @@ -9965,7 +9965,7 @@ SerializeStructuredCloneFiles( MOZ_ASSERT(fileId > 0); nsCOMPtr nativeFile = - fileManager->GetCheckedFileForId(directory, fileId); + mozilla::dom::indexedDB::FileManager::GetCheckedFileForId(directory, fileId); if (NS_WARN_IF(!nativeFile)) { IDB_REPORT_INTERNAL_ERR(); return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR; @@ -11507,7 +11507,7 @@ UpdateRefcountFunction::Reset() } } - nsCOMPtr file = aFileManager->GetFileForId(mDirectory, aId); + nsCOMPtr file = FileManager::GetFileForId(mDirectory, aId); if (NS_WARN_IF(!file)) { return NS_ERROR_FAILURE; } @@ -11537,7 +11537,7 @@ UpdateRefcountFunction::Reset() fileSize); } - file = aFileManager->GetFileForId(mJournalDirectory, aId); + file = FileManager::GetFileForId(mJournalDirectory, aId); if (NS_WARN_IF(!file)) { return NS_ERROR_FAILURE; } @@ -11665,7 +11665,7 @@ UpdateRefcountFunction::CreateJournals() int64_t id = mJournalsToCreateBeforeCommit[i]; nsCOMPtr file = - mFileManager->GetFileForId(journalDirectory, id); + FileManager::GetFileForId(journalDirectory, id); if (NS_WARN_IF(!file)) { return NS_ERROR_FAILURE; } @@ -11698,7 +11698,7 @@ UpdateRefcountFunction::RemoveJournals(const nsTArray& aJournals) for (uint32_t index = 0; index < aJournals.Length(); index++) { nsCOMPtr file = - mFileManager->GetFileForId(journalDirectory, aJournals[index]); + FileManager::GetFileForId(journalDirectory, aJournals[index]); if (NS_WARN_IF(!file)) { return NS_ERROR_FAILURE; } diff --git a/dom/indexedDB/FileInfo.cpp b/dom/indexedDB/FileInfo.cpp index 3a0e2c1d39f8..9b69a3b56bf7 100644 --- a/dom/indexedDB/FileInfo.cpp +++ b/dom/indexedDB/FileInfo.cpp @@ -263,7 +263,7 @@ FileInfo::GetFileForFileInfo(FileInfo* aFileInfo) return nullptr; } - nsCOMPtr file = fileManager->GetFileForId(directory, + nsCOMPtr file = FileManager::GetFileForId(directory, aFileInfo->Id()); if (NS_WARN_IF(!file)) { return nullptr; diff --git a/dom/ipc/ColorPickerParent.cpp b/dom/ipc/ColorPickerParent.cpp index a84cb29867bd..7a273a259bfd 100644 --- a/dom/ipc/ColorPickerParent.cpp +++ b/dom/ipc/ColorPickerParent.cpp @@ -31,7 +31,7 @@ NS_IMETHODIMP ColorPickerParent::ColorPickerShownCallback::Done(const nsAString& aColor) { if (mColorPickerParent) { - Unused << mColorPickerParent->Send__delete__(mColorPickerParent, + Unused << ColorPickerParent::Send__delete__(mColorPickerParent, nsString(aColor)); } return NS_OK; diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 332c97bbccbd..348cf9e45b0a 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -1724,7 +1724,7 @@ TabChild::HandleRealMouseButtonEvent(const WidgetMouseEvent& aEvent, InputAPZContext context(aGuid, aInputBlockId, nsEventStatus_eIgnore); if (pendingLayerization) { - context.SetPendingLayerization(); + InputAPZContext::SetPendingLayerization(); } WidgetMouseEvent localEvent(aEvent); diff --git a/dom/media/systemservices/CamerasChild.h b/dom/media/systemservices/CamerasChild.h index e6297bbfe385..6da32f1e843a 100644 --- a/dom/media/systemservices/CamerasChild.h +++ b/dom/media/systemservices/CamerasChild.h @@ -74,22 +74,22 @@ public: ~CamerasSingleton(); static OffTheBooksMutex& Mutex() { - return gTheInstance.get()->mCamerasMutex; + return Singleton::get()->mCamerasMutex; } static CamerasChild*& Child() { Mutex().AssertCurrentThreadOwns(); - return gTheInstance.get()->mCameras; + return Singleton::get()->mCameras; } static nsCOMPtr& Thread() { Mutex().AssertCurrentThreadOwns(); - return gTheInstance.get()->mCamerasChildThread; + return Singleton::get()->mCamerasChildThread; } static nsCOMPtr& FakeDeviceChangeEventThread() { Mutex().AssertCurrentThreadOwns(); - return gTheInstance.get()->mFakeDeviceChangeEventThread; + return Singleton::get()->mFakeDeviceChangeEventThread; } static bool InShutdown() { diff --git a/dom/media/systemservices/MediaParent.cpp b/dom/media/systemservices/MediaParent.cpp index 212b5bad3b8b..0da4c411a21c 100644 --- a/dom/media/systemservices/MediaParent.cpp +++ b/dom/media/systemservices/MediaParent.cpp @@ -72,7 +72,7 @@ class OriginKeyStore : public nsISupports OriginKey* key; if (!mKeys.Get(principalString, &key)) { nsCString salt; // Make a new one - nsresult rv = GenerateRandomName(salt, key->EncodedLength); + nsresult rv = GenerateRandomName(salt, OriginKey::EncodedLength); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } diff --git a/dom/media/webaudio/blink/HRTFPanner.cpp b/dom/media/webaudio/blink/HRTFPanner.cpp index 7a0ec6fa98a2..94b2d6b8d8e4 100644 --- a/dom/media/webaudio/blink/HRTFPanner.cpp +++ b/dom/media/webaudio/blink/HRTFPanner.cpp @@ -105,7 +105,7 @@ int HRTFPanner::calculateDesiredAzimuthIndexAndBlend(double azimuth, double& azi HRTFDatabase* database = m_databaseLoader->database(); MOZ_ASSERT(database); - int numberOfAzimuths = database->numberOfAzimuths(); + int numberOfAzimuths = HRTFDatabase::numberOfAzimuths(); const double angleBetweenAzimuths = 360.0 / numberOfAzimuths; // Calculate the azimuth index and the blend (0 -> 1) for interpolation. diff --git a/dom/media/webspeech/synth/ipc/SpeechSynthesisChild.cpp b/dom/media/webspeech/synth/ipc/SpeechSynthesisChild.cpp index 889a74f1817e..ce7cbdde024b 100644 --- a/dom/media/webspeech/synth/ipc/SpeechSynthesisChild.cpp +++ b/dom/media/webspeech/synth/ipc/SpeechSynthesisChild.cpp @@ -117,7 +117,7 @@ SpeechSynthesisRequestChild::RecvOnEnd(const bool& aIsError, mTask->DispatchEndImpl(aElapsedTime, aCharIndex); } - actor->Send__delete__(actor); + SpeechSynthesisRequestChild::Send__delete__(actor); return IPC_OK(); } diff --git a/dom/presentation/PresentationConnectionList.cpp b/dom/presentation/PresentationConnectionList.cpp index e4485346d3e7..858cb46feed6 100644 --- a/dom/presentation/PresentationConnectionList.cpp +++ b/dom/presentation/PresentationConnectionList.cpp @@ -93,7 +93,7 @@ PresentationConnectionList::FindConnectionById( } } - return mConnections.NoIndex; + return ConnectionArray::NoIndex; } void @@ -106,7 +106,7 @@ PresentationConnectionList::NotifyStateChange(const nsAString& aSessionId, } bool connectionFound = - FindConnectionById(aSessionId) != mConnections.NoIndex ? true : false; + FindConnectionById(aSessionId) != ConnectionArray::NoIndex ? true : false; PresentationConnectionListBinding::ClearCachedConnectionsValue(this); switch (aConnection->State()) { diff --git a/dom/webbrowserpersist/WebBrowserPersistRemoteDocument.cpp b/dom/webbrowserpersist/WebBrowserPersistRemoteDocument.cpp index c7dcca8619da..9ea3204c1278 100644 --- a/dom/webbrowserpersist/WebBrowserPersistRemoteDocument.cpp +++ b/dom/webbrowserpersist/WebBrowserPersistRemoteDocument.cpp @@ -28,7 +28,7 @@ WebBrowserPersistRemoteDocument WebBrowserPersistRemoteDocument::~WebBrowserPersistRemoteDocument() { if (mActor) { - Unused << mActor->Send__delete__(mActor); + Unused << WebBrowserPersistDocumentParent::Send__delete__(mActor); // That will call mActor->ActorDestroy, which calls this->ActorDestroy // (whether or not the IPC send succeeds). } diff --git a/dom/xbl/nsBindingManager.cpp b/dom/xbl/nsBindingManager.cpp index 9afe187d43e6..75fd37eaa4a9 100644 --- a/dom/xbl/nsBindingManager.cpp +++ b/dom/xbl/nsBindingManager.cpp @@ -335,7 +335,7 @@ nsBindingManager::RemoveFromAttachedQueue(nsXBLBinding* aBinding) // Don't remove items here as that could mess up an executing // ProcessAttachedQueue. Instead, null the entry in the queue. size_t index = mAttachedStack.IndexOf(aBinding); - if (index != mAttachedStack.NoIndex) { + if (index != nsBindingList::NoIndex) { mAttachedStack[index] = nullptr; } } diff --git a/dom/xul/XULDocument.cpp b/dom/xul/XULDocument.cpp index 18c1de9df0bd..5a419a4d1cd8 100644 --- a/dom/xul/XULDocument.cpp +++ b/dom/xul/XULDocument.cpp @@ -3346,7 +3346,7 @@ XULDocument::OverlayForwardReference::Resolve() return eResolve_Error; } - rv = mDocument->InsertElement(root, mOverlay, notify); + rv = XULDocument::InsertElement(root, mOverlay, notify); if (NS_FAILED(rv)) return eResolve_Error; target = mOverlay; diff --git a/editor/libeditor/HTMLAnonymousNodeEditor.cpp b/editor/libeditor/HTMLAnonymousNodeEditor.cpp index 328cf32b3184..a72246731568 100644 --- a/editor/libeditor/HTMLAnonymousNodeEditor.cpp +++ b/editor/libeditor/HTMLAnonymousNodeEditor.cpp @@ -215,7 +215,7 @@ HTMLEditor::CreateAnonymousElement(nsAtom* aTag, if (ServoStyleSet* styleSet = ps->StyleSet()->GetAsServo()) { // Sometimes editor likes to append anonymous content to elements // in display:none subtrees, so avoid styling in those cases. - if (styleSet->MayTraverseFrom(newContent)) { + if (ServoStyleSet::MayTraverseFrom(newContent)) { styleSet->StyleNewSubtree(newContent); } } diff --git a/editor/libeditor/HTMLEditRules.cpp b/editor/libeditor/HTMLEditRules.cpp index ae260734ab93..22555d1e3f83 100644 --- a/editor/libeditor/HTMLEditRules.cpp +++ b/editor/libeditor/HTMLEditRules.cpp @@ -1745,7 +1745,7 @@ HTMLEditRules::WillInsertBreak(Selection& aSelection, MOZ_ASSERT(atStartOfSelection.IsSetAndValid()); blockParent = - mHTMLEditor->GetBlock(*atStartOfSelection.GetContainer(), host); + HTMLEditor::GetBlock(*atStartOfSelection.GetContainer(), host); if (NS_WARN_IF(!blockParent)) { return NS_ERROR_UNEXPECTED; } @@ -2704,8 +2704,8 @@ HTMLEditRules::WillDeleteSelection(Selection* aSelection, // Figure out block parents NS_ENSURE_STATE(mHTMLEditor); - nsCOMPtr leftParent = mHTMLEditor->GetBlock(*startNode); - nsCOMPtr rightParent = mHTMLEditor->GetBlock(*endNode); + nsCOMPtr leftParent = HTMLEditor::GetBlock(*startNode); + nsCOMPtr rightParent = HTMLEditor::GetBlock(*endNode); // Are endpoint block parents the same? Use default deletion if (leftParent && leftParent == rightParent) { diff --git a/extensions/spellcheck/src/mozInlineSpellChecker.cpp b/extensions/spellcheck/src/mozInlineSpellChecker.cpp index 7a1db417e065..40b143540237 100644 --- a/extensions/spellcheck/src/mozInlineSpellChecker.cpp +++ b/extensions/spellcheck/src/mozInlineSpellChecker.cpp @@ -1497,7 +1497,7 @@ nsresult mozInlineSpellChecker::DoSpellCheck(mozInlineSpellWordUtil& aWordUtil, // check spelling and add to selection if misspelled bool isMisspelled; - aWordUtil.NormalizeWord(wordText); + mozInlineSpellWordUtil::NormalizeWord(wordText); nsresult rv = mSpellCheck->CheckCurrentWordNoSuggest(wordText, &isMisspelled); if (NS_FAILED(rv)) diff --git a/extensions/spellcheck/src/mozSpellChecker.cpp b/extensions/spellcheck/src/mozSpellChecker.cpp index c7e3f2cb41dc..ca6ff5cf804a 100644 --- a/extensions/spellcheck/src/mozSpellChecker.cpp +++ b/extensions/spellcheck/src/mozSpellChecker.cpp @@ -53,7 +53,7 @@ mozSpellChecker::~mozSpellChecker() if (mEngine) { MOZ_ASSERT(XRE_IsContentProcess()); - mEngine->Send__delete__(mEngine); + RemoteSpellcheckEngineChild::Send__delete__(mEngine); MOZ_ASSERT(!mEngine); } } diff --git a/gfx/gl/GLReadTexImageHelper.cpp b/gfx/gl/GLReadTexImageHelper.cpp index 92a8a59dcabf..49fd208758f1 100644 --- a/gfx/gl/GLReadTexImageHelper.cpp +++ b/gfx/gl/GLReadTexImageHelper.cpp @@ -152,7 +152,7 @@ GLReadTexImageHelper::DidGLErrorOccur(const char* str) GLenum error = mGL->fGetError(); if (error != LOCAL_GL_NO_ERROR) { printf_stderr("GL ERROR: %s (0x%04x) %s\n", - mGL->GLErrorToString(error), error, str); + GLContext::GLErrorToString(error), error, str); return true; } diff --git a/gfx/ipc/SharedDIB.cpp b/gfx/ipc/SharedDIB.cpp index e0bd29d74c59..ba9c38914f51 100644 --- a/gfx/ipc/SharedDIB.cpp +++ b/gfx/ipc/SharedDIB.cpp @@ -37,7 +37,7 @@ SharedDIB::IsValid() if (!mShMem) return false; - return mShMem->IsHandleValid(mShMem->handle()); + return base::SharedMemory::IsHandleValid(mShMem->handle()); } nsresult diff --git a/gfx/src/nsFontMetrics.cpp b/gfx/src/nsFontMetrics.cpp index f0f94d5fefad..4811e723c1c7 100644 --- a/gfx/src/nsFontMetrics.cpp +++ b/gfx/src/nsFontMetrics.cpp @@ -138,7 +138,7 @@ nsFontMetrics::nsFontMetrics(const nsFont& aFont, const Params& aParams, aFont.AddFontVariationsToStyle(&style); gfxFloat devToCssSize = gfxFloat(mP2A) / - gfxFloat(mDeviceContext->AppUnitsPerCSSPixel()); + gfxFloat(nsDeviceContext::AppUnitsPerCSSPixel()); mFontGroup = gfxPlatform::GetPlatform()-> CreateFontGroup(aFont.fontlist, &style, aParams.textPerf, aParams.userFontSet, devToCssSize); diff --git a/ipc/glue/IPCStreamUtils.cpp b/ipc/glue/IPCStreamUtils.cpp index 6e098709fbf5..fbecf7055c92 100644 --- a/ipc/glue/IPCStreamUtils.cpp +++ b/ipc/glue/IPCStreamUtils.cpp @@ -274,7 +274,7 @@ CleanupIPCStream(IPCStream& aValue, bool aConsumedByIPC, bool aDelayedStart) fdSetActor->ForgetFileDescriptors(fds); if (!aConsumedByIPC) { - Unused << fdSetActor->Send__delete__(fdSetActor); + Unused << FileDescriptorSetChild::Send__delete__(fdSetActor); } } else if (streamWithFds.optionalFds().type() == @@ -292,7 +292,7 @@ CleanupIPCStream(IPCStream& aValue, bool aConsumedByIPC, bool aDelayedStart) fdSetActor->ForgetFileDescriptors(fds); if (!aConsumedByIPC) { - Unused << fdSetActor->Send__delete__(fdSetActor); + Unused << FileDescriptorSetParent::Send__delete__(fdSetActor); } } @@ -400,7 +400,7 @@ DeserializeIPCStream(const IPCStream& aValue) fdSetActor->ForgetFileDescriptors(fds); MOZ_ASSERT(!fds.IsEmpty()); - if (!fdSetActor->Send__delete__(fdSetActor)) { + if (!FileDescriptorSetParent::Send__delete__(fdSetActor)) { // child process is gone, warn and allow actor to clean up normally NS_WARNING("Failed to delete fd set actor."); } @@ -414,7 +414,7 @@ DeserializeIPCStream(const IPCStream& aValue) fdSetActor->ForgetFileDescriptors(fds); MOZ_ASSERT(!fds.IsEmpty()); - Unused << fdSetActor->Send__delete__(fdSetActor); + Unused << FileDescriptorSetChild::Send__delete__(fdSetActor); } return InputStreamHelper::DeserializeInputStream(streamWithFds.stream(), fds); diff --git a/js/src/jsnum.cpp b/js/src/jsnum.cpp index 666a3bcc8722..11e750db6305 100644 --- a/js/src/jsnum.cpp +++ b/js/src/jsnum.cpp @@ -1305,7 +1305,7 @@ FracNumberToCString(JSContext* cx, ToCStringBuf* cbuf, double d, int base = 10) */ const double_conversion::DoubleToStringConverter& converter = double_conversion::DoubleToStringConverter::EcmaScriptConverter(); - double_conversion::StringBuilder builder(cbuf->sbuf, cbuf->sbufSize); + double_conversion::StringBuilder builder(cbuf->sbuf, js::ToCStringBuf::sbufSize); converter.ToShortest(d, &builder); numStr = builder.Finalize(); } else { diff --git a/js/src/perf/jsperf.cpp b/js/src/perf/jsperf.cpp index fa623cf18135..1b6e4451450e 100644 --- a/js/src/perf/jsperf.cpp +++ b/js/src/perf/jsperf.cpp @@ -94,7 +94,7 @@ pm_canMeasureSomething(JSContext* cx, unsigned argc, Value* vp) if (!p) return false; - args.rval().setBoolean(p->canMeasureSomething()); + args.rval().setBoolean(PerfMeasurement::canMeasureSomething()); return true; } diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index a8c3f460212f..16f5222c6319 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -598,7 +598,7 @@ JSContext::requestInterrupt(InterruptMode mode) // not regularly polled. Wake ilooping Ion code, irregexp JIT code and // Atomics.wait() interruptRegExpJit_ = true; - fx.lock(); + FutexThread::lock(); if (fx.isWaiting()) fx.wake(FutexThread::WakeForJSInterrupt); fx.unlock(); diff --git a/js/src/vm/TypedArrayObject.h b/js/src/vm/TypedArrayObject.h index 2c47333e1f32..4d9459020e7c 100644 --- a/js/src/vm/TypedArrayObject.h +++ b/js/src/vm/TypedArrayObject.h @@ -156,7 +156,7 @@ class TypedArrayObject : public NativeObject bool hasInlineElements() const; void setInlineElements(); uint8_t* elementsRaw() const { - return *(uint8_t **)((((char *)this) + this->dataOffset())); + return *(uint8_t **)((((char *)this) + js::TypedArrayObject::dataOffset())); } uint8_t* elements() const { assertZeroLengthArrayData(); diff --git a/js/xpconnect/loader/URLPreloader.h b/js/xpconnect/loader/URLPreloader.h index b804a7cc120d..e9284fe8f902 100644 --- a/js/xpconnect/loader/URLPreloader.h +++ b/js/xpconnect/loader/URLPreloader.h @@ -126,7 +126,7 @@ protected: MonitorAutoLock mal(reader.mMonitor); - while (!reader.mReaderInitialized && reader.sInitialized) { + while (!reader.mReaderInitialized && URLPreloader::sInitialized) { mal.Wait(); } } diff --git a/js/xpconnect/wrappers/XrayWrapper.cpp b/js/xpconnect/wrappers/XrayWrapper.cpp index eeac97b7c087..203846470168 100644 --- a/js/xpconnect/wrappers/XrayWrapper.cpp +++ b/js/xpconnect/wrappers/XrayWrapper.cpp @@ -958,7 +958,7 @@ JSXrayTraits::construct(JSContext* cx, HandleObject wrapper, if (!holder) return false; - if (self.getProtoKey(holder) == JSProto_Function) { + if (xpc::JSXrayTraits::getProtoKey(holder) == JSProto_Function) { JSProtoKey standardConstructor = constructorFor(holder); if (standardConstructor == JSProto_Null) return baseInstance.construct(cx, wrapper, args); diff --git a/js/xpconnect/wrappers/XrayWrapper.h b/js/xpconnect/wrappers/XrayWrapper.h index e543ace167ba..737791f98087 100644 --- a/js/xpconnect/wrappers/XrayWrapper.h +++ b/js/xpconnect/wrappers/XrayWrapper.h @@ -278,7 +278,7 @@ public: { JSXrayTraits& self = JSXrayTraits::singleton; JS::RootedObject holder(cx, self.ensureHolder(cx, wrapper)); - if (self.getProtoKey(holder) == JSProto_Function) + if (xpc::JSXrayTraits::getProtoKey(holder) == JSProto_Function) return baseInstance.call(cx, wrapper, args); JS::RootedValue v(cx, JS::ObjectValue(*wrapper)); diff --git a/layout/base/AccessibleCaretEventHub.cpp b/layout/base/AccessibleCaretEventHub.cpp index 7ff529a513f9..142b8e7e531d 100644 --- a/layout/base/AccessibleCaretEventHub.cpp +++ b/layout/base/AccessibleCaretEventHub.cpp @@ -53,10 +53,10 @@ public: nsEventStatus rv = nsEventStatus_eIgnore; if (NS_SUCCEEDED(aContext->mManager->PressCaret(aPoint, aEventClass))) { - aContext->SetState(aContext->PressCaretState()); + aContext->SetState(AccessibleCaretEventHub::PressCaretState()); rv = nsEventStatus_eConsumeNoDefault; } else { - aContext->SetState(aContext->PressNoCaretState()); + aContext->SetState(AccessibleCaretEventHub::PressNoCaretState()); } aContext->mPressPoint = aPoint; @@ -69,7 +69,7 @@ public: void OnScrollStart(AccessibleCaretEventHub* aContext) override { aContext->mManager->OnScrollStart(); - aContext->SetState(aContext->ScrollState()); + aContext->SetState(AccessibleCaretEventHub::ScrollState()); } MOZ_CAN_RUN_SCRIPT @@ -122,7 +122,7 @@ public: { if (aContext->MoveDistanceIsLarge(aPoint)) { if (NS_SUCCEEDED(aContext->mManager->DragCaret(aPoint))) { - aContext->SetState(aContext->DragCaretState()); + aContext->SetState(AccessibleCaretEventHub::DragCaretState()); } } @@ -134,7 +134,7 @@ public: { aContext->mManager->ReleaseCaret(); aContext->mManager->TapCaret(aContext->mPressPoint); - aContext->SetState(aContext->NoActionState()); + aContext->SetState(AccessibleCaretEventHub::NoActionState()); return nsEventStatus_eConsumeNoDefault; } @@ -168,7 +168,7 @@ public: nsEventStatus OnRelease(AccessibleCaretEventHub* aContext) override { aContext->mManager->ReleaseCaret(); - aContext->SetState(aContext->NoActionState()); + aContext->SetState(AccessibleCaretEventHub::NoActionState()); return nsEventStatus_eConsumeNoDefault; } @@ -187,7 +187,7 @@ public: const nsPoint& aPoint) override { if (aContext->MoveDistanceIsLarge(aPoint)) { - aContext->SetState(aContext->NoActionState()); + aContext->SetState(AccessibleCaretEventHub::NoActionState()); } return nsEventStatus_eIgnore; @@ -195,7 +195,7 @@ public: nsEventStatus OnRelease(AccessibleCaretEventHub* aContext) override { - aContext->SetState(aContext->NoActionState()); + aContext->SetState(AccessibleCaretEventHub::NoActionState()); return nsEventStatus_eIgnore; } @@ -204,7 +204,7 @@ public: nsEventStatus OnLongTap(AccessibleCaretEventHub* aContext, const nsPoint& aPoint) override { - aContext->SetState(aContext->LongTapState()); + aContext->SetState(AccessibleCaretEventHub::LongTapState()); return aContext->GetState()->OnLongTap(aContext, aPoint); } @@ -213,7 +213,7 @@ public: void OnScrollStart(AccessibleCaretEventHub* aContext) override { aContext->mManager->OnScrollStart(); - aContext->SetState(aContext->ScrollState()); + aContext->SetState(AccessibleCaretEventHub::ScrollState()); } MOZ_CAN_RUN_SCRIPT @@ -222,7 +222,7 @@ public: { aContext->mManager->OnBlur(); if (aIsLeavingDocument) { - aContext->SetState(aContext->NoActionState()); + aContext->SetState(AccessibleCaretEventHub::NoActionState()); } } @@ -265,7 +265,7 @@ public: void OnScrollEnd(AccessibleCaretEventHub* aContext) override { aContext->mManager->OnScrollEnd(); - aContext->SetState(aContext->NoActionState()); + aContext->SetState(AccessibleCaretEventHub::NoActionState()); } MOZ_CAN_RUN_SCRIPT @@ -280,7 +280,7 @@ public: { aContext->mManager->OnBlur(); if (aIsLeavingDocument) { - aContext->SetState(aContext->NoActionState()); + aContext->SetState(AccessibleCaretEventHub::NoActionState()); } } }; @@ -308,7 +308,7 @@ public: nsEventStatus OnRelease(AccessibleCaretEventHub* aContext) override { - aContext->SetState(aContext->NoActionState()); + aContext->SetState(AccessibleCaretEventHub::NoActionState()); // Do not consume the release since the press is not consumed in // PressNoCaretState either. @@ -319,7 +319,7 @@ public: void OnScrollStart(AccessibleCaretEventHub* aContext) override { aContext->mManager->OnScrollStart(); - aContext->SetState(aContext->ScrollState()); + aContext->SetState(AccessibleCaretEventHub::ScrollState()); } MOZ_CAN_RUN_SCRIPT diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp index a2ea73b30256..fb8e4e4bf110 100644 --- a/layout/base/PresShell.cpp +++ b/layout/base/PresShell.cpp @@ -8212,7 +8212,7 @@ PresShell::GetCurrentItemAndPositionForElement(nsIDOMElement *aCurrentEl, treeBox->GetFirstVisibleRow(&firstVisibleRow); treeBox->GetRowHeight(&rowHeight); - extraTreeY += presContext->CSSPixelsToAppUnits( + extraTreeY += nsPresContext::CSSPixelsToAppUnits( (currentIndex - firstVisibleRow + 1) * rowHeight); istree = true; diff --git a/layout/base/ServoRestyleManager.cpp b/layout/base/ServoRestyleManager.cpp index f2aa46a41479..7b2c73c4be88 100644 --- a/layout/base/ServoRestyleManager.cpp +++ b/layout/base/ServoRestyleManager.cpp @@ -601,7 +601,7 @@ UpdateBackdropIfNeeded(nsIFrame* aFrame, backdropFrame->GetParent()->IsCanvasFrame()); nsTArray wrappersToRestyle; ServoRestyleState state(aStyleSet, aChangeList, wrappersToRestyle); - aFrame->UpdateStyleOfOwnedChildFrame(backdropFrame, newContext, state); + nsIFrame::UpdateStyleOfOwnedChildFrame(backdropFrame, newContext, state); } static void diff --git a/layout/base/nsCounterManager.cpp b/layout/base/nsCounterManager.cpp index d41da0b2f49a..2c7d5983659e 100644 --- a/layout/base/nsCounterManager.cpp +++ b/layout/base/nsCounterManager.cpp @@ -53,7 +53,7 @@ nsCounterUseNode::Calc(nsCounterList* aList) { NS_ASSERTION(!aList->IsDirty(), "Why are we calculating with a dirty list?"); - mValueAfter = aList->ValueBefore(this); + mValueAfter = nsCounterList::ValueBefore(this); } // assign the correct |mValueAfter| value to a node that has been inserted @@ -66,7 +66,7 @@ nsCounterChangeNode::Calc(nsCounterList* aList) mValueAfter = mChangeValue; } else { NS_ASSERTION(mType == INCREMENT, "invalid type"); - mValueAfter = nsCounterManager::IncrementCounter(aList->ValueBefore(this), + mValueAfter = nsCounterManager::IncrementCounter(nsCounterList::ValueBefore(this), mChangeValue); } } diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index b969098632f3..9cca53488cb4 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -1089,8 +1089,8 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext, !oldScrolledAreaBounds.IsEqualEdges(newScrolledAreaBounds)) { if (!mHelper.mSuppressScrollbarUpdate) { mHelper.mSkippedScrollbarLayout = false; - mHelper.SetScrollbarVisibility(mHelper.mHScrollbarBox, state.mShowHScrollbar); - mHelper.SetScrollbarVisibility(mHelper.mVScrollbarBox, state.mShowVScrollbar); + ScrollFrameHelper::SetScrollbarVisibility(mHelper.mHScrollbarBox, state.mShowHScrollbar); + ScrollFrameHelper::SetScrollbarVisibility(mHelper.mVScrollbarBox, state.mShowVScrollbar); // place and reflow scrollbars nsRect insideBorderArea = nsRect(nsPoint(state.mComputedBorder.left, state.mComputedBorder.top), @@ -5042,7 +5042,7 @@ nsXULScrollFrame::AddRemoveScrollbar(nsBoxLayoutState& aState, nsSize hSize = mHelper.mHScrollbarBox->GetXULPrefSize(aState); nsBox::AddMargin(mHelper.mHScrollbarBox, hSize); - mHelper.SetScrollbarVisibility(mHelper.mHScrollbarBox, aAdd); + ScrollFrameHelper::SetScrollbarVisibility(mHelper.mHScrollbarBox, aAdd); // We can't directly pass mHasHorizontalScrollbar as the bool outparam for // AddRemoveScrollbar() because it's a bool:1 bitfield. Hence this var: @@ -5053,7 +5053,7 @@ nsXULScrollFrame::AddRemoveScrollbar(nsBoxLayoutState& aState, hSize.height, aOnRightOrBottom, aAdd); mHelper.mHasHorizontalScrollbar = hasHorizontalScrollbar; if (!fit) { - mHelper.SetScrollbarVisibility(mHelper.mHScrollbarBox, !aAdd); + ScrollFrameHelper::SetScrollbarVisibility(mHelper.mHScrollbarBox, !aAdd); } return fit; } else { @@ -5063,7 +5063,7 @@ nsXULScrollFrame::AddRemoveScrollbar(nsBoxLayoutState& aState, nsSize vSize = mHelper.mVScrollbarBox->GetXULPrefSize(aState); nsBox::AddMargin(mHelper.mVScrollbarBox, vSize); - mHelper.SetScrollbarVisibility(mHelper.mVScrollbarBox, aAdd); + ScrollFrameHelper::SetScrollbarVisibility(mHelper.mVScrollbarBox, aAdd); // We can't directly pass mHasVerticalScrollbar as the bool outparam for // AddRemoveScrollbar() because it's a bool:1 bitfield. Hence this var: @@ -5074,7 +5074,7 @@ nsXULScrollFrame::AddRemoveScrollbar(nsBoxLayoutState& aState, vSize.width, aOnRightOrBottom, aAdd); mHelper.mHasVerticalScrollbar = hasVerticalScrollbar; if (!fit) { - mHelper.SetScrollbarVisibility(mHelper.mVScrollbarBox, !aAdd); + ScrollFrameHelper::SetScrollbarVisibility(mHelper.mVScrollbarBox, !aAdd); } return fit; } diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp index 1876fc7c7e8a..913eed9ee3aa 100644 --- a/layout/generic/nsGridContainerFrame.cpp +++ b/layout/generic/nsGridContainerFrame.cpp @@ -3625,7 +3625,7 @@ MeasuringReflow(nsIFrame* aChild, const uint32_t flags = NS_FRAME_NO_MOVE_FRAME | NS_FRAME_NO_SIZE_VIEW; parent->ReflowChild(aChild, pc, childSize, childRI, wm, LogicalPoint(wm), nsSize(), flags, childStatus); - parent->FinishReflowChild(aChild, pc, childSize, &childRI, wm, + nsContainerFrame::FinishReflowChild(aChild, pc, childSize, &childRI, wm, LogicalPoint(wm), nsSize(), flags); #ifdef DEBUG parent->DeleteProperty(nsContainerFrame::DebugReflowingWithInfiniteISize()); diff --git a/layout/generic/nsSimplePageSequenceFrame.cpp b/layout/generic/nsSimplePageSequenceFrame.cpp index 8d93e4466a2a..875b28c3aad1 100644 --- a/layout/generic/nsSimplePageSequenceFrame.cpp +++ b/layout/generic/nsSimplePageSequenceFrame.cpp @@ -196,7 +196,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext, nsIntMargin marginTwips; mPageData->mPrintSettings->GetMarginInTwips(marginTwips); - mMargin = aPresContext->CSSTwipsToAppUnits(marginTwips + unwriteableTwips); + mMargin = nsPresContext::CSSTwipsToAppUnits(marginTwips + unwriteableTwips); int16_t printType; mPageData->mPrintSettings->GetPrintRange(&printType); @@ -213,7 +213,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext, edgeTwips.right = clamped(edgeTwips.right, 0, inchInTwips); mPageData->mEdgePaperMargin = - aPresContext->CSSTwipsToAppUnits(edgeTwips + unwriteableTwips); + nsPresContext::CSSTwipsToAppUnits(edgeTwips + unwriteableTwips); } // *** Special Override *** diff --git a/layout/mathml/nsMathMLContainerFrame.cpp b/layout/mathml/nsMathMLContainerFrame.cpp index bdccac6d33ce..6e99f90581a8 100644 --- a/layout/mathml/nsMathMLContainerFrame.cpp +++ b/layout/mathml/nsMathMLContainerFrame.cpp @@ -1368,7 +1368,7 @@ AddInterFrameSpacingToSize(ReflowOutput& aDesiredSize, parent, aFrame); // add our own italic correction nscoord leftCorrection = 0, italicCorrection = 0; - aFrame->GetItalicCorrection(aDesiredSize.mBoundingMetrics, + nsMathMLContainerFrame::GetItalicCorrection(aDesiredSize.mBoundingMetrics, leftCorrection, italicCorrection); gap += leftCorrection; if (gap) { diff --git a/layout/painting/ActiveLayerTracker.cpp b/layout/painting/ActiveLayerTracker.cpp index d2757625765d..4aa6b5e67805 100644 --- a/layout/painting/ActiveLayerTracker.cpp +++ b/layout/painting/ActiveLayerTracker.cpp @@ -267,7 +267,7 @@ IncrementScaleRestyleCountIfNeeded(nsIFrame* aFrame, LayerActivity* aActivity) aFrame->StyleContext(), presContext, dummy, refBox, - presContext->AppUnitsPerCSSPixel(), + nsPresContext::AppUnitsPerCSSPixel(), &dummyBool); Matrix transform2D; if (!transform.Is2D(&transform2D)) { diff --git a/layout/painting/FrameLayerBuilder.cpp b/layout/painting/FrameLayerBuilder.cpp index 95ecd1b3605f..389dcabc2ce1 100644 --- a/layout/painting/FrameLayerBuilder.cpp +++ b/layout/painting/FrameLayerBuilder.cpp @@ -1795,7 +1795,7 @@ public: already_AddRefed CreateImageAndImageContainer() { - RefPtr container = mLayerManager->CreateImageContainer(); + RefPtr container = LayerManager::CreateImageContainer(); RefPtr image = CreateImage(); if (!image) { diff --git a/layout/painting/nsCSSRenderingGradients.cpp b/layout/painting/nsCSSRenderingGradients.cpp index 5df785f1a369..0d41a74e6094 100644 --- a/layout/painting/nsCSSRenderingGradients.cpp +++ b/layout/painting/nsCSSRenderingGradients.cpp @@ -873,8 +873,8 @@ nsCSSGradientRenderer::Paint(gfxContext& aContext, // Use a pattern transform to take account of source and dest rects matrix.PreTranslate(gfxPoint(mPresContext->CSSPixelsToDevPixels(aSrc.x), mPresContext->CSSPixelsToDevPixels(aSrc.y))); - matrix.PreScale(gfxFloat(mPresContext->CSSPixelsToAppUnits(aSrc.width))/aDest.width, - gfxFloat(mPresContext->CSSPixelsToAppUnits(aSrc.height))/aDest.height); + matrix.PreScale(gfxFloat(nsPresContext::CSSPixelsToAppUnits(aSrc.width))/aDest.width, + gfxFloat(nsPresContext::CSSPixelsToAppUnits(aSrc.height))/aDest.height); gradientPattern->SetMatrix(matrix); if (stopDelta == 0.0) { @@ -1062,10 +1062,10 @@ nsCSSGradientRenderer::BuildWebRenderDisplayItems(wr::DisplayListBuilder& aBuild LayoutDeviceSize tileSpacing = tileRepeat - firstTileBounds.Size(); // srcTransform is used for scaling the gradient to match aSrc - LayoutDeviceRect srcTransform = LayoutDeviceRect(mPresContext->CSSPixelsToAppUnits(aSrc.x), - mPresContext->CSSPixelsToAppUnits(aSrc.y), - aDest.width / ((float)mPresContext->CSSPixelsToAppUnits(aSrc.width)), - aDest.height / ((float)mPresContext->CSSPixelsToAppUnits(aSrc.height))); + LayoutDeviceRect srcTransform = LayoutDeviceRect(nsPresContext::CSSPixelsToAppUnits(aSrc.x), + nsPresContext::CSSPixelsToAppUnits(aSrc.y), + aDest.width / ((float)nsPresContext::CSSPixelsToAppUnits(aSrc.width)), + aDest.height / ((float)nsPresContext::CSSPixelsToAppUnits(aSrc.height))); lineStart.x = (lineStart.x - srcTransform.x) * srcTransform.width; lineStart.y = (lineStart.y - srcTransform.y) * srcTransform.height; diff --git a/layout/style/RuleProcessorCache.h b/layout/style/RuleProcessorCache.h index 3854d449f4e9..c30413e969a1 100644 --- a/layout/style/RuleProcessorCache.h +++ b/layout/style/RuleProcessorCache.h @@ -79,7 +79,7 @@ private: void RemoveObjectIfTracked(nsCSSRuleProcessor* aRuleProcessor); virtual void NotifyExpired(nsCSSRuleProcessor* aRuleProcessor) override { - mCache->RemoveRuleProcessor(aRuleProcessor); + mozilla::RuleProcessorCache::RemoveRuleProcessor(aRuleProcessor); } private: diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp index 0c415eff7a64..a37da1f2dbc4 100644 --- a/layout/svg/SVGTextFrame.cpp +++ b/layout/svg/SVGTextFrame.cpp @@ -95,10 +95,10 @@ AppUnitsToGfxUnits(const nsPoint& aPoint, const nsPresContext* aContext) static gfxRect AppUnitsToFloatCSSPixels(const gfxRect& aRect, const nsPresContext* aContext) { - return gfxRect(aContext->AppUnitsToFloatCSSPixels(aRect.x), - aContext->AppUnitsToFloatCSSPixels(aRect.y), - aContext->AppUnitsToFloatCSSPixels(aRect.width), - aContext->AppUnitsToFloatCSSPixels(aRect.height)); + return gfxRect(nsPresContext::AppUnitsToFloatCSSPixels(aRect.x), + nsPresContext::AppUnitsToFloatCSSPixels(aRect.y), + nsPresContext::AppUnitsToFloatCSSPixels(aRect.width), + nsPresContext::AppUnitsToFloatCSSPixels(aRect.height)); } /** @@ -801,8 +801,7 @@ TextRenderedRun::GetTransformFromUserSpaceForPainting( return m; } - float cssPxPerDevPx = aContext-> - AppUnitsToFloatCSSPixels(aContext->AppUnitsPerDevPixel()); + float cssPxPerDevPx = nsPresContext::AppUnitsToFloatCSSPixels(aContext->AppUnitsPerDevPixel()); // Glyph position in user space. m.PreTranslate(mPosition / cssPxPerDevPx); @@ -842,8 +841,7 @@ TextRenderedRun::GetTransformFromRunUserSpaceToUserSpace( return m; } - float cssPxPerDevPx = aContext-> - AppUnitsToFloatCSSPixels(aContext->AppUnitsPerDevPixel()); + float cssPxPerDevPx = nsPresContext::AppUnitsToFloatCSSPixels(aContext->AppUnitsPerDevPixel()); nscoord start, end; GetClipEdges(start, end); @@ -890,7 +888,7 @@ TextRenderedRun::GetTransformFromRunUserSpaceToFrameUserSpace( // Translate by the horizontal distance into the text frame this // rendered run is. - gfxFloat appPerCssPx = aContext->AppUnitsPerCSSPixel(); + gfxFloat appPerCssPx = nsPresContext::AppUnitsPerCSSPixel(); gfxPoint t = IsVertical() ? gfxPoint(0, start / appPerCssPx) : gfxPoint(start / appPerCssPx, 0); return m.PreTranslate(t); @@ -973,8 +971,8 @@ TextRenderedRun::GetRunUserSpaceRect(nsPresContext* aContext, // it around the text's origin. ScaleAround(fill, textRun->IsVertical() - ? gfxPoint(aContext->AppUnitsToFloatCSSPixels(baseline), 0.0) - : gfxPoint(0.0, aContext->AppUnitsToFloatCSSPixels(baseline)), + ? gfxPoint(nsPresContext::AppUnitsToFloatCSSPixels(baseline), 0.0) + : gfxPoint(0.0, nsPresContext::AppUnitsToFloatCSSPixels(baseline)), 1.0 / mFontSizeScaleFactor); // Include the fill if requested. @@ -1097,8 +1095,7 @@ TextRenderedRun::GetCharNumAtPosition(nsPresContext* aContext, return -1; } - float cssPxPerDevPx = aContext-> - AppUnitsToFloatCSSPixels(aContext->AppUnitsPerDevPixel()); + float cssPxPerDevPx = nsPresContext::AppUnitsToFloatCSSPixels(aContext->AppUnitsPerDevPixel()); // Convert the point from user space into run user space, and take // into account any mFontSizeScaleFactor. @@ -2623,8 +2620,7 @@ CharIterator::GetGlyphAdvance(nsPresContext* aContext) const gfxSkipCharsIterator it = TextFrame()->EnsureTextRun(nsTextFrame::eInflated); Range range = ConvertOriginalToSkipped(it, offset, length); - float cssPxPerDevPx = aContext-> - AppUnitsToFloatCSSPixels(aContext->AppUnitsPerDevPixel()); + float cssPxPerDevPx = nsPresContext::AppUnitsToFloatCSSPixels(aContext->AppUnitsPerDevPixel()); gfxFloat advance = mTextRun->GetAdvanceWidth(range, nullptr); return aContext->AppUnitsToGfxUnits(advance) * @@ -2634,8 +2630,7 @@ CharIterator::GetGlyphAdvance(nsPresContext* aContext) const gfxFloat CharIterator::GetAdvance(nsPresContext* aContext) const { - float cssPxPerDevPx = aContext-> - AppUnitsToFloatCSSPixels(aContext->AppUnitsPerDevPixel()); + float cssPxPerDevPx = nsPresContext::AppUnitsToFloatCSSPixels(aContext->AppUnitsPerDevPixel()); uint32_t offset = mSkipCharsIterator.GetSkippedOffset(); gfxFloat advance = mTextRun-> @@ -2657,8 +2652,7 @@ CharIterator::GetGlyphPartialAdvance(uint32_t aPartLength, gfxSkipCharsIterator it = TextFrame()->EnsureTextRun(nsTextFrame::eInflated); Range range = ConvertOriginalToSkipped(it, offset, length); - float cssPxPerDevPx = aContext-> - AppUnitsToFloatCSSPixels(aContext->AppUnitsPerDevPixel()); + float cssPxPerDevPx = nsPresContext::AppUnitsToFloatCSSPixels(aContext->AppUnitsPerDevPixel()); gfxFloat advance = mTextRun->GetAdvanceWidth(range, nullptr); return aContext->AppUnitsToGfxUnits(advance) * @@ -3631,7 +3625,7 @@ SVGTextFrame::PaintSVG(gfxContext& aContext, // dev pixels. Here we multiply a CSS-px-to-dev-pixel factor onto aTransform // so our non-SVG nsTextFrame children paint correctly. auto auPerDevPx = presContext->AppUnitsPerDevPixel(); - float cssPxPerDevPx = presContext->AppUnitsToFloatCSSPixels(auPerDevPx); + float cssPxPerDevPx = nsPresContext::AppUnitsToFloatCSSPixels(auPerDevPx); gfxMatrix canvasTMForChildren = aTransform; canvasTMForChildren.PreScale(cssPxPerDevPx, cssPxPerDevPx); initialMatrix.PreScale(1 / cssPxPerDevPx, 1 / cssPxPerDevPx); @@ -3817,7 +3811,7 @@ SVGTextFrame::ReflowSVG() mRect.SetEmpty(); } else { mRect = - nsLayoutUtils::RoundGfxRectToAppRect(r.ToThebesRect(), presContext->AppUnitsPerCSSPixel()); + nsLayoutUtils::RoundGfxRectToAppRect(r.ToThebesRect(), nsPresContext::AppUnitsPerCSSPixel()); // Due to rounding issues when we have a transform applied, we sometimes // don't include an additional row of pixels. For now, just inflate our @@ -4183,8 +4177,7 @@ SVGTextFrame::GetSubStringLength(nsIContent* aContent, } nsPresContext* presContext = PresContext(); - float cssPxPerDevPx = presContext-> - AppUnitsToFloatCSSPixels(presContext->AppUnitsPerDevPixel()); + float cssPxPerDevPx = nsPresContext::AppUnitsToFloatCSSPixels(presContext->AppUnitsPerDevPixel()); *aResult = presContext->AppUnitsToGfxUnits(textLength) * cssPxPerDevPx / mFontSizeScaleFactor; @@ -4259,8 +4252,7 @@ SVGTextFrame::GetSubStringLengthSlowFallback(nsIContent* aContent, } nsPresContext* presContext = PresContext(); - float cssPxPerDevPx = presContext-> - AppUnitsToFloatCSSPixels(presContext->AppUnitsPerDevPixel()); + float cssPxPerDevPx = nsPresContext::AppUnitsToFloatCSSPixels(presContext->AppUnitsPerDevPixel()); *aResult = presContext->AppUnitsToGfxUnits(textLength) * cssPxPerDevPx / mFontSizeScaleFactor; @@ -4410,8 +4402,7 @@ SVGTextFrame::GetExtentOfChar(nsIContent* aContent, nsPresContext* presContext = PresContext(); - float cssPxPerDevPx = presContext-> - AppUnitsToFloatCSSPixels(presContext->AppUnitsPerDevPixel()); + float cssPxPerDevPx = nsPresContext::AppUnitsToFloatCSSPixels(presContext->AppUnitsPerDevPixel()); // We need to return the extent of the whole glyph. uint32_t startIndex = it.GlyphStartTextElementCharIndex(); @@ -5276,8 +5267,7 @@ SVGTextFrame::DoGlyphPositioning() nsPresContext* presContext = PresContext(); bool vertical = GetWritingMode().IsVertical(); - float cssPxPerDevPx = presContext-> - AppUnitsToFloatCSSPixels(presContext->AppUnitsPerDevPixel()); + float cssPxPerDevPx = nsPresContext::AppUnitsToFloatCSSPixels(presContext->AppUnitsPerDevPixel()); double factor = cssPxPerDevPx / mFontSizeScaleFactor; // Determine how much to compress or expand glyph positions due to @@ -5577,7 +5567,7 @@ SVGTextFrame::UpdateFontSizeScaleFactor() return mFontSizeScaleFactor != oldFontSizeScaleFactor; } - double minSize = presContext->AppUnitsToFloatCSSPixels(min); + double minSize = nsPresContext::AppUnitsToFloatCSSPixels(min); if (geometricPrecision) { // We want to ensure minSize is scaled to PRECISE_SIZE. @@ -5599,14 +5589,14 @@ SVGTextFrame::UpdateFontSizeScaleFactor() } mLastContextScale = contextScale; - double maxSize = presContext->AppUnitsToFloatCSSPixels(max); + double maxSize = nsPresContext::AppUnitsToFloatCSSPixels(max); // But we want to ignore any scaling required due to HiDPI displays, since // regular CSS text frames will still create text runs using the font size // in CSS pixels, and we want SVG text to have the same rendering as HTML // text for regular font sizes. float cssPxPerDevPx = - presContext->AppUnitsToFloatCSSPixels(presContext->AppUnitsPerDevPixel()); + nsPresContext::AppUnitsToFloatCSSPixels(presContext->AppUnitsPerDevPixel()); contextScale *= cssPxPerDevPx; double minTextRunSize = minSize * contextScale; @@ -5658,9 +5648,8 @@ SVGTextFrame::TransformFramePointToTextChild(const Point& aPoint, // Add in the mRect offset to aPoint, as that will have been taken into // account when transforming the point from the ancestor frame down // to this one. - float cssPxPerDevPx = presContext-> - AppUnitsToFloatCSSPixels(presContext->AppUnitsPerDevPixel()); - float factor = presContext->AppUnitsPerCSSPixel(); + float cssPxPerDevPx = nsPresContext::AppUnitsToFloatCSSPixels(presContext->AppUnitsPerDevPixel()); + float factor = nsPresContext::AppUnitsPerCSSPixel(); Point framePosition(NSAppUnitsToFloatPixels(mRect.x, factor), NSAppUnitsToFloatPixels(mRect.y, factor)); Point pointInUserSpace = aPoint * cssPxPerDevPx + framePosition; @@ -5767,7 +5756,7 @@ SVGTextFrame::TransformFrameRectFromTextChild(const nsRect& aRect, // Subtract the mRect offset from the result, as our user space for // this frame is relative to the top-left of mRect. - float factor = presContext->AppUnitsPerCSSPixel(); + float factor = nsPresContext::AppUnitsPerCSSPixel(); gfxPoint framePosition(NSAppUnitsToFloatPixels(mRect.x, factor), NSAppUnitsToFloatPixels(mRect.y, factor)); diff --git a/layout/svg/nsSVGIntegrationUtils.cpp b/layout/svg/nsSVGIntegrationUtils.cpp index 981912519faa..c2c00cba37e5 100644 --- a/layout/svg/nsSVGIntegrationUtils.cpp +++ b/layout/svg/nsSVGIntegrationUtils.cpp @@ -215,8 +215,8 @@ nsSVGIntegrationUtils::GetSVGCoordContextForNonSVGFrame(nsIFrame* aNonSVGFrame) nsLayoutUtils::FirstContinuationOrIBSplitSibling(aNonSVGFrame); nsRect r = nsLayoutUtils::GetAllInFlowRectsUnion(firstFrame, firstFrame); nsPresContext* presContext = firstFrame->PresContext(); - return gfx::Size(presContext->AppUnitsToFloatCSSPixels(r.width), - presContext->AppUnitsToFloatCSSPixels(r.height)); + return gfx::Size(nsPresContext::AppUnitsToFloatCSSPixels(r.width), + nsPresContext::AppUnitsToFloatCSSPixels(r.height)); } gfxRect diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp index b6b452896990..bf9c03c5ae6f 100644 --- a/layout/xul/nsMenuPopupFrame.cpp +++ b/layout/xul/nsMenuPopupFrame.cpp @@ -1438,7 +1438,7 @@ nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, bool aIsMove, bool aS // If anchored to a rectangle, use that rectangle. Otherwise, determine the // rectangle from the anchor. if (mAnchorType == MenuPopupAnchorType_Rect) { - anchorRect = ToAppUnits(mScreenRect, presContext->AppUnitsPerCSSPixel()); + anchorRect = ToAppUnits(mScreenRect, nsPresContext::AppUnitsPerCSSPixel()); } else { // if the frame is not specified, use the anchor node passed to OpenPopup. If @@ -1520,7 +1520,7 @@ nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, bool aIsMove, bool aS // mXPos and mYPos specify an additonal offset passed to OpenPopup that // should be added to the position. We also add the offset to the anchor // pos so a later flip/resize takes the offset into account. - nscoord anchorXOffset = presContext->CSSPixelsToAppUnits(mXPos); + nscoord anchorXOffset = nsPresContext::CSSPixelsToAppUnits(mXPos); if (IsDirectionRTL()) { screenPoint.x -= anchorXOffset; anchorRect.x -= anchorXOffset; @@ -1528,7 +1528,7 @@ nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, bool aIsMove, bool aS screenPoint.x += anchorXOffset; anchorRect.x += anchorXOffset; } - nscoord anchorYOffset = presContext->CSSPixelsToAppUnits(mYPos); + nscoord anchorYOffset = nsPresContext::CSSPixelsToAppUnits(mYPos); screenPoint.y += anchorYOffset; anchorRect.y += anchorYOffset; @@ -1542,8 +1542,8 @@ nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, bool aIsMove, bool aS // Account for the margin that will end up being added to the screen coordinate // the next time SetPopupPosition is called. mAnchorType = MenuPopupAnchorType_Point; - mScreenRect.x = presContext->AppUnitsToIntCSSPixels(screenPoint.x - margin.left); - mScreenRect.y = presContext->AppUnitsToIntCSSPixels(screenPoint.y - margin.top); + mScreenRect.x = nsPresContext::AppUnitsToIntCSSPixels(screenPoint.x - margin.left); + mScreenRect.y = nsPresContext::AppUnitsToIntCSSPixels(screenPoint.y - margin.top); } } else { @@ -2413,8 +2413,8 @@ nsMenuPopupFrame::MoveTo(const CSSIntPoint& aPos, bool aUpdateAttrs) nsPresContext* presContext = PresContext(); mAnchorType = MenuPopupAnchorType_Point; - mScreenRect.x = aPos.x - presContext->AppUnitsToIntCSSPixels(margin.left); - mScreenRect.y = aPos.y - presContext->AppUnitsToIntCSSPixels(margin.top); + mScreenRect.x = aPos.x - nsPresContext::AppUnitsToIntCSSPixels(margin.left); + mScreenRect.y = aPos.y - nsPresContext::AppUnitsToIntCSSPixels(margin.top); SetPopupPosition(nullptr, true, false, true); diff --git a/layout/xul/nsSplitterFrame.cpp b/layout/xul/nsSplitterFrame.cpp index 276b990f8b41..8f5ef88ca332 100644 --- a/layout/xul/nsSplitterFrame.cpp +++ b/layout/xul/nsSplitterFrame.cpp @@ -696,9 +696,9 @@ nsSplitterFrameInner::MouseDown(nsIDOMEvent* aMouseEvent) nsSize maxSize = nsBox::BoundsCheckMinMax(minSize, childBox->GetXULMaxSize(state)); prefSize = nsBox::BoundsCheck(minSize, prefSize, maxSize); - mOuter->AddMargin(childBox, minSize); - mOuter->AddMargin(childBox, prefSize); - mOuter->AddMargin(childBox, maxSize); + nsSplitterFrame::AddMargin(childBox, minSize); + nsSplitterFrame::AddMargin(childBox, prefSize); + nsSplitterFrame::AddMargin(childBox, maxSize); nscoord flex = childBox->GetXULFlex(); diff --git a/media/webrtc/signaling/gtest/rtpsources_unittests.cpp b/media/webrtc/signaling/gtest/rtpsources_unittests.cpp index b1ea8fc75db0..859af19c7dc2 100644 --- a/media/webrtc/signaling/gtest/rtpsources_unittests.cpp +++ b/media/webrtc/signaling/gtest/rtpsources_unittests.cpp @@ -112,7 +112,7 @@ public: // storage void TestAgeIntoLongTerm() { RtpSourceHistory history; - constexpr int64_t jitterWindow = history.kMinJitterWindow; + constexpr int64_t jitterWindow = RtpSourceHistory::kMinJitterWindow; constexpr int64_t jitter = jitterWindow / 2; constexpr int64_t timeNow0 = 100000; constexpr int64_t time0 = timeNow0; @@ -213,7 +213,7 @@ public: void TestSinglePrune() { RtpSourceHistory history; constexpr int64_t timeNow = 10000; - constexpr int64_t jitter = history.kMinJitterWindow / 2; + constexpr int64_t jitter = RtpSourceHistory::kMinJitterWindow / 2; const int64_t jitterAdjusted = timeNow + jitter; history.Insert(timeNow, jitterAdjusted, 0, false); @@ -349,4 +349,4 @@ TEST_F(RtpSourcesTest, TestObserveTwoCsrcs) { TestObserveTwoCsrcs(); } TEST_F(RtpSourcesTest, TestObserveCsrcWithAudioLevel) { TestObserveCsrcWithAudioLevel(); } -} \ No newline at end of file +} diff --git a/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp b/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp index 57b120e4bbb2..da47227c4802 100644 --- a/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp +++ b/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp @@ -201,7 +201,7 @@ JsepSessionImpl::CreateOfferMsection(const JsepOfferOptions& options, JsepTrack& recvTrack(transceiver.mRecvTrack); SdpMediaSection::Protocol protocol( - mSdpHelper.GetProtocolForMediaType(sendTrack.GetMediaType())); + SdpHelper::GetProtocolForMediaType(sendTrack.GetMediaType())); const Sdp* answer(GetAnswer()); const SdpMediaSection* lastAnswerMsection = nullptr; @@ -230,7 +230,7 @@ JsepSessionImpl::CreateOfferMsection(const JsepOfferOptions& options, } if (transceiver.IsStopped()) { - mSdpHelper.DisableMsection(local, msection); + SdpHelper::DisableMsection(local, msection); return NS_OK; } @@ -602,7 +602,7 @@ JsepSessionImpl::CreateAnswerMsection(const JsepAnswerOptions& options, if (mSdpHelper.MsectionIsDisabled(remoteMsection) || // JS might have stopped this transceiver.IsStopped()) { - mSdpHelper.DisableMsection(sdp, &msection); + SdpHelper::DisableMsection(sdp, &msection); return NS_OK; } @@ -624,7 +624,7 @@ JsepSessionImpl::CreateAnswerMsection(const JsepAnswerOptions& options, if (msection.GetFormats().empty()) { // Could not negotiate anything. Disable m-section. - mSdpHelper.DisableMsection(sdp, &msection); + SdpHelper::DisableMsection(sdp, &msection); } return NS_OK; diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp index 679a2a27af79..50eea5cbad7b 100644 --- a/netwerk/cache/nsCacheService.cpp +++ b/netwerk/cache/nsCacheService.cpp @@ -1432,7 +1432,7 @@ nsCacheService::IsStorageEnabledForPolicy(nsCacheStoragePolicy storagePolicy, if (gService == nullptr) return NS_ERROR_NOT_AVAILABLE; nsCacheServiceAutoLock lock(LOCK_TELEM(NSCACHESERVICE_ISSTORAGEENABLEDFORPOLICY)); - *result = gService->IsStorageEnabledForPolicy_Locked(storagePolicy); + *result = nsCacheService::IsStorageEnabledForPolicy_Locked(storagePolicy); return NS_OK; } diff --git a/rdf/base/nsRDFXMLSerializer.cpp b/rdf/base/nsRDFXMLSerializer.cpp index a69361618699..c93307c9da72 100644 --- a/rdf/base/nsRDFXMLSerializer.cpp +++ b/rdf/base/nsRDFXMLSerializer.cpp @@ -1018,7 +1018,7 @@ nsresult QNameCollector::Visit(nsIRDFNode* aSubject, nsIRDFResource* aPredicate, nsIRDFNode* aObject, bool aTruthValue) { - if (aPredicate == mParent->kRDF_type) { + if (aPredicate == nsRDFXMLSerializer::kRDF_type) { // try to get a type QName for aObject, should be a resource nsCOMPtr resType = do_QueryInterface(aObject); if (!resType) { @@ -1035,11 +1035,11 @@ QNameCollector::Visit(nsIRDFNode* aSubject, nsIRDFResource* aPredicate, if (mParent->mQNames.Get(aPredicate, nullptr)) { return NS_OK; } - if (aPredicate == mParent->kRDF_instanceOf || - aPredicate == mParent->kRDF_nextVal) + if (aPredicate == nsRDFXMLSerializer::kRDF_instanceOf || + aPredicate == nsRDFXMLSerializer::kRDF_nextVal) return NS_OK; bool isOrdinal = false; - mParent->gRDFC->IsOrdinalProperty(aPredicate, &isOrdinal); + nsRDFXMLSerializer::gRDFC->IsOrdinalProperty(aPredicate, &isOrdinal); if (isOrdinal) return NS_OK; diff --git a/security/manager/ssl/PSMContentListener.cpp b/security/manager/ssl/PSMContentListener.cpp index 4bb154e481a4..dde57ea8f032 100644 --- a/security/manager/ssl/PSMContentListener.cpp +++ b/security/manager/ssl/PSMContentListener.cpp @@ -271,7 +271,7 @@ PSMContentDownloaderParent::RecvDivertToParentUsing(mozilla::net::PChannelDivert MOZ_ASSERT(diverter); auto p = static_cast(diverter); p->DivertTo(this); - mozilla::Unused << p->Send__delete__(p); + mozilla::Unused << ChannelDiverterParent::Send__delete__(p); return IPC_OK(); } diff --git a/toolkit/components/extensions/MatchPattern.cpp b/toolkit/components/extensions/MatchPattern.cpp index 479e326e1f75..cd424ac5dd7f 100644 --- a/toolkit/components/extensions/MatchPattern.cpp +++ b/toolkit/components/extensions/MatchPattern.cpp @@ -100,7 +100,7 @@ void AtomSet::Remove(nsAtom* aAtom) { auto index = mElems.BinaryIndexOf(aAtom); - if (index != mElems.NoIndex) { + if (index != ArrayType::NoIndex) { mElems.RemoveElementAt(index); } } diff --git a/toolkit/components/places/nsNavHistoryResult.cpp b/toolkit/components/places/nsNavHistoryResult.cpp index 48283bb07f78..82e38e54c2d6 100644 --- a/toolkit/components/places/nsNavHistoryResult.cpp +++ b/toolkit/components/places/nsNavHistoryResult.cpp @@ -4155,7 +4155,7 @@ nsNavHistoryResult::AddHistoryObserver(nsNavHistoryQueryResultNode* aNode) // Don't add duplicate observers. In some case we don't unregister when // children are cleared (see ClearChildren) and the next FillChildren call // will try to add the observer again. - if (mHistoryObservers.IndexOf(aNode) == mHistoryObservers.NoIndex) { + if (mHistoryObservers.IndexOf(aNode) == QueryObserverList::NoIndex) { mHistoryObservers.AppendElement(aNode); } } @@ -4176,7 +4176,7 @@ nsNavHistoryResult::AddAllBookmarksObserver(nsNavHistoryQueryResultNode* aNode) // Don't add duplicate observers. In some case we don't unregister when // children are cleared (see ClearChildren) and the next FillChildren call // will try to add the observer again. - if (mAllBookmarksObservers.IndexOf(aNode) == mAllBookmarksObservers.NoIndex) { + if (mAllBookmarksObservers.IndexOf(aNode) == QueryObserverList::NoIndex) { mAllBookmarksObservers.AppendElement(aNode); } } @@ -4217,7 +4217,7 @@ nsNavHistoryResult::AddBookmarkFolderObserver(nsNavHistoryFolderResultNode* aNod // children are cleared (see ClearChildren) and the next FillChildren call // will try to add the observer again. FolderObserverList* list = BookmarkFolderObserversForId(aFolder, true); - if (list->IndexOf(aNode) == list->NoIndex) { + if (list->IndexOf(aNode) == FolderObserverList::NoIndex) { list->AppendElement(aNode); } } @@ -4390,7 +4390,7 @@ void nsNavHistoryResult::requestRefresh(nsNavHistoryContainerResultNode* aContainer) { // Don't add twice the same container. - if (mRefreshParticipants.IndexOf(aContainer) == mRefreshParticipants.NoIndex) + if (mRefreshParticipants.IndexOf(aContainer) == ContainerObserverList::NoIndex) mRefreshParticipants.AppendElement(aContainer); } diff --git a/toolkit/components/printingui/ipc/PrintingParent.cpp b/toolkit/components/printingui/ipc/PrintingParent.cpp index 7baa3f59390e..9ec3d72a963f 100644 --- a/toolkit/components/printingui/ipc/PrintingParent.cpp +++ b/toolkit/components/printingui/ipc/PrintingParent.cpp @@ -187,9 +187,9 @@ PrintingParent::RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog, // with an async message which frees the child process from // its nested event loop. if (NS_FAILED(rv)) { - mozilla::Unused << aDialog->Send__delete__(aDialog, rv); + mozilla::Unused << PPrintingParent::PPrintSettingsDialogParent::Send__delete__(aDialog, rv); } else { - mozilla::Unused << aDialog->Send__delete__(aDialog, resultData); + mozilla::Unused << PPrintingParent::PPrintSettingsDialogParent::Send__delete__(aDialog, resultData); } return IPC_OK(); } diff --git a/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc b/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc index 03d160838400..65720f501882 100644 --- a/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc +++ b/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc @@ -736,7 +736,7 @@ class MinidumpWriter { dso_count++; } - MDRVA linkmap_rva = minidump_writer_.kInvalidMDRVA; + MDRVA linkmap_rva = MinidumpFileWriter::kInvalidMDRVA; if (dso_count > 0) { // If we have at least one DSO, create an array of MDRawLinkMap // entries in the minidump file. diff --git a/toolkit/profile/nsToolkitProfileService.cpp b/toolkit/profile/nsToolkitProfileService.cpp index 5b8f880886dc..8060238f9f56 100644 --- a/toolkit/profile/nsToolkitProfileService.cpp +++ b/toolkit/profile/nsToolkitProfileService.cpp @@ -406,10 +406,10 @@ nsToolkitProfileService::Init() NS_ASSERTION(gDirServiceProvider, "No dirserviceprovider!"); nsresult rv; - rv = gDirServiceProvider->GetUserAppDataDirectory(getter_AddRefs(mAppData)); + rv = nsXREDirProvider::GetUserAppDataDirectory(getter_AddRefs(mAppData)); NS_ENSURE_SUCCESS(rv, rv); - rv = gDirServiceProvider->GetUserLocalDataDirectory(getter_AddRefs(mTempData)); + rv = nsXREDirProvider::GetUserLocalDataDirectory(getter_AddRefs(mTempData)); NS_ENSURE_SUCCESS(rv, rv); rv = mAppData->Clone(getter_AddRefs(mListFile)); diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 45dbd0a38493..53909eac89a9 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -3372,7 +3372,7 @@ XREMain::XRE_mainInit(bool* aExitFlag) NS_SUCCEEDED( CrashReporter::SetExceptionHandler(xreBinDirectory))) { nsCOMPtr file; - rv = mDirProvider.GetUserAppDataDirectory(getter_AddRefs(file)); + rv = nsXREDirProvider::GetUserAppDataDirectory(getter_AddRefs(file)); if (NS_SUCCEEDED(rv)) { CrashReporter::SetUserAppDataDirectory(file); } diff --git a/toolkit/xre/nsConsoleWriter.cpp b/toolkit/xre/nsConsoleWriter.cpp index 13ff717e9975..ffca032f2d93 100644 --- a/toolkit/xre/nsConsoleWriter.cpp +++ b/toolkit/xre/nsConsoleWriter.cpp @@ -34,7 +34,7 @@ WriteConsoleLog() if (!gLogConsoleErrors) return; - rv = gDirServiceProvider->GetUserAppDataDirectory(getter_AddRefs(lfile)); + rv = nsXREDirProvider::GetUserAppDataDirectory(getter_AddRefs(lfile)); if (NS_FAILED(rv)) return; diff --git a/uriloader/exthandler/ExternalHelperAppParent.cpp b/uriloader/exthandler/ExternalHelperAppParent.cpp index 5bd84d70e50b..a32b7abc3fcd 100644 --- a/uriloader/exthandler/ExternalHelperAppParent.cpp +++ b/uriloader/exthandler/ExternalHelperAppParent.cpp @@ -196,7 +196,7 @@ ExternalHelperAppParent::RecvDivertToParentUsing(PChannelDiverterParent* diverte #ifdef DEBUG mDiverted = true; #endif - Unused << p->Send__delete__(p); + Unused << ChannelDiverterParent::Send__delete__(p); return IPC_OK(); } diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp index 7447af5805d2..d0ee40552796 100644 --- a/widget/nsBaseWidget.cpp +++ b/widget/nsBaseWidget.cpp @@ -1079,7 +1079,7 @@ nsBaseWidget::ProcessUntransformedAPZEvent(WidgetInputEvent* aEvent, UniquePtr original(aEvent->Duplicate()); DispatchEvent(aEvent, status); - if (mAPZC && !context.WasRoutedToChildProcess() && aInputBlockId) { + if (mAPZC && !InputAPZContext::WasRoutedToChildProcess() && aInputBlockId) { // EventStateManager did not route the event into the child process. // It's safe to communicate to APZ that the event has been processed. // TODO: Eventually we'll be able to move the SendSetTargetAPZCNotification