Bug 1162673 - Part 1: Remove instances of #ifdef PR_LOGGING in layout. r=froydnj
PR_LOGGING is now always defined, we can remove #ifdefs checking for it.
This commit is contained in:
@@ -39,7 +39,6 @@
|
|||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
static PRLogModuleInfo* gSelectionCaretsLog;
|
static PRLogModuleInfo* gSelectionCaretsLog;
|
||||||
static const char* kSelectionCaretsLogModuleName = "SelectionCarets";
|
static const char* kSelectionCaretsLogModuleName = "SelectionCarets";
|
||||||
|
|
||||||
@@ -54,10 +53,6 @@ static const char* kSelectionCaretsLogModuleName = "SelectionCarets";
|
|||||||
PR_LOG(gSelectionCaretsLog, PR_LOG_DEBUG, \
|
PR_LOG(gSelectionCaretsLog, PR_LOG_DEBUG, \
|
||||||
("SelectionCarets: %s:%d : " message "\n", __FUNCTION__, __LINE__, \
|
("SelectionCarets: %s:%d : " message "\n", __FUNCTION__, __LINE__, \
|
||||||
##__VA_ARGS__));
|
##__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
|
// We treat mouse/touch move as "REAL" move event once its move distance
|
||||||
// exceed this value, in CSS pixel.
|
// exceed this value, in CSS pixel.
|
||||||
@@ -88,11 +83,9 @@ SelectionCarets::SelectionCarets(nsIPresShell* aPresShell)
|
|||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
if (!gSelectionCaretsLog) {
|
if (!gSelectionCaretsLog) {
|
||||||
gSelectionCaretsLog = PR_NewLogModule(kSelectionCaretsLogModuleName);
|
gSelectionCaretsLog = PR_NewLogModule(kSelectionCaretsLogModuleName);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
SELECTIONCARETS_LOG("Constructor, PresShell=%p", mPresShell);
|
SELECTIONCARETS_LOG("Constructor, PresShell=%p", mPresShell);
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
static PRLogModuleInfo* gTouchCaretLog;
|
static PRLogModuleInfo* gTouchCaretLog;
|
||||||
static const char* kTouchCaretLogModuleName = "TouchCaret";
|
static const char* kTouchCaretLogModuleName = "TouchCaret";
|
||||||
|
|
||||||
@@ -51,10 +50,6 @@ static const char* kTouchCaretLogModuleName = "TouchCaret";
|
|||||||
PR_LOG(gTouchCaretLog, PR_LOG_DEBUG, \
|
PR_LOG(gTouchCaretLog, PR_LOG_DEBUG, \
|
||||||
("TouchCaret: %s:%d : " message "\n", __FUNCTION__, __LINE__, \
|
("TouchCaret: %s:%d : " message "\n", __FUNCTION__, __LINE__, \
|
||||||
##__VA_ARGS__));
|
##__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
|
// 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
|
// 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());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
if (!gTouchCaretLog) {
|
if (!gTouchCaretLog) {
|
||||||
gTouchCaretLog = PR_NewLogModule(kTouchCaretLogModuleName);
|
gTouchCaretLog = PR_NewLogModule(kTouchCaretLogModuleName);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
TOUCHCARET_LOG("Constructor, PresShell=%p", aPresShell);
|
TOUCHCARET_LOG("Constructor, PresShell=%p", aPresShell);
|
||||||
|
|
||||||
|
|||||||
@@ -133,8 +133,6 @@ using namespace mozilla::dom;
|
|||||||
// PR LOGGING
|
// PR LOGGING
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
|
|
||||||
#ifdef NS_PRINTING
|
#ifdef NS_PRINTING
|
||||||
static PRLogModuleInfo *
|
static PRLogModuleInfo *
|
||||||
GetPrintingLog()
|
GetPrintingLog()
|
||||||
@@ -148,10 +146,6 @@ GetPrintingLog()
|
|||||||
#endif // NS_PRINTING
|
#endif // NS_PRINTING
|
||||||
|
|
||||||
#define PRT_YESNO(_p) ((_p)?"YES":"NO")
|
#define PRT_YESNO(_p) ((_p)?"YES":"NO")
|
||||||
#else
|
|
||||||
#define PRT_YESNO(_p)
|
|
||||||
#define PR_PL(_p1)
|
|
||||||
#endif
|
|
||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
|
|
||||||
class nsDocumentViewer;
|
class nsDocumentViewer;
|
||||||
|
|||||||
@@ -535,9 +535,7 @@ private:
|
|||||||
|
|
||||||
bool PresShell::sDisableNonTestMouseEvents = false;
|
bool PresShell::sDisableNonTestMouseEvents = false;
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
PRLogModuleInfo* PresShell::gLog;
|
PRLogModuleInfo* PresShell::gLog;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
static void
|
static void
|
||||||
@@ -752,12 +750,10 @@ PresShell::PresShell()
|
|||||||
mReflowCountMgr->SetPresContext(mPresContext);
|
mReflowCountMgr->SetPresContext(mPresContext);
|
||||||
mReflowCountMgr->SetPresShell(this);
|
mReflowCountMgr->SetPresShell(this);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PR_LOGGING
|
|
||||||
mLoadBegin = TimeStamp::Now();
|
mLoadBegin = TimeStamp::Now();
|
||||||
if (!gLog) {
|
if (!gLog) {
|
||||||
gLog = PR_NewLogModule("PresShell");
|
gLog = PR_NewLogModule("PresShell");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
mSelectionFlags = nsISelectionDisplay::DISPLAY_TEXT | nsISelectionDisplay::DISPLAY_IMAGES;
|
mSelectionFlags = nsISelectionDisplay::DISPLAY_TEXT | nsISelectionDisplay::DISPLAY_IMAGES;
|
||||||
mIsThemeSupportDisabled = false;
|
mIsThemeSupportDisabled = false;
|
||||||
mIsActive = true;
|
mIsActive = true;
|
||||||
@@ -970,7 +966,6 @@ PresShell::Init(nsIDocument* aDocument,
|
|||||||
mTouchManager.Init(this, mDocument);
|
mTouchManager.Init(this, mDocument);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
enum TextPerfLogType {
|
enum TextPerfLogType {
|
||||||
eLog_reflow,
|
eLog_reflow,
|
||||||
eLog_loaddone,
|
eLog_loaddone,
|
||||||
@@ -1051,7 +1046,6 @@ LogTextPerfStats(gfxTextPerfMetrics* aTextPerf,
|
|||||||
aTextPerf->cumulative.textrunDestr));
|
aTextPerf->cumulative.textrunDestr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PresShell::Destroy()
|
PresShell::Destroy()
|
||||||
@@ -1060,7 +1054,6 @@ PresShell::Destroy()
|
|||||||
"destroy called on presshell while scripts not blocked");
|
"destroy called on presshell while scripts not blocked");
|
||||||
|
|
||||||
// dump out cumulative text perf metrics
|
// dump out cumulative text perf metrics
|
||||||
#ifdef PR_LOGGING
|
|
||||||
gfxTextPerfMetrics* tp;
|
gfxTextPerfMetrics* tp;
|
||||||
if (mPresContext && (tp = mPresContext->GetTextPerfMetrics())) {
|
if (mPresContext && (tp = mPresContext->GetTextPerfMetrics())) {
|
||||||
tp->Accumulate();
|
tp->Accumulate();
|
||||||
@@ -1068,7 +1061,6 @@ PresShell::Destroy()
|
|||||||
LogTextPerfStats(tp, this, tp->cumulative, 0.0, eLog_totals, nullptr);
|
LogTextPerfStats(tp, this, tp->cumulative, 0.0, eLog_totals, nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MOZ_REFLOW_PERF
|
#ifdef MOZ_REFLOW_PERF
|
||||||
DumpReflows();
|
DumpReflows();
|
||||||
@@ -2652,7 +2644,6 @@ PresShell::BeginLoad(nsIDocument *aDocument)
|
|||||||
{
|
{
|
||||||
mDocumentLoading = true;
|
mDocumentLoading = true;
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
gfxTextPerfMetrics *tp = nullptr;
|
gfxTextPerfMetrics *tp = nullptr;
|
||||||
if (mPresContext) {
|
if (mPresContext) {
|
||||||
tp = mPresContext->GetTextPerfMetrics();
|
tp = mPresContext->GetTextPerfMetrics();
|
||||||
@@ -2673,7 +2664,6 @@ PresShell::BeginLoad(nsIDocument *aDocument)
|
|||||||
("(presshell) %p load begin [%s]\n",
|
("(presshell) %p load begin [%s]\n",
|
||||||
this, spec.get()));
|
this, spec.get()));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -2689,7 +2679,6 @@ PresShell::EndLoad(nsIDocument *aDocument)
|
|||||||
void
|
void
|
||||||
PresShell::LoadComplete()
|
PresShell::LoadComplete()
|
||||||
{
|
{
|
||||||
#ifdef PR_LOGGING
|
|
||||||
gfxTextPerfMetrics *tp = nullptr;
|
gfxTextPerfMetrics *tp = nullptr;
|
||||||
if (mPresContext) {
|
if (mPresContext) {
|
||||||
tp = mPresContext->GetTextPerfMetrics();
|
tp = mPresContext->GetTextPerfMetrics();
|
||||||
@@ -2717,7 +2706,6 @@ PresShell::LoadComplete()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@@ -9284,7 +9272,6 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
|
|||||||
MaybeScheduleReflow();
|
MaybeScheduleReflow();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
// dump text perf metrics for reflows with significant text processing
|
// dump text perf metrics for reflows with significant text processing
|
||||||
if (tp) {
|
if (tp) {
|
||||||
if (tp->current.numChars > 100) {
|
if (tp->current.numChars > 100) {
|
||||||
@@ -9294,7 +9281,6 @@ PresShell::DoReflow(nsIFrame* target, bool aInterruptible)
|
|||||||
}
|
}
|
||||||
tp->Accumulate();
|
tp->Accumulate();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (docShell) {
|
if (docShell) {
|
||||||
docShell->AddProfileTimelineMarker("Reflow", TRACING_INTERVAL_END);
|
docShell->AddProfileTimelineMarker("Reflow", TRACING_INTERVAL_END);
|
||||||
|
|||||||
@@ -319,9 +319,7 @@ public:
|
|||||||
virtual void VerifyStyleTree() override;
|
virtual void VerifyStyleTree() override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
static PRLogModuleInfo* gLog;
|
static PRLogModuleInfo* gLog;
|
||||||
#endif
|
|
||||||
|
|
||||||
virtual void DisableNonTestMouseEvents(bool aDisable) override;
|
virtual void DisableNonTestMouseEvents(bool aDisable) override;
|
||||||
|
|
||||||
|
|||||||
@@ -73,12 +73,8 @@ using namespace mozilla::widget;
|
|||||||
using namespace mozilla::ipc;
|
using namespace mozilla::ipc;
|
||||||
using namespace mozilla::layout;
|
using namespace mozilla::layout;
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
static PRLogModuleInfo *gLog = nullptr;
|
static PRLogModuleInfo *gLog = nullptr;
|
||||||
#define LOG(...) PR_LOG(gLog, PR_LOG_NOTICE, (__VA_ARGS__))
|
#define LOG(...) PR_LOG(gLog, PR_LOG_NOTICE, (__VA_ARGS__))
|
||||||
#else
|
|
||||||
#define LOG(...) do { } while(0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DEFAULT_FRAME_RATE 60
|
#define DEFAULT_FRAME_RATE 60
|
||||||
#define DEFAULT_THROTTLED_FRAME_RATE 1
|
#define DEFAULT_THROTTLED_FRAME_RATE 1
|
||||||
@@ -902,11 +898,9 @@ GetFirstFrameDelay(imgIRequest* req)
|
|||||||
/* static */ void
|
/* static */ void
|
||||||
nsRefreshDriver::InitializeStatics()
|
nsRefreshDriver::InitializeStatics()
|
||||||
{
|
{
|
||||||
#ifdef PR_LOGGING
|
|
||||||
if (!gLog) {
|
if (!gLog) {
|
||||||
gLog = PR_NewLogModule("nsRefreshDriver");
|
gLog = PR_NewLogModule("nsRefreshDriver");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ void
|
/* static */ void
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ typedef nsFlexContainerFrame::FlexLine FlexLine;
|
|||||||
typedef nsFlexContainerFrame::FlexboxAxisTracker FlexboxAxisTracker;
|
typedef nsFlexContainerFrame::FlexboxAxisTracker FlexboxAxisTracker;
|
||||||
typedef nsFlexContainerFrame::StrutInfo StrutInfo;
|
typedef nsFlexContainerFrame::StrutInfo StrutInfo;
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
static PRLogModuleInfo*
|
static PRLogModuleInfo*
|
||||||
GetFlexContainerLog()
|
GetFlexContainerLog()
|
||||||
{
|
{
|
||||||
@@ -42,7 +41,6 @@ GetFlexContainerLog()
|
|||||||
sLog = PR_NewLogModule("nsFlexContainerFrame");
|
sLog = PR_NewLogModule("nsFlexContainerFrame");
|
||||||
return sLog;
|
return sLog;
|
||||||
}
|
}
|
||||||
#endif /* PR_LOGGING */
|
|
||||||
|
|
||||||
// XXXdholbert Some of this helper-stuff should be separated out into a general
|
// XXXdholbert Some of this helper-stuff should be separated out into a general
|
||||||
// "main/cross-axis utils" header, shared by grid & flexbox?
|
// "main/cross-axis utils" header, shared by grid & flexbox?
|
||||||
|
|||||||
@@ -22,12 +22,8 @@
|
|||||||
#include "nsIPrintSettings.h"
|
#include "nsIPrintSettings.h"
|
||||||
|
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
#ifdef PR_LOGGING
|
|
||||||
extern PRLogModuleInfo *GetLayoutPrintingLog();
|
extern PRLogModuleInfo *GetLayoutPrintingLog();
|
||||||
#define PR_PL(_p1) PR_LOG(GetLayoutPrintingLog(), PR_LOG_DEBUG, _p1)
|
#define PR_PL(_p1) PR_LOG(GetLayoutPrintingLog(), PR_LOG_DEBUG, _p1)
|
||||||
#else
|
|
||||||
#define PR_PL(_p1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::gfx;
|
using namespace mozilla::gfx;
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ using mozilla::DefaultXDisplay;
|
|||||||
#undef CreateEvent
|
#undef CreateEvent
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
static PRLogModuleInfo *
|
static PRLogModuleInfo *
|
||||||
GetObjectFrameLog()
|
GetObjectFrameLog()
|
||||||
{
|
{
|
||||||
@@ -102,7 +101,6 @@ GetObjectFrameLog()
|
|||||||
sLog = PR_NewLogModule("nsPluginFrame");
|
sLog = PR_NewLogModule("nsPluginFrame");
|
||||||
return sLog;
|
return sLog;
|
||||||
}
|
}
|
||||||
#endif /* PR_LOGGING */
|
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::gfx;
|
using namespace mozilla::gfx;
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ static const char sPrintOptionsContractID[] = "@mozilla.org/gfx/printsettings-se
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
#ifdef PR_LOGGING
|
|
||||||
PRLogModuleInfo *
|
PRLogModuleInfo *
|
||||||
GetLayoutPrintingLog()
|
GetLayoutPrintingLog()
|
||||||
{
|
{
|
||||||
@@ -52,9 +51,6 @@ GetLayoutPrintingLog()
|
|||||||
return sLog;
|
return sLog;
|
||||||
}
|
}
|
||||||
#define PR_PL(_p1) PR_LOG(GetLayoutPrintingLog(), PR_LOG_DEBUG, _p1)
|
#define PR_PL(_p1) PR_LOG(GetLayoutPrintingLog(), PR_LOG_DEBUG, _p1)
|
||||||
#else
|
|
||||||
#define PR_PL(_p1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
nsSimplePageSequenceFrame*
|
nsSimplePageSequenceFrame*
|
||||||
NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
// PR LOGGING
|
// PR LOGGING
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
#define DUMP_LAYOUT_LEVEL 9 // this turns on the dumping of each doucment's layout info
|
#define DUMP_LAYOUT_LEVEL 9 // this turns on the dumping of each doucment's layout info
|
||||||
static PRLogModuleInfo *
|
static PRLogModuleInfo *
|
||||||
GetPrintingLog()
|
GetPrintingLog()
|
||||||
@@ -27,10 +26,6 @@ GetPrintingLog()
|
|||||||
return sLog;
|
return sLog;
|
||||||
}
|
}
|
||||||
#define PR_PL(_p1) PR_LOG(GetPrintingLog(), PR_LOG_DEBUG, _p1);
|
#define PR_PL(_p1) PR_LOG(GetPrintingLog(), PR_LOG_DEBUG, _p1);
|
||||||
#else
|
|
||||||
#define PRT_YESNO(_p)
|
|
||||||
#define PR_PL(_p1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//---------------------------------------------------
|
//---------------------------------------------------
|
||||||
//-- nsPrintData Class Impl
|
//-- nsPrintData Class Impl
|
||||||
|
|||||||
@@ -129,8 +129,6 @@ using namespace mozilla::dom;
|
|||||||
// PR LOGGING
|
// PR LOGGING
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
// PR_LOGGING is force to always be on (even in release builds)
|
// PR_LOGGING is force to always be on (even in release builds)
|
||||||
// but we only want some of it on,
|
// but we only want some of it on,
|
||||||
@@ -161,10 +159,6 @@ static const char * gFrameTypesStr[] = {"eDoc", "eFrame", "eIFrame", "eFra
|
|||||||
static const char * gPrintFrameTypeStr[] = {"kNoFrames", "kFramesAsIs", "kSelectedFrame", "kEachFrameSep"};
|
static const char * gPrintFrameTypeStr[] = {"kNoFrames", "kFramesAsIs", "kSelectedFrame", "kEachFrameSep"};
|
||||||
static const char * gFrameHowToEnableStr[] = {"kFrameEnableNone", "kFrameEnableAll", "kFrameEnableAsIsAndEach"};
|
static const char * gFrameHowToEnableStr[] = {"kFrameEnableNone", "kFrameEnableAll", "kFrameEnableAsIsAndEach"};
|
||||||
static const char * gPrintRangeStr[] = {"kRangeAllPages", "kRangeSpecifiedPageRange", "kRangeSelection", "kRangeFocusFrame"};
|
static const char * gPrintRangeStr[] = {"kRangeAllPages", "kRangeSpecifiedPageRange", "kRangeSelection", "kRangeFocusFrame"};
|
||||||
#else
|
|
||||||
#define PRT_YESNO(_p)
|
|
||||||
#define PR_PL(_p1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef EXTENDED_DEBUG_PRINTING
|
#ifdef EXTENDED_DEBUG_PRINTING
|
||||||
// Forward Declarations
|
// Forward Declarations
|
||||||
@@ -1713,7 +1707,6 @@ nsPrintEngine::SetupToPrintContent()
|
|||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
float calcRatio = 0.0f;
|
float calcRatio = 0.0f;
|
||||||
if (mPrt->mPrintDocList.Length() > 1 && mPrt->mPrintObject->mFrameType == eFrameSet) {
|
if (mPrt->mPrintDocList.Length() > 1 && mPrt->mPrintObject->mFrameType == eFrameSet) {
|
||||||
nsPrintObject* smallestPO = FindSmallestSTF();
|
nsPrintObject* smallestPO = FindSmallestSTF();
|
||||||
@@ -1729,7 +1722,6 @@ nsPrintEngine::SetupToPrintContent()
|
|||||||
PR_PL(("**************************************************************************\n"));
|
PR_PL(("**************************************************************************\n"));
|
||||||
PR_PL(("STF Ratio is: %8.5f Effective Ratio: %8.5f Diff: %8.5f\n", mPrt->mShrinkRatio, calcRatio, mPrt->mShrinkRatio-calcRatio));
|
PR_PL(("STF Ratio is: %8.5f Effective Ratio: %8.5f Diff: %8.5f\n", mPrt->mShrinkRatio, calcRatio, mPrt->mShrinkRatio-calcRatio));
|
||||||
PR_PL(("**************************************************************************\n"));
|
PR_PL(("**************************************************************************\n"));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the frames got reconstructed and reflowed the number of pages might
|
// If the frames got reconstructed and reflowed the number of pages might
|
||||||
|
|||||||
@@ -451,7 +451,6 @@ FontFaceSet::StartLoad(gfxUserFontEntry* aUserFontEntry,
|
|||||||
nsRefPtr<nsFontFaceLoader> fontLoader =
|
nsRefPtr<nsFontFaceLoader> fontLoader =
|
||||||
new nsFontFaceLoader(aUserFontEntry, aFontFaceSrc->mURI, this, channel);
|
new nsFontFaceLoader(aUserFontEntry, aFontFaceSrc->mURI, this, channel);
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
if (LOG_ENABLED()) {
|
if (LOG_ENABLED()) {
|
||||||
nsAutoCString fontURI, referrerURI;
|
nsAutoCString fontURI, referrerURI;
|
||||||
aFontFaceSrc->mURI->GetSpec(fontURI);
|
aFontFaceSrc->mURI->GetSpec(fontURI);
|
||||||
@@ -461,7 +460,6 @@ FontFaceSet::StartLoad(gfxUserFontEntry* aUserFontEntry,
|
|||||||
"referrer uri: (%s)\n",
|
"referrer uri: (%s)\n",
|
||||||
fontLoader.get(), fontURI.get(), referrerURI.get()));
|
fontLoader.get(), fontURI.get(), referrerURI.get()));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));
|
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));
|
||||||
if (httpChannel) {
|
if (httpChannel) {
|
||||||
@@ -653,14 +651,12 @@ FontFaceSet::UpdateRules(const nsTArray<nsFontFaceRuleContainer>& aRules)
|
|||||||
// local rules have been rebuilt, so clear the flag
|
// local rules have been rebuilt, so clear the flag
|
||||||
mUserFontSet->mLocalRulesUsed = false;
|
mUserFontSet->mLocalRulesUsed = false;
|
||||||
|
|
||||||
#if PR_LOGGING
|
|
||||||
if (LOG_ENABLED() && !mRuleFaces.IsEmpty()) {
|
if (LOG_ENABLED() && !mRuleFaces.IsEmpty()) {
|
||||||
LOG(("userfonts (%p) userfont rules update (%s) rule count: %d",
|
LOG(("userfonts (%p) userfont rules update (%s) rule count: %d",
|
||||||
mUserFontSet.get(),
|
mUserFontSet.get(),
|
||||||
(modified ? "modified" : "not modified"),
|
(modified ? "modified" : "not modified"),
|
||||||
mRuleFaces.Length()));
|
mRuleFaces.Length()));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return modified;
|
return modified;
|
||||||
}
|
}
|
||||||
@@ -1111,11 +1107,9 @@ FontFaceSet::LogMessage(gfxUserFontEntry* aUserFontEntry,
|
|||||||
message.AppendLiteral(" source: ");
|
message.AppendLiteral(" source: ");
|
||||||
message.Append(fontURI);
|
message.Append(fontURI);
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
if (LOG_ENABLED()) {
|
if (LOG_ENABLED()) {
|
||||||
LOG(("userfonts (%p) %s", mUserFontSet.get(), message.get()));
|
LOG(("userfonts (%p) %s", mUserFontSet.get(), message.get()));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// try to give the user an indication of where the rule came from
|
// try to give the user an indication of where the rule came from
|
||||||
nsCSSFontFaceRule* rule = FindRuleForUserFontEntry(aUserFontEntry);
|
nsCSSFontFaceRule* rule = FindRuleForUserFontEntry(aUserFontEntry);
|
||||||
|
|||||||
@@ -255,7 +255,6 @@ private:
|
|||||||
|
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
static PRLogModuleInfo *
|
static PRLogModuleInfo *
|
||||||
GetLoaderLog()
|
GetLoaderLog()
|
||||||
{
|
{
|
||||||
@@ -264,7 +263,6 @@ GetLoaderLog()
|
|||||||
sLog = PR_NewLogModule("nsCSSLoader");
|
sLog = PR_NewLogModule("nsCSSLoader");
|
||||||
return sLog;
|
return sLog;
|
||||||
}
|
}
|
||||||
#endif /* PR_LOGGING */
|
|
||||||
|
|
||||||
#define LOG_FORCE(args) PR_LOG(GetLoaderLog(), PR_LOG_ALWAYS, args)
|
#define LOG_FORCE(args) PR_LOG(GetLoaderLog(), PR_LOG_ALWAYS, args)
|
||||||
#define LOG_ERROR(args) PR_LOG(GetLoaderLog(), PR_LOG_ERROR, args)
|
#define LOG_ERROR(args) PR_LOG(GetLoaderLog(), PR_LOG_ERROR, args)
|
||||||
@@ -278,7 +276,6 @@ GetLoaderLog()
|
|||||||
#define LOG_DEBUG_ENABLED() PR_LOG_TEST(GetLoaderLog(), PR_LOG_DEBUG)
|
#define LOG_DEBUG_ENABLED() PR_LOG_TEST(GetLoaderLog(), PR_LOG_DEBUG)
|
||||||
#define LOG_ENABLED() LOG_DEBUG_ENABLED()
|
#define LOG_ENABLED() LOG_DEBUG_ENABLED()
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
#define LOG_URI(format, uri) \
|
#define LOG_URI(format, uri) \
|
||||||
PR_BEGIN_MACRO \
|
PR_BEGIN_MACRO \
|
||||||
NS_ASSERTION(uri, "Logging null uri"); \
|
NS_ASSERTION(uri, "Logging null uri"); \
|
||||||
@@ -288,12 +285,8 @@ GetLoaderLog()
|
|||||||
LOG((format, _logURISpec.get())); \
|
LOG((format, _logURISpec.get())); \
|
||||||
} \
|
} \
|
||||||
PR_END_MACRO
|
PR_END_MACRO
|
||||||
#else // PR_LOGGING
|
|
||||||
#define LOG_URI(format, uri)
|
|
||||||
#endif // PR_LOGGING
|
|
||||||
|
|
||||||
// And some convenience strings...
|
// And some convenience strings...
|
||||||
#ifdef PR_LOGGING
|
|
||||||
static const char* const gStateStrings[] = {
|
static const char* const gStateStrings[] = {
|
||||||
"eSheetStateUnknown",
|
"eSheetStateUnknown",
|
||||||
"eSheetNeedsParser",
|
"eSheetNeedsParser",
|
||||||
@@ -301,7 +294,6 @@ static const char* const gStateStrings[] = {
|
|||||||
"eSheetLoading",
|
"eSheetLoading",
|
||||||
"eSheetComplete"
|
"eSheetComplete"
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
/********************************
|
/********************************
|
||||||
* SheetLoadData implementation *
|
* SheetLoadData implementation *
|
||||||
@@ -673,9 +665,7 @@ SheetLoadData::OnDetermineCharset(nsIUnicharStreamLoader* aLoader,
|
|||||||
// aCharset is now either "UTF-16BE", "UTF-16BE" or "UTF-8"
|
// aCharset is now either "UTF-16BE", "UTF-16BE" or "UTF-8"
|
||||||
// which will swallow the BOM.
|
// which will swallow the BOM.
|
||||||
mCharset.Assign(aCharset);
|
mCharset.Assign(aCharset);
|
||||||
#ifdef PR_LOGGING
|
|
||||||
LOG((" Setting from BOM to: %s", PromiseFlatCString(aCharset).get()));
|
LOG((" Setting from BOM to: %s", PromiseFlatCString(aCharset).get()));
|
||||||
#endif
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -686,9 +676,7 @@ SheetLoadData::OnDetermineCharset(nsIUnicharStreamLoader* aLoader,
|
|||||||
channel->GetContentCharset(specified);
|
channel->GetContentCharset(specified);
|
||||||
if (EncodingUtils::FindEncodingForLabel(specified, aCharset)) {
|
if (EncodingUtils::FindEncodingForLabel(specified, aCharset)) {
|
||||||
mCharset.Assign(aCharset);
|
mCharset.Assign(aCharset);
|
||||||
#ifdef PR_LOGGING
|
|
||||||
LOG((" Setting from HTTP to: %s", PromiseFlatCString(aCharset).get()));
|
LOG((" Setting from HTTP to: %s", PromiseFlatCString(aCharset).get()));
|
||||||
#endif
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -709,10 +697,8 @@ SheetLoadData::OnDetermineCharset(nsIUnicharStreamLoader* aLoader,
|
|||||||
aCharset.AssignLiteral("UTF-8");
|
aCharset.AssignLiteral("UTF-8");
|
||||||
}
|
}
|
||||||
mCharset.Assign(aCharset);
|
mCharset.Assign(aCharset);
|
||||||
#ifdef PR_LOGGING
|
|
||||||
LOG((" Setting from @charset rule to: %s",
|
LOG((" Setting from @charset rule to: %s",
|
||||||
PromiseFlatCString(aCharset).get()));
|
PromiseFlatCString(aCharset).get()));
|
||||||
#endif
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -724,10 +710,8 @@ SheetLoadData::OnDetermineCharset(nsIUnicharStreamLoader* aLoader,
|
|||||||
mOwningElement->GetCharset(specified16);
|
mOwningElement->GetCharset(specified16);
|
||||||
if (EncodingUtils::FindEncodingForLabel(specified16, aCharset)) {
|
if (EncodingUtils::FindEncodingForLabel(specified16, aCharset)) {
|
||||||
mCharset.Assign(aCharset);
|
mCharset.Assign(aCharset);
|
||||||
#ifdef PR_LOGGING
|
|
||||||
LOG((" Setting from charset attribute to: %s",
|
LOG((" Setting from charset attribute to: %s",
|
||||||
PromiseFlatCString(aCharset).get()));
|
PromiseFlatCString(aCharset).get()));
|
||||||
#endif
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -736,10 +720,8 @@ SheetLoadData::OnDetermineCharset(nsIUnicharStreamLoader* aLoader,
|
|||||||
// in via mCharsetHint instead.
|
// in via mCharsetHint instead.
|
||||||
if (EncodingUtils::FindEncodingForLabel(mCharsetHint, aCharset)) {
|
if (EncodingUtils::FindEncodingForLabel(mCharsetHint, aCharset)) {
|
||||||
mCharset.Assign(aCharset);
|
mCharset.Assign(aCharset);
|
||||||
#ifdef PR_LOGGING
|
|
||||||
LOG((" Setting from charset attribute (preload case) to: %s",
|
LOG((" Setting from charset attribute (preload case) to: %s",
|
||||||
PromiseFlatCString(aCharset).get()));
|
PromiseFlatCString(aCharset).get()));
|
||||||
#endif
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -748,10 +730,8 @@ SheetLoadData::OnDetermineCharset(nsIUnicharStreamLoader* aLoader,
|
|||||||
aCharset = mParentData->mCharset;
|
aCharset = mParentData->mCharset;
|
||||||
if (!aCharset.IsEmpty()) {
|
if (!aCharset.IsEmpty()) {
|
||||||
mCharset.Assign(aCharset);
|
mCharset.Assign(aCharset);
|
||||||
#ifdef PR_LOGGING
|
|
||||||
LOG((" Setting from parent sheet to: %s",
|
LOG((" Setting from parent sheet to: %s",
|
||||||
PromiseFlatCString(aCharset).get()));
|
PromiseFlatCString(aCharset).get()));
|
||||||
#endif
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -761,17 +741,13 @@ SheetLoadData::OnDetermineCharset(nsIUnicharStreamLoader* aLoader,
|
|||||||
aCharset = mLoader->mDocument->GetDocumentCharacterSet();
|
aCharset = mLoader->mDocument->GetDocumentCharacterSet();
|
||||||
MOZ_ASSERT(!aCharset.IsEmpty());
|
MOZ_ASSERT(!aCharset.IsEmpty());
|
||||||
mCharset.Assign(aCharset);
|
mCharset.Assign(aCharset);
|
||||||
#ifdef PR_LOGGING
|
|
||||||
LOG((" Setting from document to: %s", PromiseFlatCString(aCharset).get()));
|
LOG((" Setting from document to: %s", PromiseFlatCString(aCharset).get()));
|
||||||
#endif
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
aCharset.AssignLiteral("UTF-8");
|
aCharset.AssignLiteral("UTF-8");
|
||||||
mCharset = aCharset;
|
mCharset = aCharset;
|
||||||
#ifdef PR_LOGGING
|
|
||||||
LOG((" Setting from default to: %s", PromiseFlatCString(aCharset).get()));
|
LOG((" Setting from default to: %s", PromiseFlatCString(aCharset).get()));
|
||||||
#endif
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,6 @@ nsFontFaceLoader::OnStreamComplete(nsIStreamLoader* aLoader,
|
|||||||
|
|
||||||
mFontFaceSet->RemoveLoader(this);
|
mFontFaceSet->RemoveLoader(this);
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
|
||||||
if (LOG_ENABLED()) {
|
if (LOG_ENABLED()) {
|
||||||
nsAutoCString fontURI;
|
nsAutoCString fontURI;
|
||||||
mFontURI->GetSpec(fontURI);
|
mFontURI->GetSpec(fontURI);
|
||||||
@@ -155,7 +154,6 @@ nsFontFaceLoader::OnStreamComplete(nsIStreamLoader* aLoader,
|
|||||||
this, fontURI.get(), aStatus));
|
this, fontURI.get(), aStatus));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
nsPresContext* ctx = mFontFaceSet->GetPresContext();
|
nsPresContext* ctx = mFontFaceSet->GetPresContext();
|
||||||
NS_ASSERTION(ctx && !ctx->PresShell()->IsDestroying(),
|
NS_ASSERTION(ctx && !ctx->PresShell()->IsDestroying(),
|
||||||
|
|||||||
Reference in New Issue
Block a user