import changes from `dev' branch of rmottola/Arctic-Fox:

- Bug 1153936 - nsIHttpChannelInteral attribute to opt out of alt-svc on per channel basis r=hurley (0e5667321)
- Bug 1137287 - Part 2: Send non-200/404 synthesized responses via the parent HTTP implementation for proper processing. r=mayhemer (3c38a1908)
- Bug 1137287 - Part 0: Test for synthesized redirects. r=jdm (6f12f95de)
- Bug 1137287 - Build fix. rs=KWierso for a CLOSED TREE (85694256a)
- Bug 1095098 - move do_QueryObject templates into their own header; r=froydnj (5d349c248)
- Bug 1095098 - followup - add back some static analysis attributes lost in a rebase; r=me (917a6b5da)
- Bug 1159303 - Reduce noise due to sort operations warnings. r=bent (cac3c3e12)
- Bug 1164559 - Part 1: Remove instances of #ifdef PR_LOGGING in storage. r=froydnj (5dd0f92b0)
- Bug 1164559 - Part 2: Wrap expensive calls in PR_LOG_TEST. r=froydnj (54e94d1ce)
- Bug 1148833 part 1 - Remove nsMathMLContainerFrame::WillReflow, reset the NS_MATHML_ERROR bit at the start of Reflow instead. r=roc (803abb8d9)
- Bug 1148833 part 2 - Makes sure gLogModule is initialized by calling GetLogModuleInfo(). r=roc (722e2019d)
- Bug 1148833 part 3 - Remove nsIFrame::WillReflow and add a non-virtual MarkInReflow method instead that sets NS_FRAME_IN_REFLOW. Call it at the start of Reflow(). r=roc (9cceb221d)
- Bug 1148833 part 4 - Fix indentation of some Reflow params (white-space changes only). (b2ba3e18a)
- Bug 1158546 - Remove nsDisplayHeaderFooter::mFrame in favor of nsDisplayItem::mFrame; r=roc (f6a20967f)
- Bug 1162673 - Part 1: Remove instances of #ifdef PR_LOGGING in layout. r=froydnj (453a452fc)
- Bug 1162673 - Part 2: Wrap expensive calls in PR_LOG_TEST. r=froydnj (d745eab19)
- Bug 1144031 - fix use of uninitialized variable, r=mcmanus (327dc1af9)
- Bug 1144270 : Update remaining callers of newChannel to newChannel2 in netwerk/ (r=mcmanus) (60c21d7cb)
- Bug 1161558 cleanup some nsIObserver shutdown paths r=bagder (eb8441bb9)
- Bug 1162336 - Part 1: Remove instances of #ifdef PR_LOGGING in netwerk. r=froydnj (8cadc40a2)
- Bug 1162336 - Part 2: Wrap expensive calls in PR_LOG_TEST. r=froydnj (4e26e4886)
- Bug 1163194 - Part 1: Remove instances of #ifdef PR_LOGGING in dom/xul. r=froydnj (4f840564b)
- Bug 1163194 - Part 2: Wrap expensive calls in PR_LOG_TEST. r=froydnj (653707f34)
- Bug 1153737: Avoid unnecessary uses of mozilla::pkix::ScopedPtr, r=keeler (fd9eb9aa2)
- Bug 1038072 - signature verification for JAR files unpacked into a directory. r=keeler (32469e1dd)
- Bug 1124076 - Properly detect certs when loaded and prompt to import them. r=sworkman/dkeeler (d860e3cac)
- Bug 1124076 followup - fix the build when PR_LOGGING is not defined. r=mrbkap (657b18bf2)
- Bug 1162691 - Part 1: Remove instances of #ifdef PR_LOGGING in security. r=froydnj (98a916e82)
- Bug 1162691 - Part 2: Wrap expensive calls in PR_LOG_TEST. r=froydnj (000c2fe42)
- bug 1147085 - remove nsINSSCertCache (replace it with nsIX509CertDB.getCerts()) r=Cykesiopka (88f7eba23)
- Bug 1149888 - Make PLDHashTable::mRecursionLevel atomic, r=froydnj. Pushing on CLOSED TREE with a=ryanvm. (25d8e2da1)
- Bug 1050035 (part 1, attempt 2) - Lazily allocate PLDHashTable::mEntryStore. r=froydnj. (195615f16)
- Bug 1159972 - Remove the fallible version of PL_DHashTableInit(). r=froydnj. (d31806eeb)
This commit is contained in:
2020-05-30 10:40:55 +08:00
parent 3dafb8d491
commit 212144c57f
308 changed files with 2261 additions and 1658 deletions
@@ -11,6 +11,7 @@
#include "nsIMutableArray.h"
#include "nsComponentManagerUtils.h"
#include "nsQueryObject.h"
using namespace mozilla;
using namespace mozilla::a11y;
+1
View File
@@ -17,6 +17,7 @@
#include "Role.h"
#include "States.h"
#include "XULTreeGridAccessible.h"
#include "nsQueryObject.h"
#include "nsComponentManagerUtils.h"
#include "nsIAccessibleRelation.h"
+1
View File
@@ -13,6 +13,7 @@
#include "Relation.h"
#include "Role.h"
#include "States.h"
#include "nsQueryObject.h"
#include "nsIBoxObject.h"
#include "nsIMutableArray.h"
+1
View File
@@ -15,6 +15,7 @@
#include "nsEscape.h"
#include "nsNetUtil.h"
#include "nsString.h"
#include "nsQueryObject.h"
#include "mozilla/CSSStyleSheet.h"
#include "mozilla/dom/URL.h"
+1
View File
@@ -14,6 +14,7 @@
#include "nsIDOMWindow.h"
#include "nsNetUtil.h"
#include "nsAutoPtr.h"
#include "nsQueryObject.h"
#include "nsIHttpChannel.h"
#include "nsIScriptSecurityManager.h"
#include "nsError.h"
+1
View File
@@ -59,6 +59,7 @@
#include "nsContentPolicyUtils.h" // NS_CheckContentLoadPolicy(...)
#include "nsISeekableStream.h"
#include "nsAutoPtr.h"
#include "nsQueryObject.h"
#include "nsIWritablePropertyBag2.h"
#include "nsIAppShell.h"
#include "nsWidgetsCID.h"
+1
View File
@@ -24,6 +24,7 @@
#include "nsFrame.h"
#include "mozilla/layers/ShadowLayers.h"
#include "ClientLayerManager.h"
#include "nsQueryObject.h"
#include "nsIScrollableFrame.h"
+1 -3
View File
@@ -35,6 +35,7 @@
#include "nsDocShell.h"
#include "nsIDocShellTreeItem.h"
#include "nsCOMArray.h"
#include "nsQueryObject.h"
#include "nsDOMClassInfo.h"
#include "mozilla/Services.h"
@@ -4027,9 +4028,6 @@ nsDocument::SetSubDocumentFor(Element* aElement, nsIDocument* aSubDoc)
};
mSubDocuments = PL_NewDHashTable(&hash_table_ops, sizeof(SubDocMapEntry));
if (!mSubDocuments) {
return NS_ERROR_OUT_OF_MEMORY;
}
}
// Add a mapping to the hash table
+1
View File
@@ -44,6 +44,7 @@
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
#include "nsPrintfCString.h"
#include "nsXULAppAPI.h"
#include "nsQueryObject.h"
#include <algorithm>
#ifdef ANDROID
+1
View File
@@ -122,6 +122,7 @@
#include "nsIControllerContext.h"
#include "nsGlobalWindowCommands.h"
#include "nsAutoPtr.h"
#include "nsQueryObject.h"
#include "nsContentUtils.h"
#include "nsCSSProps.h"
#include "nsIDOMFileList.h"
+7 -13
View File
@@ -323,21 +323,15 @@ nsScriptNameSpaceManager::Init()
GlobalNameHashInitEntry
};
mIsInitialized = PL_DHashTableInit(&mGlobalNames, &hash_table_ops,
sizeof(GlobalNameMapEntry),
fallible,
GLOBALNAME_HASHTABLE_INITIAL_LENGTH);
NS_ENSURE_TRUE(mIsInitialized, NS_ERROR_OUT_OF_MEMORY);
PL_DHashTableInit(&mGlobalNames, &hash_table_ops,
sizeof(GlobalNameMapEntry),
GLOBALNAME_HASHTABLE_INITIAL_LENGTH);
mIsInitialized = PL_DHashTableInit(&mNavigatorNames, &hash_table_ops,
sizeof(GlobalNameMapEntry),
fallible,
GLOBALNAME_HASHTABLE_INITIAL_LENGTH);
if (!mIsInitialized) {
PL_DHashTableFinish(&mGlobalNames);
PL_DHashTableInit(&mNavigatorNames, &hash_table_ops,
sizeof(GlobalNameMapEntry),
GLOBALNAME_HASHTABLE_INITIAL_LENGTH);
return NS_ERROR_OUT_OF_MEMORY;
}
mIsInitialized = true;
RegisterWeakMemoryReporter(this);
+1
View File
@@ -30,6 +30,7 @@
#include "nsUnicharInputStream.h"
#include "nsContentUtils.h"
#include "nsStyleUtil.h"
#include "nsQueryObject.h"
using namespace mozilla;
using namespace mozilla::dom;
+1
View File
@@ -23,6 +23,7 @@
#include "nsContentUtils.h"
#include "nsIParserUtils.h"
#include "nsIDocument.h"
#include "nsQueryObject.h"
using namespace mozilla;
+1
View File
@@ -15,6 +15,7 @@
#include "nsRadioInterfaceLayer.h" // For NS_RILCONTENTHELPER_CONTRACTID.
#include "nsServiceManagerUtils.h"
#include "nsString.h"
#include "nsQueryObject.h"
USING_BLUETOOTH_NAMESPACE
+1
View File
@@ -14,6 +14,7 @@
#include "nsRadioInterfaceLayer.h" // For NS_RILCONTENTHELPER_CONTRACTID.
#include "nsServiceManagerUtils.h"
#include "nsString.h"
#include "nsQueryObject.h"
USING_BLUETOOTH_NAMESPACE
+1
View File
@@ -23,6 +23,7 @@
#include "nsIAsyncInputStream.h"
#include "nsIAsyncOutputStream.h"
#include "nsIIPCSerializableInputStream.h"
#include "nsQueryObject.h"
#include "nsStreamUtils.h"
#include "nsString.h"
#include "nsURLParsers.h"
+1
View File
@@ -9,6 +9,7 @@
#include "CameraPreviewMediaStream.h"
#include "mozilla/dom/CameraManagerBinding.h"
#include "mozilla/dom/File.h"
#include "nsQueryObject.h"
using namespace mozilla;
using namespace mozilla::dom;
+1
View File
@@ -19,6 +19,7 @@
#include "CameraPreferences.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/PermissionMessageUtils.h"
#include "nsQueryObject.h"
using namespace mozilla;
using namespace mozilla::dom;
+1
View File
@@ -17,6 +17,7 @@
#include "nsIRunnable.h"
#include "nsISeekableStream.h"
#include "nsThreadUtils.h"
#include "nsQueryObject.h"
#ifdef DEBUG
#include "nsXULAppAPI.h"
+1
View File
@@ -9,6 +9,7 @@
#include "mozilla/dom/HTMLFieldSetElement.h"
#include "mozilla/dom/HTMLFieldSetElementBinding.h"
#include "nsContentList.h"
#include "nsQueryObject.h"
NS_IMPL_NS_NEW_HTML_ELEMENT(FieldSet)
+1
View File
@@ -30,6 +30,7 @@
#include "nsIMutableArray.h"
#include "nsIFormAutofillContentService.h"
#include "mozilla/BinarySearch.h"
#include "nsQueryObject.h"
// form submission
#include "mozilla/Telemetry.h"
+1
View File
@@ -12,6 +12,7 @@
#include "mozilla/dom/HTMLLabelElementBinding.h"
#include "nsFocusManager.h"
#include "nsIDOMMouseEvent.h"
#include "nsQueryObject.h"
// construction, destruction
+1
View File
@@ -35,6 +35,7 @@
#include "nsIThreadInternal.h"
#include "nsContentUtils.h"
#include "nsIRequest.h"
#include "nsQueryObject.h"
#include "nsIScriptSecurityManager.h"
#include "nsIXPConnect.h"
+1
View File
@@ -17,6 +17,7 @@
#include "nsAttrValueInlines.h"
#include "nsCOMPtr.h"
#include "nsIAtom.h"
#include "nsQueryObject.h"
#include "nsIContentInlines.h"
#include "nsIContentViewer.h"
#include "mozilla/css/StyleRule.h"
+1
View File
@@ -49,6 +49,7 @@
#include "nsThreadUtils.h"
#include "ProfilerHelpers.h"
#include "ReportInternalError.h"
#include "nsQueryObject.h"
// Include this last to avoid path problems on Windows.
#include "ActorsChild.h"
+1
View File
@@ -41,6 +41,7 @@
#include "mozilla/ipc/BackgroundChild.h"
#include "mozilla/ipc/PBackgroundSharedTypes.h"
#include "nsCOMPtr.h"
#include "nsQueryObject.h"
#include "ProfilerHelpers.h"
#include "ReportInternalError.h"
#include "WorkerPrivate.h"
+18
View File
@@ -36,6 +36,7 @@
#include "mozilla/dom/asmjscache/AsmJSCache.h"
#include "mozilla/dom/asmjscache/PAsmJSCacheEntryChild.h"
#include "mozilla/dom/nsIContentChild.h"
#include "mozilla/psm/PSMContentListener.h"
#include "mozilla/hal_sandbox/PHalChild.h"
#include "mozilla/ipc/BackgroundChild.h"
#include "mozilla/ipc/FileDescriptorSetChild.h"
@@ -199,6 +200,7 @@ using namespace mozilla::ipc;
using namespace mozilla::layers;
using namespace mozilla::net;
using namespace mozilla::jsipc;
using namespace mozilla::psm;
using namespace mozilla::widget;
#if defined(MOZ_WIDGET_GONK)
using namespace mozilla::system;
@@ -1641,6 +1643,22 @@ ContentChild::DeallocPScreenManagerChild(PScreenManagerChild* aService)
return true;
}
PPSMContentDownloaderChild*
ContentChild::AllocPPSMContentDownloaderChild(const uint32_t& aCertType)
{
// NB: We don't need aCertType in the child actor.
nsRefPtr<PSMContentDownloaderChild> child = new PSMContentDownloaderChild();
return child.forget().take();
}
bool
ContentChild::DeallocPPSMContentDownloaderChild(PPSMContentDownloaderChild* aListener)
{
auto* listener = static_cast<PSMContentDownloaderChild*>(aListener);
nsRefPtr<PSMContentDownloaderChild> child = dont_AddRef(listener);
return true;
}
PExternalHelperAppChild*
ContentChild::AllocPExternalHelperAppChild(const OptionalURIParams& uri,
const nsCString& aMimeContentType,
+4
View File
@@ -224,6 +224,10 @@ public:
bool* aSuccess) override;
virtual bool DeallocPScreenManagerChild(PScreenManagerChild*) override;
virtual PPSMContentDownloaderChild* AllocPPSMContentDownloaderChild(
const uint32_t& aCertType) override;
virtual bool DeallocPPSMContentDownloaderChild(PPSMContentDownloaderChild* aDownloader) override;
virtual PExternalHelperAppChild *AllocPExternalHelperAppChild(
const OptionalURIParams& uri,
const nsCString& aMimeContentType,
+18
View File
@@ -148,6 +148,7 @@
#include "prio.h"
#include "private/pprio.h"
#include "ContentProcessManager.h"
#include "mozilla/psm/PSMContentListener.h"
#include "nsIBidiKeyboard.h"
@@ -233,6 +234,7 @@ using namespace mozilla::ipc;
using namespace mozilla::layers;
using namespace mozilla::net;
using namespace mozilla::jsipc;
using namespace mozilla::psm;
using namespace mozilla::widget;
#ifdef ENABLE_TESTS
@@ -3442,6 +3444,22 @@ ContentParent::DeallocPScreenManagerParent(PScreenManagerParent* aActor)
return true;
}
PPSMContentDownloaderParent*
ContentParent::AllocPPSMContentDownloaderParent(const uint32_t& aCertType)
{
nsRefPtr<PSMContentDownloaderParent> downloader =
new PSMContentDownloaderParent(aCertType);
return downloader.forget().take();
}
bool
ContentParent::DeallocPPSMContentDownloaderParent(PPSMContentDownloaderParent* aListener)
{
auto* listener = static_cast<PSMContentDownloaderParent*>(aListener);
nsRefPtr<PSMContentDownloaderParent> downloader = dont_AddRef(listener);
return true;
}
PExternalHelperAppParent*
ContentParent::AllocPExternalHelperAppParent(const OptionalURIParams& uri,
const nsCString& aMimeContentType,
+4
View File
@@ -585,6 +585,10 @@ private:
virtual bool DeallocPNeckoParent(PNeckoParent* necko) override;
virtual PPSMContentDownloaderParent* AllocPPSMContentDownloaderParent(
const uint32_t& aCertType) override;
virtual bool DeallocPPSMContentDownloaderParent(PPSMContentDownloaderParent* aDownloader) override;
virtual PExternalHelperAppParent* AllocPExternalHelperAppParent(
const OptionalURIParams& aUri,
const nsCString& aMimeContentType,
+4
View File
@@ -14,6 +14,7 @@ include protocol PCompositor;
include protocol PContentBridge;
include protocol PCycleCollectWithLogs;
include protocol PDocAccessible;
include protocol PPSMContentDownloader;
include protocol PExternalHelperApp;
include protocol PDeviceStorageRequest;
include protocol PFileDescriptorSet;
@@ -382,6 +383,7 @@ prio(normal upto urgent) sync protocol PContent
manages PDocAccessible;
manages PDeviceStorageRequest;
manages PFileSystemRequest;
manages PPSMContentDownloader;
manages PExternalHelperApp;
manages PFileDescriptorSet;
manages PFMRadio;
@@ -745,6 +747,8 @@ parent:
CloseAlert(nsString name, Principal principal);
PPSMContentDownloader(uint32_t aCertType);
PExternalHelperApp(OptionalURIParams uri,
nsCString aMimeContentType,
nsCString aContentDisposition,
+1
View File
@@ -11,6 +11,7 @@
#include "nsIScriptGlobalObject.h"
#include "nsIPermissionManager.h"
#include "nsPIDOMWindow.h"
#include "nsQueryObject.h"
namespace mozilla {
namespace dom {
+1
View File
@@ -12,6 +12,7 @@
#include "nsIStringEnumerator.h"
#include "nsISupportsArray.h"
#include "nsJSUtils.h"
#include "nsQueryObject.h"
#include "nsPIDOMWindow.h"
#include "nsTArray.h"
#include "GetUserMediaRequest.h"
+1
View File
@@ -11,6 +11,7 @@
#include "nsGlobalWindow.h"
#include "mozilla/MediaManager.h"
#include "prlog.h"
#include "nsQueryObject.h"
#undef LOG
PRLogModuleInfo *gMediaChildLog;
@@ -21,6 +21,7 @@
#include "mozilla/dom/SpeechRecognitionEvent.h"
#include "nsIObserverService.h"
#include "nsServiceManagerUtils.h"
#include "nsQueryObject.h"
#include <algorithm>
+1
View File
@@ -72,6 +72,7 @@
#include "prprf.h"
#include "nsThreadUtils.h"
#include "nsIInputStreamTee.h"
#include "nsQueryObject.h"
#include "nsDirectoryServiceDefs.h"
#include "nsAppDirectoryServiceDefs.h"
+1
View File
@@ -10,6 +10,7 @@
#include "nsError.h"
#include "nsCOMPtr.h"
#include "nsSVGAttrTearoffTable.h"
#include "nsQueryObject.h"
#include <algorithm>
// See the architecture comment in this file's header.
+1
View File
@@ -45,6 +45,7 @@
#include "SVGAnimatedPathSegList.h"
#include "SVGContentUtils.h"
#include "nsIFrame.h"
#include "nsQueryObject.h"
#include <stdarg.h>
#include "nsSMILMappedAttribute.h"
#include "SVGMotionSMILAttr.h"
+1
View File
@@ -16,6 +16,7 @@
#include "nsStreamUtils.h"
#include "nsNetCID.h"
#include "nsSerializationHelper.h"
#include "nsQueryObject.h"
#include "mozilla/dom/FetchEventBinding.h"
#include "mozilla/dom/PromiseNativeHandler.h"
+1
View File
@@ -40,6 +40,7 @@
#include "nsGlobalWindow.h"
#include "nsNetUtil.h"
#include "nsProxyRelease.h"
#include "nsQueryObject.h"
#include "nsTArray.h"
#include "RuntimeService.h"
+1
View File
@@ -79,6 +79,7 @@
#include "nsNetUtil.h"
#include "nsPrintfCString.h"
#include "nsProxyRelease.h"
#include "nsQueryObject.h"
#include "nsSandboxFlags.h"
#include "prthread.h"
#include "xpcpublic.h"
@@ -46,6 +46,19 @@ fetchXHR('synthesized-headers.txt', function(xhr) {
finish();
});
fetch('synthesized-redirect-real-file.txt', function(xhr) {
dump("Got status AARRGH " + xhr.status + " " + xhr.responseText + "\n");
my_ok(xhr.status == 200, "load should be successful");
my_ok(xhr.responseText == "This is a real file.\n", "Redirect to real file should complete.");
finish();
});
fetch('synthesized-redirect-synthesized.txt', function(xhr) {
my_ok(xhr.status == 200, "load should be successful");
my_ok(xhr.responseText == "synthesized response body", "load should have synthesized response");
finish();
});
fetchXHR('ignored.txt', function(xhr) {
my_ok(xhr.status == 404, "load should be uninterrupted");
finish();
@@ -0,0 +1 @@
This is a real file.
@@ -27,6 +27,18 @@ onfetch = function(ev) {
ev.respondWith(new Response("test-respondwith-response response body", {}));
}
else if (ev.request.url.contains("synthesized-redirect-real-file.txt")) {
ev.respondWith(Promise.resolve(
Response.redirect("fetch/real-file.txt")
));
}
else if (ev.request.url.contains("synthesized-redirect-synthesized.txt")) {
ev.respondWith(Promise.resolve(
Response.redirect("synthesized.txt")
));
}
else if (ev.request.url.includes("ignored.txt")) {
}
@@ -27,6 +27,7 @@ support-files =
fetch/fetch_worker_script.js
fetch/fetch_tests.js
fetch/deliver-gzip.sjs
fetch/real-file.txt
fetch/context/index.html
fetch/context/register.html
fetch/context/unregister.html
+1
View File
@@ -6,6 +6,7 @@
#include "mozilla/ArrayUtils.h"
#include "nsCOMPtr.h"
#include "nsQueryObject.h"
#include "nsXBLPrototypeHandler.h"
#include "nsXBLPrototypeBinding.h"
#include "nsContentUtils.h"
-25
View File
@@ -375,7 +375,6 @@ XULDocument::StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
nsIStreamListener **aDocListener,
bool aReset, nsIContentSink* aSink)
{
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULLog, PR_LOG_WARNING)) {
nsCOMPtr<nsIURI> uri;
@@ -389,7 +388,6 @@ XULDocument::StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
}
}
}
#endif
// NOTE: If this ever starts calling nsDocument::StartDocumentLoad
// we'll possibly need to reset our content type afterwards.
mStillWalking = true;
@@ -561,7 +559,6 @@ XULDocument::EndLoad()
}
OnPrototypeLoadDone(true);
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULLog, PR_LOG_WARNING)) {
nsAutoCString urlspec;
rv = uri->GetSpec(urlspec);
@@ -570,7 +567,6 @@ XULDocument::EndLoad()
("xul: Finished loading document '%s'", urlspec.get()));
}
}
#endif
}
NS_IMETHODIMP
@@ -769,11 +765,6 @@ XULDocument::AddBroadcastListenerFor(Element& aBroadcaster, Element& aListener,
if (! mBroadcasterMap) {
mBroadcasterMap = PL_NewDHashTable(&gOps, sizeof(BroadcasterMapEntry));
if (! mBroadcasterMap) {
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
return;
}
}
BroadcasterMapEntry* entry =
@@ -1906,10 +1897,8 @@ XULDocument::Init()
Preferences::RegisterCallback(XULDocument::DirectionChanged,
"intl.uidirection.", this);
#ifdef PR_LOGGING
if (! gXULLog)
gXULLog = PR_NewLogModule("XULDocument");
#endif
return NS_OK;
}
@@ -2291,7 +2280,6 @@ XULDocument::PrepareToWalk()
nsXULPrototypeElement* proto = mCurrentPrototype->GetRootElement();
if (! proto) {
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULLog, PR_LOG_ERROR)) {
nsCOMPtr<nsIURI> url = mCurrentPrototype->GetURI();
@@ -2302,7 +2290,6 @@ XULDocument::PrepareToWalk()
PR_LOG(gXULLog, PR_LOG_ERROR,
("xul: error parsing '%s'", urlspec.get()));
}
#endif
return NS_OK;
}
@@ -2564,7 +2551,6 @@ XULDocument::LoadOverlayInternal(nsIURI* aURI, bool aIsDynamic,
*aShouldReturn = false;
*aFailureFromContent = false;
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULLog, PR_LOG_DEBUG)) {
nsAutoCString urlspec;
aURI->GetSpec(urlspec);
@@ -2579,7 +2565,6 @@ XULDocument::LoadOverlayInternal(nsIURI* aURI, bool aIsDynamic,
PR_LOG(gXULLog, PR_LOG_DEBUG,
("xul: %s loading overlay %s", parentDoc.get(), urlspec.get()));
}
#endif
if (aIsDynamic)
mResolutionPhase = nsForwardReference::eStart;
@@ -3602,13 +3587,11 @@ XULDocument::CreateElementFromPrototype(nsXULPrototypeElement* aPrototype,
*aResult = nullptr;
nsresult rv = NS_OK;
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULLog, PR_LOG_NOTICE)) {
PR_LOG(gXULLog, PR_LOG_NOTICE,
("xul: creating <%s> from prototype",
NS_ConvertUTF16toUTF8(aPrototype->mNodeInfo->QualifiedName()).get()));
}
#endif
nsRefPtr<Element> result;
@@ -3874,7 +3857,6 @@ XULDocument::OverlayForwardReference::Resolve()
if (NS_FAILED(rv)) return eResolve_Error;
}
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULLog, PR_LOG_NOTICE)) {
nsAutoCString idC;
idC.AssignWithConversion(id);
@@ -3882,7 +3864,6 @@ XULDocument::OverlayForwardReference::Resolve()
("xul: overlay resolved '%s'",
idC.get()));
}
#endif
mResolved = true;
return eResolve_Succeeded;
@@ -4045,7 +4026,6 @@ XULDocument::OverlayForwardReference::Merge(nsIContent* aTargetNode,
XULDocument::OverlayForwardReference::~OverlayForwardReference()
{
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULLog, PR_LOG_WARNING) && !mResolved) {
nsAutoString id;
mOverlay->GetAttr(kNameSpaceID_None, nsGkAtoms::id, id);
@@ -4066,7 +4046,6 @@ XULDocument::OverlayForwardReference::~OverlayForwardReference()
("xul: %s overlay failed to resolve '%s' in %s",
urlspec.get(), idC.get(), parentDoc.get()));
}
#endif
}
@@ -4090,7 +4069,6 @@ XULDocument::BroadcasterHookup::Resolve()
XULDocument::BroadcasterHookup::~BroadcasterHookup()
{
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULLog, PR_LOG_WARNING) && !mResolved) {
// Tell the world we failed
@@ -4115,7 +4093,6 @@ XULDocument::BroadcasterHookup::~BroadcasterHookup()
attributeC.get(),
broadcasteridC.get()));
}
#endif
}
@@ -4312,7 +4289,6 @@ XULDocument::CheckBroadcasterHookup(Element* aElement,
return domRv.ErrorCode();
}
#ifdef PR_LOGGING
// Tell the world we succeeded
if (PR_LOG_TEST(gXULLog, PR_LOG_NOTICE)) {
nsCOMPtr<nsIContent> content =
@@ -4331,7 +4307,6 @@ XULDocument::CheckBroadcasterHookup(Element* aElement,
attributeC.get(),
broadcasteridC.get()));
}
#endif
*aNeedsHookup = false;
*aDidResolve = true;
-4
View File
@@ -37,9 +37,7 @@
using namespace mozilla;
#ifdef PR_LOGGING
static PRLogModuleInfo* gCommandLog;
#endif
////////////////////////////////////////////////////////////////////////
@@ -47,10 +45,8 @@ nsXULCommandDispatcher::nsXULCommandDispatcher(nsIDocument* aDocument)
: mDocument(aDocument), mUpdaters(nullptr)
{
#ifdef PR_LOGGING
if (! gCommandLog)
gCommandLog = PR_NewLogModule("nsXULCommandDispatcher");
#endif
}
nsXULCommandDispatcher::~nsXULCommandDispatcher()
-10
View File
@@ -57,9 +57,7 @@
#include "nsIScriptError.h"
#include "nsContentTypeParser.h"
#ifdef PR_LOGGING
static PRLogModuleInfo* gContentSinkLog;
#endif
//----------------------------------------------------------------------
@@ -168,10 +166,8 @@ XULContentSinkImpl::XULContentSinkImpl()
mParser(nullptr)
{
#ifdef PR_LOGGING
if (! gContentSinkLog)
gContentSinkLog = PR_NewLogModule("nsXULContentSink");
#endif
}
@@ -765,7 +761,6 @@ XULContentSinkImpl::OpenRoot(const char16_t** aAttributes,
rv = CreateElement(aNodeInfo, &element);
if (NS_FAILED(rv)) {
#ifdef PR_LOGGING
if (PR_LOG_TEST(gContentSinkLog, PR_LOG_ERROR)) {
nsAutoString anodeC;
aNodeInfo->GetName(anodeC);
@@ -774,7 +769,6 @@ XULContentSinkImpl::OpenRoot(const char16_t** aAttributes,
NS_ConvertUTF16toUTF8(anodeC).get(),
-1)); // XXX pass in line number
}
#endif
return rv;
}
@@ -808,7 +802,6 @@ XULContentSinkImpl::OpenTag(const char16_t** aAttributes,
rv = CreateElement(aNodeInfo, &element);
if (NS_FAILED(rv)) {
#ifdef PR_LOGGING
if (PR_LOG_TEST(gContentSinkLog, PR_LOG_ERROR)) {
nsAutoString anodeC;
aNodeInfo->GetName(anodeC);
@@ -817,7 +810,6 @@ XULContentSinkImpl::OpenTag(const char16_t** aAttributes,
NS_ConvertUTF16toUTF8(anodeC).get(),
aLineNumber));
}
#endif
return rv;
}
@@ -1028,7 +1020,6 @@ XULContentSinkImpl::AddAttributes(const char16_t** aAttributes,
mDocumentURL);
NS_ENSURE_SUCCESS(rv, rv);
#ifdef PR_LOGGING
if (PR_LOG_TEST(gContentSinkLog, PR_LOG_DEBUG)) {
nsAutoString extraWhiteSpace;
int32_t cnt = mContextStack.Depth();
@@ -1044,7 +1035,6 @@ XULContentSinkImpl::AddAttributes(const char16_t** aAttributes,
NS_ConvertUTF16toUTF8(qnameC).get(),
NS_ConvertUTF16toUTF8(valueC).get()));
}
#endif
}
return NS_OK;
+1
View File
@@ -93,6 +93,7 @@
#include "nsAttrValueInlines.h"
#include "mozilla/Attributes.h"
#include "nsIController.h"
#include "nsQueryObject.h"
#include <algorithm>
// The XUL doc interface
-4
View File
@@ -13,9 +13,7 @@
#include "nsXULTemplateQueryProcessorRDF.h"
#include "prlog.h"
#ifdef PR_LOGGING
extern PRLogModuleInfo* gXULTemplateLog;
#endif
nsContentTestNode::nsContentTestNode(nsXULTemplateQueryProcessorRDF* aProcessor,
nsIAtom* aRefVariable)
@@ -25,7 +23,6 @@ nsContentTestNode::nsContentTestNode(nsXULTemplateQueryProcessorRDF* aProcessor,
mRefVariable(aRefVariable),
mTag(nullptr)
{
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString tag(NS_LITERAL_STRING("(none)"));
if (mTag)
@@ -40,7 +37,6 @@ nsContentTestNode::nsContentTestNode(nsXULTemplateQueryProcessorRDF* aProcessor,
this, NS_ConvertUTF16toUTF8(refvar).get(),
NS_ConvertUTF16toUTF8(tag).get()));
}
#endif
}
nsresult
@@ -8,19 +8,15 @@
#include "nsXULTemplateQueryProcessorRDF.h"
#include "prlog.h"
#ifdef PR_LOGGING
extern PRLogModuleInfo* gXULTemplateLog;
#endif
nsInstantiationNode::nsInstantiationNode(nsXULTemplateQueryProcessorRDF* aProcessor,
nsRDFQuery* aQuery)
: mProcessor(aProcessor),
mQuery(aQuery)
{
#ifdef PR_LOGGING
PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
("nsInstantiationNode[%p] query=%p", this, aQuery));
#endif
MOZ_COUNT_CTOR(nsInstantiationNode);
}
@@ -12,7 +12,6 @@
#include "nsResourceSet.h"
#include "prlog.h"
#ifdef PR_LOGGING
#include "nsXULContentUtils.h"
extern PRLogModuleInfo* gXULTemplateLog;
@@ -25,7 +24,6 @@ TestToString(nsRDFConInstanceTestNode::Test aTest) {
}
return "?";
}
#endif
nsRDFConInstanceTestNode::nsRDFConInstanceTestNode(TestNode* aParent,
nsXULTemplateQueryProcessorRDF* aProcessor,
@@ -38,7 +36,6 @@ nsRDFConInstanceTestNode::nsRDFConInstanceTestNode(TestNode* aParent,
mContainer(aContainer),
mEmpty(aEmpty)
{
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoCString props;
@@ -70,7 +67,6 @@ nsRDFConInstanceTestNode::nsRDFConInstanceTestNode(TestNode* aParent,
TestToString(aContainer),
TestToString(aEmpty)));
}
#endif
}
nsresult
@@ -104,7 +100,6 @@ nsRDFConInstanceTestNode::FilterInstantiations(InstantiationSet& aInstantiations
continue;
}
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* container = "(unbound)";
valueres->GetValueConst(&container);
@@ -113,7 +108,6 @@ nsRDFConInstanceTestNode::FilterInstantiations(InstantiationSet& aInstantiations
("nsRDFConInstanceTestNode[%p]::FilterInstantiations() container=[%s]",
this, container));
}
#endif
nsCOMPtr<nsIRDFContainer> rdfcontainer;
@@ -251,7 +245,6 @@ nsRDFConInstanceTestNode::CanPropagate(nsIRDFResource* aSource,
canpropagate = mProcessor->ContainmentProperties().Contains(aProperty);
}
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* source;
aSource->GetValueConst(&source);
@@ -267,7 +260,6 @@ nsRDFConInstanceTestNode::CanPropagate(nsIRDFResource* aSource,
this, source, property, NS_ConvertUTF16toUTF8(target).get(),
canpropagate ? "true" : "false"));
}
#endif
if (canpropagate) {
aInitialBindings.AddAssignment(mContainerVariable, aSource);
@@ -13,9 +13,7 @@
#include "nsXULContentUtils.h"
#include "prlog.h"
#ifdef PR_LOGGING
extern PRLogModuleInfo* gXULTemplateLog;
#endif
nsRDFConMemberTestNode::nsRDFConMemberTestNode(TestNode* aParent,
nsXULTemplateQueryProcessorRDF* aProcessor,
@@ -26,7 +24,6 @@ nsRDFConMemberTestNode::nsRDFConMemberTestNode(TestNode* aParent,
mContainerVariable(aContainerVariable),
mMemberVariable(aMemberVariable)
{
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoCString props;
@@ -61,7 +58,6 @@ nsRDFConMemberTestNode::nsRDFConMemberTestNode(TestNode* aParent,
NS_ConvertUTF16toUTF8(cvar).get(),
NS_ConvertUTF16toUTF8(mvar).get()));
}
#endif
}
nsresult
@@ -115,7 +111,6 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
hasMemberBinding = inst->mAssignments.GetAssignmentFor(mMemberVariable,
getter_AddRefs(memberValue));
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* container = "(unbound)";
if (hasContainerBinding)
@@ -129,7 +124,6 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
("nsRDFConMemberTestNode[%p]: FilterInstantiations() container=[%s] member=[%s]",
this, container, NS_ConvertUTF16toUTF8(member).get()));
}
#endif
if (hasContainerBinding && hasMemberBinding) {
// it's a consistency check. see if we have a assignment that is consistent
@@ -221,7 +215,6 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
if (! node)
return NS_ERROR_UNEXPECTED;
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString member;
nsXULContentUtils::GetTextForNode(node, member);
@@ -229,7 +222,6 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
(" member => %s", NS_ConvertUTF16toUTF8(member).get()));
}
#endif
Instantiation newinst = *inst;
newinst.AddAssignment(mMemberVariable, node);
@@ -310,7 +302,6 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
if (! source)
return NS_ERROR_UNEXPECTED;
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* container;
source->GetValueConst(&container);
@@ -318,7 +309,6 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
(" container => %s", container));
}
#endif
// Add a new instantiation
Instantiation newinst = *inst;
@@ -382,7 +372,6 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
NS_ASSERTION(value != nullptr, "member is not an nsIRDFNode");
if (! value) continue;
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString s;
nsXULContentUtils::GetTextForNode(value, s);
@@ -390,7 +379,6 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
(" member => %s", NS_ConvertUTF16toUTF8(s).get()));
}
#endif
}
else {
variable = mContainerVariable;
@@ -401,7 +389,6 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
value = valueRes;
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* s;
valueRes->GetValueConst(&s);
@@ -409,7 +396,6 @@ nsRDFConMemberTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
(" container => %s", s));
}
#endif
}
// Copy the original instantiation, and add it to the
@@ -480,7 +466,6 @@ nsRDFConMemberTestNode::CanPropagate(nsIRDFResource* aSource,
canpropagate = mProcessor->ContainmentProperties().Contains(aProperty);
}
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* source;
aSource->GetValueConst(&source);
@@ -496,7 +481,6 @@ nsRDFConMemberTestNode::CanPropagate(nsIRDFResource* aSource,
this, source, property, NS_ConvertUTF16toUTF8(target).get(),
canpropagate ? "true" : "false"));
}
#endif
if (canpropagate) {
aInitialBindings.AddAssignment(mContainerVariable, aSource);
@@ -8,10 +8,8 @@
#include "nsXULContentUtils.h"
#include "prlog.h"
#ifdef PR_LOGGING
extern PRLogModuleInfo* gXULTemplateLog;
#include "nsIRDFLiteral.h"
#endif
nsRDFPropertyTestNode::nsRDFPropertyTestNode(TestNode* aParent,
nsXULTemplateQueryProcessorRDF* aProcessor,
@@ -26,7 +24,6 @@ nsRDFPropertyTestNode::nsRDFPropertyTestNode(TestNode* aParent,
mTargetVariable(aTargetVariable),
mTarget(nullptr)
{
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* prop = "(null)";
if (aProperty)
@@ -44,7 +41,6 @@ nsRDFPropertyTestNode::nsRDFPropertyTestNode(TestNode* aParent,
("nsRDFPropertyTestNode[%p]: parent=%p source=%s property=%s target=%s",
this, aParent, NS_ConvertUTF16toUTF8(svar).get(), prop, NS_ConvertUTF16toUTF8(tvar).get()));
}
#endif
}
@@ -61,7 +57,6 @@ nsRDFPropertyTestNode::nsRDFPropertyTestNode(TestNode* aParent,
mTargetVariable(aTargetVariable),
mTarget(nullptr)
{
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* source = "(null)";
if (aSource)
@@ -79,7 +74,6 @@ nsRDFPropertyTestNode::nsRDFPropertyTestNode(TestNode* aParent,
("nsRDFPropertyTestNode[%p]: parent=%p source=%s property=%s target=%s",
this, aParent, source, prop, NS_ConvertUTF16toUTF8(tvar).get()));
}
#endif
}
@@ -96,7 +90,6 @@ nsRDFPropertyTestNode::nsRDFPropertyTestNode(TestNode* aParent,
mTargetVariable(0),
mTarget(aTarget)
{
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString svar(NS_LITERAL_STRING("(none)"));
if (mSourceVariable)
@@ -113,7 +106,6 @@ nsRDFPropertyTestNode::nsRDFPropertyTestNode(TestNode* aParent,
("nsRDFPropertyTestNode[%p]: parent=%p source=%s property=%s target=%s",
this, aParent, NS_ConvertUTF16toUTF8(svar).get(), prop, NS_ConvertUTF16toUTF8(target).get()));
}
#endif
}
@@ -156,7 +148,6 @@ nsRDFPropertyTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
getter_AddRefs(targetValue));
}
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* source = "(unbound)";
if (hasSourceBinding)
@@ -170,7 +161,6 @@ nsRDFPropertyTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
("nsRDFPropertyTestNode[%p]: FilterInstantiations() source=[%s] target=[%s]",
this, source, NS_ConvertUTF16toUTF8(target).get()));
}
#endif
if (hasSourceBinding && hasTargetBinding) {
// it's a consistency check. see if we have a assignment that is consistent
@@ -179,10 +169,8 @@ nsRDFPropertyTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
true, &hasAssertion);
if (NS_FAILED(rv)) return rv;
#ifdef PR_LOGGING
PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
(" consistency check => %s", hasAssertion ? "passed" : "failed"));
#endif
if (hasAssertion) {
// it's consistent.
@@ -241,7 +229,6 @@ nsRDFPropertyTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
value = do_QueryInterface(isupports);
NS_ASSERTION(value != nullptr, "target is not an nsIRDFNode");
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString s(NS_LITERAL_STRING("(none found)"));
if (value)
@@ -250,7 +237,6 @@ nsRDFPropertyTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
(" target => %s", NS_ConvertUTF16toUTF8(s).get()));
}
#endif
if (! value) continue;
@@ -262,7 +248,6 @@ nsRDFPropertyTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
nsCOMPtr<nsIRDFResource> source = do_QueryInterface(isupports);
NS_ASSERTION(source != nullptr, "source is not an nsIRDFResource");
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* s = "(none found)";
if (source)
@@ -271,7 +256,6 @@ nsRDFPropertyTestNode::FilterInstantiations(InstantiationSet& aInstantiations,
PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
(" source => %s", s));
}
#endif
if (! source) continue;
@@ -337,7 +321,6 @@ nsRDFPropertyTestNode::CanPropagate(nsIRDFResource* aSource,
result = true;
}
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* source;
aSource->GetValueConst(&source);
@@ -353,7 +336,6 @@ nsRDFPropertyTestNode::CanPropagate(nsIRDFResource* aSource,
this, source, property, NS_ConvertUTF16toUTF8(target).get(),
result ? "true" : "false"));
}
#endif
return result;
}
@@ -364,7 +346,6 @@ nsRDFPropertyTestNode::Retract(nsIRDFResource* aSource,
nsIRDFNode* aTarget) const
{
if (aProperty == mProperty.get()) {
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* source;
aSource->GetValueConst(&source);
@@ -379,7 +360,6 @@ nsRDFPropertyTestNode::Retract(nsIRDFResource* aSource,
("nsRDFPropertyTestNode[%p]: Retract([%s]==[%s]=>[%s])",
this, source, property, NS_ConvertUTF16toUTF8(target).get()));
}
#endif
mProcessor->RetractElement(Element(aSource, aProperty, aTarget));
}
-3
View File
@@ -21,15 +21,12 @@
#include "plhash.h"
#include "prlog.h"
#ifdef PR_LOGGING
extern PRLogModuleInfo* gXULTemplateLog;
#include "nsString.h"
#include "nsUnicharUtils.h"
#include "nsXULContentUtils.h"
#endif
#include "nsRuleNetwork.h"
#include "nsXULTemplateResultSetRDF.h"
#include "nsRDFConMemberTestNode.h"
@@ -446,7 +446,6 @@ nsXULContentBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode,
nsresult rv;
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
("nsXULContentBuilder::BuildContentFromTemplate (is unique: %d)",
@@ -461,7 +460,6 @@ nsXULContentBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode,
nsAtomCString(aResourceNode->NodeInfo()->NameAtom()).get(),
nsAtomCString(aRealNode->NodeInfo()->NameAtom()).get(), NS_ConvertUTF16toUTF8(id).get()));
}
#endif
// Iterate through all of the template children, constructing
// "real" content model nodes for each "template" child.
@@ -525,7 +523,6 @@ nsXULContentBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode,
nsIAtom *tag = tmplKid->NodeInfo()->NameAtom();
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
PR_LOG(gXULTemplateLog, PR_LOG_DEBUG,
("xultemplate[%p] building %s %s %s",
@@ -533,7 +530,6 @@ nsXULContentBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode,
(isGenerationElement ? "[resource]" : ""),
(isUnique ? "[unique]" : "")));
}
#endif
// Set to true if the child we're trying to create now
// already existed in the content model.
@@ -1077,7 +1073,6 @@ nsXULContentBuilder::CreateContainerContentsForQuerySet(nsIContent* aElement,
nsIContent** aContainer,
int32_t* aNewIndexInContainer)
{
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString id;
aResult->GetId(id);
@@ -1085,7 +1080,6 @@ nsXULContentBuilder::CreateContainerContentsForQuerySet(nsIContent* aElement,
("nsXULContentBuilder::CreateContainerContentsForQuerySet start for ref %s\n",
NS_ConvertUTF16toUTF8(id).get()));
}
#endif
if (! mQueryProcessor)
return NS_OK;
-2
View File
@@ -67,9 +67,7 @@ nsIRDFService* nsXULContentUtils::gRDF;
nsIDateTimeFormat* nsXULContentUtils::gFormat;
nsICollation *nsXULContentUtils::gCollation;
#ifdef PR_LOGGING
extern PRLogModuleInfo* gXULTemplateLog;
#endif
#define XUL_RESOURCE(ident, uri) nsIRDFResource* nsXULContentUtils::ident
#define XUL_LITERAL(ident, val) nsIRDFLiteral* nsXULContentUtils::ident
@@ -86,9 +86,7 @@ nsIScriptSecurityManager* nsXULTemplateBuilder::gScriptSecurityManager;
nsIPrincipal* nsXULTemplateBuilder::gSystemPrincipal;
nsIObserverService* nsXULTemplateBuilder::gObserverService;
#ifdef PR_LOGGING
PRLogModuleInfo* gXULTemplateLog;
#endif
#define NS_QUERY_PROCESSOR_CONTRACTID_PREFIX "@mozilla.org/xul/xul-query-processor;1?name="
@@ -167,10 +165,8 @@ nsXULTemplateBuilder::InitGlobals()
return rv;
}
#ifdef PR_LOGGING
if (! gXULTemplateLog)
gXULTemplateLog = PR_NewLogModule("nsXULTemplateBuilder");
#endif
return NS_OK;
}
@@ -1714,11 +1710,9 @@ nsXULTemplateBuilder::CompileQueries()
mFlags |= eLoggingEnabled;
}
#ifdef PR_LOGGING
// always enable logging if the debug setting is used
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG))
mFlags |= eLoggingEnabled;
#endif
nsCOMPtr<nsIDOMNode> rootnode = do_QueryInterface(mRoot);
nsresult rv =
-2
View File
@@ -26,9 +26,7 @@
#include "nsCycleCollectionParticipant.h"
#include "prlog.h"
#ifdef PR_LOGGING
extern PRLogModuleInfo* gXULTemplateLog;
#endif
class nsIContent;
class nsIObserverService;
@@ -484,7 +484,6 @@ nsXULTemplateQueryProcessorRDF::GenerateResults(nsISupports* aDatasource,
mLastRef = aRef;
}
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
nsAutoString id;
aRef->GetId(id);
@@ -500,7 +499,6 @@ nsXULTemplateQueryProcessorRDF::GenerateResults(nsISupports* aDatasource,
NS_ConvertUTF16toUTF8(rvar).get(),
NS_ConvertUTF16toUTF8(mvar).get()));
}
#endif
if (root) {
// the seed is the initial instantiation, which has a single
@@ -867,7 +865,6 @@ nsXULTemplateQueryProcessorRDF::Propagate(nsIRDFResource* aSource,
ReteNodeSet livenodes;
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* sourceStr;
aSource->GetValueConst(&sourceStr);
@@ -880,7 +877,6 @@ nsXULTemplateQueryProcessorRDF::Propagate(nsIRDFResource* aSource,
("nsXULTemplateQueryProcessorRDF::Propagate: [%s] -> [%s] -> [%s]\n",
sourceStr, propertyStr, NS_ConvertUTF16toUTF8(targetStr).get()));
}
#endif
{
ReteNodeSet::Iterator last = mRDFTests.Last();
@@ -956,7 +952,6 @@ nsXULTemplateQueryProcessorRDF::Retract(nsIRDFResource* aSource,
nsIRDFNode* aTarget)
{
#ifdef PR_LOGGING
if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_DEBUG)) {
const char* sourceStr;
aSource->GetValueConst(&sourceStr);
@@ -969,7 +964,6 @@ nsXULTemplateQueryProcessorRDF::Retract(nsIRDFResource* aSource,
("nsXULTemplateQueryProcessorRDF::Retract: [%s] -> [%s] -> [%s]\n",
sourceStr, propertyStr, NS_ConvertUTF16toUTF8(targetStr).get()));
}
#endif
// Retract any currently active rules that will no longer be matched.
ReteNodeSet::ConstIterator lastnode = mRDFTests.Last();
@@ -1025,7 +1019,6 @@ nsXULTemplateQueryProcessorRDF::SynchronizeAll(nsIRDFResource* aSource,
return NS_OK;
}
#ifdef PR_LOGGING
nsresult
nsXULTemplateQueryProcessorRDF::Log(const char* aOperation,
nsIRDFResource* aSource,
@@ -1062,7 +1055,6 @@ nsXULTemplateQueryProcessorRDF::Log(const char* aOperation,
}
return NS_OK;
}
#endif
nsresult
nsXULTemplateQueryProcessorRDF::CheckContainer(nsIRDFResource* aResource,
@@ -1271,7 +1263,7 @@ nsXULTemplateQueryProcessorRDF::CompileQueryChild(nsIAtom* aTag,
TestNode* aParentNode,
TestNode** aResult)
{
nsresult rv;
nsresult rv = NS_OK;
if (aTag == nsGkAtoms::triple) {
rv = CompileTripleCondition(aQuery, aCondition, aParentNode, aResult);
@@ -1279,8 +1271,7 @@ nsXULTemplateQueryProcessorRDF::CompileQueryChild(nsIAtom* aTag,
else if (aTag == nsGkAtoms::member) {
rv = CompileMemberCondition(aQuery, aCondition, aParentNode, aResult);
}
else {
#ifdef PR_LOGGING
else if (PR_LOG_TEST(gXULTemplateLog, PR_LOG_ALWAYS)) {
nsAutoString tagstr;
aTag->ToString(tagstr);
@@ -1289,9 +1280,6 @@ nsXULTemplateQueryProcessorRDF::CompileQueryChild(nsIAtom* aTag,
PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS,
("xultemplate[%p] unrecognized condition test <%s>",
this, tagstrC.get()));
#endif
rv = NS_OK;
}
return rv;
@@ -29,9 +29,7 @@
#include "mozilla/Attributes.h"
#include "prlog.h"
#ifdef PR_LOGGING
extern PRLogModuleInfo* gXULTemplateLog;
#endif
class nsIContent;
class nsXULTemplateResultRDF;
@@ -256,7 +254,6 @@ public:
nsResourceSet& ContainmentProperties() { return mContainmentProperties; }
#ifdef PR_LOGGING
nsresult
Log(const char* aOperation,
nsIRDFResource* aSource,
@@ -266,10 +263,6 @@ public:
#define LOG(_op, _src, _prop, _targ) \
Log(_op, _src, _prop, _targ)
#else
#define LOG(_op, _src, _prop, _targ)
#endif
protected:
~nsXULTemplateQueryProcessorRDF();
+1
View File
@@ -13,6 +13,7 @@
#include "nsError.h" // for NS_SUCCEEDED, NS_FAILED, etc
#include "nsIPresShell.h" // nsISelectionController constants
#include "nsRange.h" // local var
#include "nsQueryObject.h" // for do_QueryObject
using namespace mozilla;
using namespace mozilla::dom;
+1
View File
@@ -11,6 +11,7 @@
#include "nsDebug.h" // for NS_ASSERTION, etc
#include "nsEditor.h" // mEditor
#include "nsError.h" // for NS_OK, etc
#include "nsQueryObject.h" // for do_QueryObject
using namespace mozilla;
using namespace mozilla::dom;
+1
View File
@@ -8,6 +8,7 @@
#include "IMETextTxn.h"
#include "nsGkAtoms.h"
#include "mozilla/dom/Selection.h"
#include "nsQueryObject.h"
using namespace mozilla;
using namespace mozilla::dom;
@@ -53,6 +53,7 @@
#include "nsRange.h"
#include "nsServiceManagerUtils.h" // for do_GetService
#include "nsString.h" // for nsAutoString
#include "nsQueryObject.h" // for do_QueryObject
#ifdef HANDLE_NATIVE_TEXT_DIRECTION_SWITCH
#include "nsContentUtils.h" // for nsContentUtils, etc
#include "nsIBidiKeyboard.h" // for nsIBidiKeyboard
@@ -24,6 +24,7 @@
#include "nsIHTMLObjectResizer.h"
#include "nsISupportsImpl.h"
#include "nsLiteralString.h"
#include "nsQueryObject.h"
#include "nsRange.h"
using namespace mozilla;
-7
View File
@@ -38,7 +38,6 @@
using namespace mozilla;
using namespace mozilla::dom;
#ifdef PR_LOGGING
static PRLogModuleInfo* gSelectionCaretsLog;
static const char* kSelectionCaretsLogModuleName = "SelectionCarets";
@@ -53,10 +52,6 @@ static const char* kSelectionCaretsLogModuleName = "SelectionCarets";
PR_LOG(gSelectionCaretsLog, PR_LOG_DEBUG, \
("SelectionCarets: %s:%d : " message "\n", __FUNCTION__, __LINE__, \
##__VA_ARGS__));
#else
#define SELECTIONCARETS_LOG(message, ...)
#define SELECTIONCARETS_LOG_STATIC(message, ...)
#endif // #ifdef PR_LOGGING
// We treat mouse/touch move as "REAL" move event once its move distance
// exceed this value, in CSS pixel.
@@ -86,11 +81,9 @@ SelectionCarets::SelectionCarets(nsIPresShell* aPresShell)
{
MOZ_ASSERT(NS_IsMainThread());
#ifdef PR_LOGGING
if (!gSelectionCaretsLog) {
gSelectionCaretsLog = PR_NewLogModule(kSelectionCaretsLogModuleName);
}
#endif
SELECTIONCARETS_LOG("Constructor, PresShell=%p", mPresShell);
-7
View File
@@ -36,7 +36,6 @@
using namespace mozilla;
#ifdef PR_LOGGING
static PRLogModuleInfo* gTouchCaretLog;
static const char* kTouchCaretLogModuleName = "TouchCaret";
@@ -51,10 +50,6 @@ static const char* kTouchCaretLogModuleName = "TouchCaret";
PR_LOG(gTouchCaretLog, PR_LOG_DEBUG, \
("TouchCaret: %s:%d : " message "\n", __FUNCTION__, __LINE__, \
##__VA_ARGS__));
#else
#define TOUCHCARET_LOG(message, ...)
#define TOUCHCARET_LOG_STATIC(message, ...)
#endif // #ifdef PR_LOGGING
// Click on the boundary of input/textarea will place the caret at the
// front/end of the content. To advoid this, we need to deflate the content
@@ -75,11 +70,9 @@ TouchCaret::TouchCaret(nsIPresShell* aPresShell)
{
MOZ_ASSERT(NS_IsMainThread());
#ifdef PR_LOGGING
if (!gTouchCaretLog) {
gTouchCaretLog = PR_NewLogModule(kTouchCaretLogModuleName);
}
#endif
TOUCHCARET_LOG("Constructor, PresShell=%p", aPresShell);
-6
View File
@@ -134,8 +134,6 @@ using namespace mozilla::dom;
// PR LOGGING
#include "prlog.h"
#ifdef PR_LOGGING
#ifdef NS_PRINTING
static PRLogModuleInfo *
GetPrintingLog()
@@ -149,10 +147,6 @@ GetPrintingLog()
#endif // NS_PRINTING
#define PRT_YESNO(_p) ((_p)?"YES":"NO")
#else
#define PRT_YESNO(_p)
#define PR_PL(_p1)
#endif
//-----------------------------------------------------
class nsDocumentViewer;
+13 -24
View File
@@ -177,6 +177,7 @@
#include "nsIFrameInlines.h"
#include "mozilla/gfx/2D.h"
#include "nsSubDocumentFrame.h"
#include "nsQueryObject.h"
#ifdef ANDROID
#include "nsIDocShellTreeOwner.h"
@@ -535,9 +536,7 @@ private:
bool PresShell::sDisableNonTestMouseEvents = false;
#ifdef PR_LOGGING
PRLogModuleInfo* PresShell::gLog;
#endif
#ifdef DEBUG
static void
@@ -753,12 +752,10 @@ PresShell::PresShell()
mReflowCountMgr->SetPresContext(mPresContext);
mReflowCountMgr->SetPresShell(this);
#endif
#ifdef PR_LOGGING
mLoadBegin = TimeStamp::Now();
if (!gLog) {
gLog = PR_NewLogModule("PresShell");
}
#endif
mSelectionFlags = nsISelectionDisplay::DISPLAY_TEXT | nsISelectionDisplay::DISPLAY_IMAGES;
mIsThemeSupportDisabled = false;
mIsActive = true;
@@ -977,7 +974,6 @@ PresShell::Init(nsIDocument* aDocument,
mTouchManager.Init(this, mDocument);
}
#ifdef PR_LOGGING
enum TextPerfLogType {
eLog_reflow,
eLog_loaddone,
@@ -990,6 +986,18 @@ LogTextPerfStats(gfxTextPerfMetrics* aTextPerf,
const gfxTextPerfMetrics::TextCounts& aCounts,
float aTime, TextPerfLogType aLogType, const char* aURL)
{
PRLogModuleInfo* tpLog = gfxPlatform::GetLog(eGfxLog_textperf);
// ignore XUL contexts unless at debug level
PRLogModuleLevel logLevel = PR_LOG_WARNING;
if (aCounts.numContentTextRuns == 0) {
logLevel = PR_LOG_DEBUG;
}
if (!PR_LOG_TEST(tpLog, logLevel)) {
return;
}
char prefix[256];
switch (aLogType) {
@@ -1004,14 +1012,6 @@ LogTextPerfStats(gfxTextPerfMetrics* aTextPerf,
sprintf(prefix, "(textperf-totals) %p", aPresShell);
}
PRLogModuleInfo* tpLog = gfxPlatform::GetLog(eGfxLog_textperf);
// ignore XUL contexts unless at debug level
PRLogModuleLevel logLevel = PR_LOG_WARNING;
if (aCounts.numContentTextRuns == 0) {
logLevel = PR_LOG_DEBUG;
}
double hitRatio = 0.0;
uint32_t lookups = aCounts.wordCacheHit + aCounts.wordCacheMiss;
if (lookups) {
@@ -1058,7 +1058,6 @@ LogTextPerfStats(gfxTextPerfMetrics* aTextPerf,
aTextPerf->cumulative.textrunDestr));
}
}
#endif
void
PresShell::Destroy()
@@ -1067,7 +1066,6 @@ PresShell::Destroy()
"destroy called on presshell while scripts not blocked");
// dump out cumulative text perf metrics
#ifdef PR_LOGGING
gfxTextPerfMetrics* tp;
if (mPresContext && (tp = mPresContext->GetTextPerfMetrics())) {
tp->Accumulate();
@@ -1075,7 +1073,6 @@ PresShell::Destroy()
LogTextPerfStats(tp, this, tp->cumulative, 0.0, eLog_totals, nullptr);
}
}
#endif
#ifdef MOZ_REFLOW_PERF
DumpReflows();
@@ -2667,7 +2664,6 @@ PresShell::BeginLoad(nsIDocument *aDocument)
{
mDocumentLoading = true;
#ifdef PR_LOGGING
gfxTextPerfMetrics *tp = nullptr;
if (mPresContext) {
tp = mPresContext->GetTextPerfMetrics();
@@ -2688,7 +2684,6 @@ PresShell::BeginLoad(nsIDocument *aDocument)
("(presshell) %p load begin [%s]\n",
this, spec.get()));
}
#endif
}
void
@@ -2704,7 +2699,6 @@ PresShell::EndLoad(nsIDocument *aDocument)
void
PresShell::LoadComplete()
{
#ifdef PR_LOGGING
gfxTextPerfMetrics *tp = nullptr;
if (mPresContext) {
tp = mPresContext->GetTextPerfMetrics();
@@ -2732,7 +2726,6 @@ PresShell::LoadComplete()
}
}
}
#endif
}
#ifdef DEBUG
@@ -9154,8 +9147,6 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
mCurrentReflowRoot = target;
#endif
target->WillReflow(mPresContext);
// If the target frame is the root of the frame hierarchy, then
// use all the available space. If it's simply a `reflow root',
// then use the target frame's size as the available space.
@@ -9292,7 +9283,6 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
MaybeScheduleReflow();
}
#ifdef PR_LOGGING
// dump text perf metrics for reflows with significant text processing
if (tp) {
if (tp->current.numChars > 100) {
@@ -9302,7 +9292,6 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
}
tp->Accumulate();
}
#endif
if (docShell) {
docShell->AddProfileTimelineMarker("Reflow", TRACING_INTERVAL_END);
-2
View File
@@ -320,9 +320,7 @@ public:
virtual void VerifyStyleTree() override;
#endif
#ifdef PR_LOGGING
static PRLogModuleInfo* gLog;
#endif
virtual void DisableNonTestMouseEvents(bool aDisable) override;
-6
View File
@@ -73,12 +73,8 @@ using namespace mozilla::widget;
using namespace mozilla::ipc;
using namespace mozilla::layout;
#ifdef PR_LOGGING
static PRLogModuleInfo *gLog = nullptr;
#define LOG(...) PR_LOG(gLog, PR_LOG_NOTICE, (__VA_ARGS__))
#else
#define LOG(...) do { } while(0)
#endif
#define DEFAULT_FRAME_RATE 60
#define DEFAULT_THROTTLED_FRAME_RATE 1
@@ -902,11 +898,9 @@ GetFirstFrameDelay(imgIRequest* req)
/* static */ void
nsRefreshDriver::InitializeStatics()
{
#ifdef PR_LOGGING
if (!gLog) {
gLog = PR_NewLogModule("nsRefreshDriver");
}
#endif
}
/* static */ void
+3 -3
View File
@@ -46,9 +46,9 @@ associated with the frame, painting the frame, and handling events that
are passed in from the widget hierarchy.&nbsp; The nsIHTMLReflow interface
inherits from the nsIReflow interface and adds methods related to word
breaking and whitespace querying.&nbsp; The nsIReflow interface defines
the Reflow() method that initiates the reflow process along with the WillReflow()
and DidReflow() methods that get called before and after the reflow process
respectively.&nbsp; nsReflowState and nsReflowMetrics are parameters to
the Reflow() method that initiates the reflow process along with the
DidReflow() method that get calledafter the reflow process.&nbsp;
nsReflowState and nsReflowMetrics are parameters to
the templatized nsIReflow interface: the former is used to hold state during
reflow of a frame and the latter is used to return the frame's desired
size and alignment to the parent frame during the reflow process.
+1
View File
@@ -776,6 +776,7 @@ nsComboboxControlFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
// Constraints we try to satisfy:
// 1) Default width of button is the vertical scrollbar size
+1
View File
@@ -379,6 +379,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsFieldSetFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
+4 -3
View File
@@ -180,10 +180,11 @@ nsHTMLButtonControlFrame::GetPrefISize(nsRenderingContext* aRenderingContext)
void
nsHTMLButtonControlFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsHTMLButtonControlFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
+4 -4
View File
@@ -126,10 +126,10 @@ nsImageControlFrame::GetType() const
}
void
nsImageControlFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
nsImageControlFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsImageControlFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
+1 -3
View File
@@ -364,6 +364,7 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
return;
}
MarkInReflow();
/*
* Due to the fact that our intrinsic height depends on the heights of our
* kids, we end up having to do two-pass reflow, in general -- the first pass
@@ -457,8 +458,6 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext,
computedHeight = state.ApplyMinMaxHeight(computedHeight);
state.SetComputedHeight(computedHeight);
nsHTMLScrollFrame::WillReflow(aPresContext);
// XXXbz to make the ascent really correct, we should add our
// mComputedPadding.top to it (and subtract it from descent). Need that
// because nsGfxScrollFrame just adds in the border....
@@ -577,7 +576,6 @@ nsListControlFrame::ReflowAsDropdown(nsPresContext* aPresContext,
mLastDropdownComputedHeight = state.ComputedHeight();
nsHTMLScrollFrame::WillReflow(aPresContext);
nsHTMLScrollFrame::Reflow(aPresContext, aDesiredSize, state, aStatus);
}
+4 -3
View File
@@ -101,10 +101,11 @@ NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
void
nsMeterFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsMeterFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
+1
View File
@@ -106,6 +106,7 @@ nsNumberControlFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsNumberControlFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
+4 -3
View File
@@ -106,10 +106,11 @@ nsProgressFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
void
nsProgressFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsProgressFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
+1
View File
@@ -279,6 +279,7 @@ nsRangeFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsRangeFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
+1
View File
@@ -495,6 +495,7 @@ nsTextControlFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsTextControlFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
@@ -387,9 +387,6 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
aContainingBlock.width,
aContainingBlock.height);
// Send the WillReflow() notification and position the frame
aKidFrame->WillReflow(aPresContext);
// Get the border values
const nsMargin& border = aReflowState.mStyleBorder->GetComputedBorder();
+1
View File
@@ -84,6 +84,7 @@ BRFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("BRFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
WritingMode wm = aReflowState.GetWritingMode();
+1 -1
View File
@@ -1045,6 +1045,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsBlockFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
#ifdef DEBUG
@@ -7177,7 +7178,6 @@ nsBlockFrame::ReflowBullet(nsIFrame* aBulletFrame,
nsHTMLReflowState reflowState(aState.mPresContext, rs,
aBulletFrame, availSize);
nsReflowStatus status;
aBulletFrame->WillReflow(aState.mPresContext);
aBulletFrame->Reflow(aState.mPresContext, aMetrics, reflowState, status);
// Get the float available space using our saved state from before we
-3
View File
@@ -291,9 +291,6 @@ nsBlockReflowContext::ReflowBlock(const LogicalRect& aSpace,
mOuterReflowState.mBlockDelta + mBCoord - aLine->BStart();
}
// Let frame know that we are reflowing it
mFrame->WillReflow(mPresContext);
#ifdef DEBUG
mMetrics.ISize(mWritingMode) = nscoord(0xdeadbeef);
mMetrics.BSize(mWritingMode) = nscoord(0xdeadbeef);
+1
View File
@@ -621,6 +621,7 @@ nsBulletFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsBulletFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
+1
View File
@@ -604,6 +604,7 @@ nsCanvasFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsCanvasFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
NS_FRAME_TRACE_REFLOW_IN("nsCanvasFrame::Reflow");
+1
View File
@@ -1014,6 +1014,7 @@ nsColumnSetFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
// Don't support interruption in columns
nsPresContext::InterruptPreventer noInterrupts(aPresContext);
+2 -13
View File
@@ -936,11 +936,6 @@ nsContainerFrame::ComputeAutoSize(nsRenderingContext* aRenderingContext,
return result;
}
/**
* Invokes the WillReflow() function, positions the frame and its view (if
* requested), and then calls Reflow(). If the reflow succeeds and the child
* frame is complete, deletes any next-in-flows using DeleteNextInFlowChild()
*/
void
nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
nsPresContext* aPresContext,
@@ -959,10 +954,7 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
"FinishReflowChild with unconstrained container width!");
}
// Send the WillReflow() notification, and position the child frame
// and its view if requested
aKidFrame->WillReflow(aPresContext);
// Position the child frame and its view if requested.
if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) {
aKidFrame->SetPosition(aWM, aPos, aContainerWidth);
}
@@ -1004,10 +996,7 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
{
NS_PRECONDITION(aReflowState.frame == aKidFrame, "bad reflow state");
// Send the WillReflow() notification, and position the child frame
// and its view if requested
aKidFrame->WillReflow(aPresContext);
// Position the child frame and its view if requested.
if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) {
aKidFrame->SetPosition(nsPoint(aX, aY));
}
+4 -4
View File
@@ -231,9 +231,9 @@ public:
bool aShrinkWrap) override;
/**
* Invokes the WillReflow() function, positions the frame and its view (if
* requested), and then calls Reflow(). If the reflow succeeds and the child
* frame is complete, deletes any next-in-flows using DeleteNextInFlowChild()
* Positions aChildFrame and its view (if requested), and then calls Reflow().
* If the reflow status after reflowing the child is FULLY_COMPLETE then any
* next-in-flows are deleted using DeleteNextInFlowChild().
*
* Flags:
* NS_FRAME_NO_MOVE_VIEW - don't position the frame's view. Set this if you
@@ -241,7 +241,7 @@ public:
* NS_FRAME_NO_MOVE_FRAME - don't move the frame. aX and aY are ignored in this
* case. Also implies NS_FRAME_NO_MOVE_VIEW
*/
void ReflowChild(nsIFrame* aKidFrame,
void ReflowChild(nsIFrame* aChildFrame,
nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
+1 -1
View File
@@ -164,6 +164,7 @@ nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aReflowStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsFirstLetterFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aReflowStatus);
@@ -205,7 +206,6 @@ nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
ll.SetInFirstLetter(true);
ll.SetFirstLetterStyleOK(true);
kid->WillReflow(aPresContext);
kid->Reflow(aPresContext, kidMetrics, rs, aReflowStatus);
ll.EndLineReflow();
+1 -2
View File
@@ -32,7 +32,6 @@ typedef nsFlexContainerFrame::FlexLine FlexLine;
typedef nsFlexContainerFrame::FlexboxAxisTracker FlexboxAxisTracker;
typedef nsFlexContainerFrame::StrutInfo StrutInfo;
#ifdef PR_LOGGING
static PRLogModuleInfo*
GetFlexContainerLog()
{
@@ -41,7 +40,6 @@ GetFlexContainerLog()
sLog = PR_NewLogModule("nsFlexContainerFrame");
return sLog;
}
#endif /* PR_LOGGING */
// XXXdholbert Some of this helper-stuff should be separated out into a general
// "LogicalAxisUtils.h" helper. Should that be a class, or a namespace (under
@@ -3433,6 +3431,7 @@ nsFlexContainerFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsFlexContainerFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
PR_LOG(GetFlexContainerLog(), PR_LOG_DEBUG,
+4 -18
View File
@@ -4444,20 +4444,6 @@ nsFrame::ShrinkWidthToFit(nsRenderingContext *aRenderingContext,
return result;
}
void
nsFrame::WillReflow(nsPresContext* aPresContext)
{
#ifdef DEBUG_dbaron_off
// bug 81268
NS_ASSERTION(!(mState & NS_FRAME_IN_REFLOW),
"nsFrame::WillReflow: frame is already in reflow");
#endif
NS_FRAME_TRACE_MSG(NS_FRAME_TRACE_CALLS,
("WillReflow: oldState=%x", mState));
mState |= NS_FRAME_IN_REFLOW;
}
void
nsFrame::DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
@@ -4558,6 +4544,7 @@ nsFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsFrame");
aDesiredSize.ClearSize();
aStatus = NS_FRAME_COMPLETE;
@@ -8659,7 +8646,6 @@ nsFrame::BoxReflow(nsBoxLayoutState& aState,
#endif
// place the child and reflow
WillReflow(aPresContext);
Reflow(aPresContext, aDesiredSize, reflowState, status);
@@ -8974,7 +8960,7 @@ GetTagName(nsFrame* aFrame, nsIContent* aContent, int aResultSize,
void
nsFrame::Trace(const char* aMethod, bool aEnter)
{
if (NS_FRAME_LOG_TEST(gLogModule, NS_FRAME_TRACE_CALLS)) {
if (NS_FRAME_LOG_TEST(GetLogModuleInfo(), NS_FRAME_TRACE_CALLS)) {
char tagbuf[40];
GetTagName(this, mContent, sizeof(tagbuf), tagbuf);
PR_LogPrint("%s: %s %s", tagbuf, aEnter ? "enter" : "exit", aMethod);
@@ -8984,7 +8970,7 @@ nsFrame::Trace(const char* aMethod, bool aEnter)
void
nsFrame::Trace(const char* aMethod, bool aEnter, nsReflowStatus aStatus)
{
if (NS_FRAME_LOG_TEST(gLogModule, NS_FRAME_TRACE_CALLS)) {
if (NS_FRAME_LOG_TEST(GetLogModuleInfo(), NS_FRAME_TRACE_CALLS)) {
char tagbuf[40];
GetTagName(this, mContent, sizeof(tagbuf), tagbuf);
PR_LogPrint("%s: %s %s, status=%scomplete%s",
@@ -8997,7 +8983,7 @@ nsFrame::Trace(const char* aMethod, bool aEnter, nsReflowStatus aStatus)
void
nsFrame::TraceMsg(const char* aFormatString, ...)
{
if (NS_FRAME_LOG_TEST(gLogModule, NS_FRAME_TRACE_CALLS)) {
if (NS_FRAME_LOG_TEST(GetLogModuleInfo(), NS_FRAME_TRACE_CALLS)) {
// Format arguments into a buffer
char argbuf[200];
va_list ap;
-1
View File
@@ -302,7 +302,6 @@ public:
nscoord ShrinkWidthToFit(nsRenderingContext *aRenderingContext,
nscoord aWidthInCB);
virtual void WillReflow(nsPresContext* aPresContext) override;
/**
* Calculates the size of this frame after reflowing (calling Reflow on, and
* updating the size and position of) its children, as necessary. The
+1
View File
@@ -856,6 +856,7 @@ nsHTMLFramesetFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsHTMLFramesetFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
nsIPresShell *shell = aPresContext->PresShell();
+1
View File
@@ -802,6 +802,7 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsHTMLScrollFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
+1
View File
@@ -122,6 +122,7 @@ nsGridContainerFrame::Reflow(nsPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
MarkInReflow();
DO_GLOBAL_REFLOW_COUNT("nsGridContainerFrame");
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);

Some files were not shown because too many files have changed in this diff Show More