зеркало из https://github.com/mozilla/gecko-dev.git
Bug 956447 - Make it possible to get frame dumps in non-DEBUG builds. r=roc
This commit is contained in:
Родитель
452a9d5490
Коммит
e6ea29ce0d
|
@ -48,7 +48,7 @@ nsColorControlFrame::GetType() const
|
|||
return nsGkAtoms::colorControlFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsColorControlFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ public:
|
|||
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -877,7 +877,7 @@ nsComboboxControlFrame::GetType() const
|
|||
return nsGkAtoms::comboboxControlFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsComboboxControlFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -99,7 +99,7 @@ public:
|
|||
return do_QueryFrame(mDropdownFrame);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
|
|
|
@ -92,7 +92,9 @@ public:
|
|||
#ifdef DEBUG
|
||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const {
|
||||
return MakeFrameName(NS_LITERAL_STRING("FieldSet"), aResult);
|
||||
}
|
||||
|
|
|
@ -285,7 +285,7 @@ nsFileControlFrame::ContentStatesChanged(nsEventStates aStates)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsFileControlFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
|
||||
virtual void DestroyFrom(nsIFrame* aDestructRoot) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ nsGfxButtonControlFrame::GetType() const
|
|||
return nsGkAtoms::gfxButtonControlFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsGfxButtonControlFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ public:
|
|||
nsGfxCheckboxControlFrame(nsStyleContext* aContext);
|
||||
virtual ~nsGfxCheckboxControlFrame();
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
|
||||
return MakeFrameName(NS_LITERAL_STRING("CheckboxControl"), aResult);
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
|
||||
return MakeFrameName(NS_LITERAL_STRING("HTMLButtonControl"), aResult);
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const {
|
||||
return MakeFrameName(NS_LITERAL_STRING("ImageControl"), aResult);
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ int32_t nsLegendFrame::GetAlign()
|
|||
return intValue;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsLegendFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@ public:
|
|||
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1471,7 +1471,7 @@ nsListControlFrame::GetType() const
|
|||
return nsGkAtoms::listControlFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsListControlFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -101,7 +101,7 @@ public:
|
|||
~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
|
||||
return MakeFrameName(NS_LITERAL_STRING("Meter"), aResult);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
virtual void AppendAnonymousContentTo(nsBaseContentList& aElements,
|
||||
uint32_t aFilter) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
|
||||
return MakeFrameName(NS_LITERAL_STRING("NumberControl"), aResult);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
|
||||
return MakeFrameName(NS_LITERAL_STRING("Progress"), aResult);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
|
||||
return MakeFrameName(NS_LITERAL_STRING("Range"), aResult);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
aResult.AssignLiteral("nsTextControlFrame");
|
||||
|
|
|
@ -27,7 +27,7 @@ FrameChildListIterator::FrameChildListIterator(const nsIFrame* aFrame)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
const char*
|
||||
ChildListName(FrameChildListID aListID)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace layout {
|
|||
|
||||
// enum FrameChildListID lives in nsFrameList.h to solve circular dependencies.
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
extern const char* ChildListName(FrameChildListID aListID);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -326,7 +326,7 @@ nsBlockFrame::GetSplittableType() const
|
|||
return NS_FRAME_SPLITTABLE_NON_RECTANGULAR;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
void
|
||||
nsBlockFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
|
||||
{
|
||||
|
@ -383,6 +383,14 @@ nsBlockFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
|
|||
fputs(">\n", out);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBlockFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("Block"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP_(nsFrameState)
|
||||
nsBlockFrame::GetDebugStateBits() const
|
||||
{
|
||||
|
@ -390,12 +398,6 @@ nsBlockFrame::GetDebugStateBits() const
|
|||
// regression tester looks at
|
||||
return nsBlockFrameSuper::GetDebugStateBits() & ~NS_BLOCK_HAS_LINE_CURSOR;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBlockFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("Block"), aResult);
|
||||
}
|
||||
#endif
|
||||
|
||||
nsIAtom*
|
||||
|
|
|
@ -171,12 +171,15 @@ public:
|
|||
virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
|
||||
virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const MOZ_OVERRIDE;
|
||||
NS_IMETHOD_(nsFrameState) GetDebugStateBits() const MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD_(nsFrameState) GetDebugStateBits() const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
|
|
@ -60,7 +60,7 @@ nsBulletFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
|||
nsFrame::DestroyFrom(aDestructRoot);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsBulletFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE;
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -610,7 +610,7 @@ nsCanvasFrame::GetContentForEvent(WidgetEvent* aEvent,
|
|||
return rv;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsCanvasFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -99,7 +99,7 @@ public:
|
|||
return rv;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
NS_IMETHOD GetContentForEvent(mozilla::WidgetEvent* aEvent,
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
const nsRect& aDirtyRect,
|
||||
const nsPoint& aPt);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
|
||||
return MakeFrameName(NS_LITERAL_STRING("ColumnSet"), aResult);
|
||||
}
|
||||
|
|
|
@ -1819,7 +1819,7 @@ nsOverflowContinuationTracker::EndFinish(nsIFrame* aChild)
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Debugging
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
void
|
||||
nsContainerFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
|
||||
{
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
virtual bool PeekOffsetCharacter(bool aForward, int32_t* aOffset,
|
||||
bool aRespectClusters = true) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ NS_QUERYFRAME_HEAD(nsFirstLetterFrame)
|
|||
NS_QUERYFRAME_ENTRY(nsFirstLetterFrame)
|
||||
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsFirstLetterFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||
NS_IMETHOD SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
|
|
@ -1268,13 +1268,13 @@ nsFlexContainerFrame::GetType() const
|
|||
return nsGkAtoms::flexContainerFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsFlexContainerFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("FlexContainer"), aResult);
|
||||
}
|
||||
#endif // DEBUG
|
||||
#endif
|
||||
|
||||
// Helper for BuildDisplayList, to implement this special-case for flex items
|
||||
// from the spec:
|
||||
|
|
|
@ -50,9 +50,9 @@ public:
|
|||
GetPrefWidth(nsRenderingContext* aRenderingContext) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif // DEBUG
|
||||
#endif
|
||||
// Flexbox-specific public methods
|
||||
bool IsHorizontal();
|
||||
|
||||
|
|
|
@ -416,7 +416,7 @@ nsFloatManager::GetLowestFloatTop() const
|
|||
return mFloats[mFloats.Length() - 1].mRect.y - mY;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
void
|
||||
DebugListFloatManager(const nsFloatManager *aFloatManager)
|
||||
{
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "nsCoord.h"
|
||||
#include "nsRect.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsFrameList.h" // for DEBUG_FRAME_DUMP
|
||||
|
||||
class nsIPresShell;
|
||||
class nsIFrame;
|
||||
|
@ -269,7 +270,7 @@ public:
|
|||
"float manager state should match saved state");
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
/**
|
||||
* Dump the state of the float manager out to a file.
|
||||
*/
|
||||
|
|
|
@ -193,26 +193,6 @@ nsFrame::GetLogModuleInfo()
|
|||
return gLogModule;
|
||||
}
|
||||
|
||||
void
|
||||
nsIFrame::DumpFrameTree()
|
||||
{
|
||||
RootFrameList(PresContext(), stdout, 0);
|
||||
}
|
||||
|
||||
void
|
||||
nsIFrame::RootFrameList(nsPresContext* aPresContext, FILE* out, int32_t aIndent)
|
||||
{
|
||||
if (!aPresContext || !out)
|
||||
return;
|
||||
|
||||
nsIPresShell *shell = aPresContext->GetPresShell();
|
||||
if (shell) {
|
||||
nsIFrame* frame = shell->FrameManager()->GetRootFrame();
|
||||
if(frame) {
|
||||
frame->List(out, aIndent);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
|
@ -5253,7 +5233,7 @@ nsIFrame::GetContainingBlock() const
|
|||
return GetNearestBlockContainer(GetParent());
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
|
||||
int32_t nsFrame::ContentIndexInContainer(const nsIFrame* aFrame)
|
||||
{
|
||||
|
@ -5368,23 +5348,6 @@ nsFrame::GetFrameName(nsAString& aResult) const
|
|||
return MakeFrameName(NS_LITERAL_STRING("Frame"), aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsFrameState)
|
||||
nsFrame::GetDebugStateBits() const
|
||||
{
|
||||
// We'll ignore these flags for the purposes of comparing frame state:
|
||||
//
|
||||
// NS_FRAME_EXTERNAL_REFERENCE
|
||||
// because this is set by the event state manager or the
|
||||
// caret code when a frame is focused. Depending on whether
|
||||
// or not the regression tests are run as the focused window
|
||||
// will make this value vary randomly.
|
||||
#define IRRELEVANT_FRAME_STATE_FLAGS NS_FRAME_EXTERNAL_REFERENCE
|
||||
|
||||
#define FRAME_STATE_MASK (~(IRRELEVANT_FRAME_STATE_FLAGS))
|
||||
|
||||
return GetStateBits() & FRAME_STATE_MASK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsFrame::MakeFrameName(const nsAString& aType, nsAString& aResult) const
|
||||
{
|
||||
|
@ -5405,6 +5368,46 @@ nsFrame::MakeFrameName(const nsAString& aType, nsAString& aResult) const
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsIFrame::DumpFrameTree()
|
||||
{
|
||||
RootFrameList(PresContext(), stdout, 0);
|
||||
}
|
||||
|
||||
void
|
||||
nsIFrame::RootFrameList(nsPresContext* aPresContext, FILE* out, int32_t aIndent)
|
||||
{
|
||||
if (!aPresContext || !out)
|
||||
return;
|
||||
|
||||
nsIPresShell *shell = aPresContext->GetPresShell();
|
||||
if (shell) {
|
||||
nsIFrame* frame = shell->FrameManager()->GetRootFrame();
|
||||
if(frame) {
|
||||
frame->List(out, aIndent);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP_(nsFrameState)
|
||||
nsFrame::GetDebugStateBits() const
|
||||
{
|
||||
// We'll ignore these flags for the purposes of comparing frame state:
|
||||
//
|
||||
// NS_FRAME_EXTERNAL_REFERENCE
|
||||
// because this is set by the event state manager or the
|
||||
// caret code when a frame is focused. Depending on whether
|
||||
// or not the regression tests are run as the focused window
|
||||
// will make this value vary randomly.
|
||||
#define IRRELEVANT_FRAME_STATE_FLAGS NS_FRAME_EXTERNAL_REFERENCE
|
||||
|
||||
#define FRAME_STATE_MASK (~(IRRELEVANT_FRAME_STATE_FLAGS))
|
||||
|
||||
return GetStateBits() & FRAME_STATE_MASK;
|
||||
}
|
||||
|
||||
void
|
||||
nsFrame::XMLQuote(nsString& aString)
|
||||
{
|
||||
|
|
|
@ -435,10 +435,6 @@ public:
|
|||
// NS_FRAME_IS_DIRTY bit set
|
||||
static void VerifyDirtyBitSet(const nsFrameList& aFrameList);
|
||||
|
||||
// Helper function to return the index in parent of the frame's content
|
||||
// object. Returns -1 on error or if the frame doesn't have a content object
|
||||
static int32_t ContentIndexInContainer(const nsIFrame* aFrame);
|
||||
|
||||
static void XMLQuote(nsString& aString);
|
||||
|
||||
/**
|
||||
|
@ -452,8 +448,6 @@ public:
|
|||
*/
|
||||
virtual void DumpBaseRegressionData(nsPresContext* aPresContext, FILE* out, int32_t aIndent);
|
||||
|
||||
nsresult MakeFrameName(const nsAString& aKind, nsAString& aResult) const;
|
||||
|
||||
// Display Reflow Debugging
|
||||
static void* DisplayReflowEnter(nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
|
@ -652,13 +646,21 @@ private:
|
|||
|
||||
virtual nsILineIterator* GetLineIterator() MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
public:
|
||||
/**
|
||||
* Get a printable from of the name of the frame type.
|
||||
* XXX This should be eliminated and we use GetType() instead...
|
||||
*/
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
nsresult MakeFrameName(const nsAString& aKind, nsAString& aResult) const;
|
||||
// Helper function to return the index in parent of the frame's content
|
||||
// object. Returns -1 on error or if the frame doesn't have a content object
|
||||
static int32_t ContentIndexInContainer(const nsIFrame* aFrame);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
public:
|
||||
/**
|
||||
* Return the state bits that are relevant to regression tests (that
|
||||
* is, those bits which indicate a real difference when they differ
|
||||
|
|
|
@ -331,7 +331,7 @@ nsFrameList::UnhookFrameFromSiblings(nsIFrame* aFrame)
|
|||
MOZ_ASSERT(!aFrame->GetPrevSibling() && !aFrame->GetNextSibling());
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
void
|
||||
nsFrameList::List(FILE* out) const
|
||||
{
|
||||
|
|
|
@ -9,6 +9,12 @@
|
|||
#include <stdio.h> /* for FILE* */
|
||||
#include "nsDebug.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
// DEBUG_FRAME_DUMP enables nsIFrame::List and related methods.
|
||||
// You can also define this in a non-DEBUG build if you need frame dumps.
|
||||
#define DEBUG_FRAME_DUMP 1
|
||||
#endif
|
||||
|
||||
class nsIFrame;
|
||||
class nsIPresShell;
|
||||
class nsPresContext;
|
||||
|
@ -277,7 +283,7 @@ public:
|
|||
nsIFrame* GetNextVisualFor(nsIFrame* aFrame) const;
|
||||
#endif // IBMBIDI
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
void List(FILE* out) const;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ class nsHTMLFramesetBorderFrame : public nsLeafFrame
|
|||
public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
|
@ -136,7 +136,7 @@ public:
|
|||
NS_DECL_QUERYFRAME
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("FramesetBlank"), aResult);
|
||||
|
@ -1148,7 +1148,7 @@ nsHTMLFramesetFrame::GetType() const
|
|||
return nsGkAtoms::frameSetFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsHTMLFramesetFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
@ -1609,7 +1609,7 @@ nsHTMLFramesetBorderFrame::GetCursor(const nsPoint& aPoint,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP nsHTMLFramesetBorderFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("FramesetBorder"), aResult);
|
||||
|
|
|
@ -104,7 +104,7 @@ public:
|
|||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -866,7 +866,7 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsHTMLScrollFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
@ -1190,7 +1190,7 @@ nsXULScrollFrame::GetMaxSize(nsBoxLayoutState& aState)
|
|||
return maxSize;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsXULScrollFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -674,7 +674,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
@ -980,7 +980,7 @@ public:
|
|||
return nsBoxFrame::IsFrameOfType(aFlags);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -334,7 +334,7 @@ nsHTMLCanvasFrame::AccessibleType()
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsHTMLCanvasFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
return nsSplittableFrame::IsFrameOfType(aFlags & ~(nsIFrame::eReplaced));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3235,7 +3235,7 @@ private:
|
|||
template<bool IsLessThanOrEqual(nsIFrame*, nsIFrame*)>
|
||||
static nsIFrame* MergeSort(nsIFrame *aSource);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
public:
|
||||
static void IndentBy(FILE* out, int32_t aIndent) {
|
||||
while (--aIndent >= 0) fputs(" ", out);
|
||||
|
@ -3263,6 +3263,10 @@ public:
|
|||
virtual void DumpFrameTree();
|
||||
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const = 0;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
public:
|
||||
NS_IMETHOD_(nsFrameState) GetDebugStateBits() const = 0;
|
||||
NS_IMETHOD DumpRegressionData(nsPresContext* aPresContext,
|
||||
FILE* out, int32_t aIndent) = 0;
|
||||
|
|
|
@ -1745,7 +1745,7 @@ nsImageFrame::GetType() const
|
|||
return nsGkAtoms::imageFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsImageFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
return ImageFrameSuper::IsFrameOfType(aFlags & ~(nsIFrame::eReplaced));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const;
|
||||
#endif
|
||||
|
|
|
@ -43,7 +43,7 @@ NS_QUERYFRAME_HEAD(nsInlineFrame)
|
|||
NS_QUERYFRAME_ENTRY(nsInlineFrame)
|
||||
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsInlineFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
@ -990,7 +990,7 @@ nsFirstLineFrame::Init(nsIContent* aContent, nsIFrame* aParent,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsFirstLineFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
virtual mozilla::a11y::AccType AccessibleType() MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
@ -200,7 +200,7 @@ public:
|
|||
|
||||
friend nsIFrame* NS_NewFirstLineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
|
|
@ -167,7 +167,7 @@ nsLineBox::Cleanup()
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
static void
|
||||
ListFloats(FILE* out, int32_t aIndent, const nsFloatCacheList& aFloats)
|
||||
{
|
||||
|
@ -188,9 +188,7 @@ ListFloats(FILE* out, int32_t aIndent, const nsFloatCacheList& aFloats)
|
|||
fc = fc->Next();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
const char *
|
||||
BreakTypeToString(uint8_t aBreakType)
|
||||
{
|
||||
|
|
|
@ -496,7 +496,7 @@ public:
|
|||
nsIFrame* aLastFrameBeforeEnd,
|
||||
int32_t* aFrameIndexInLine);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
char* StateToString(char* aBuf, int32_t aBufSize) const;
|
||||
|
||||
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const;
|
||||
|
|
|
@ -290,7 +290,7 @@ nsObjectFrame::GetType() const
|
|||
return nsGkAtoms::objectFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsObjectFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
|
||||
virtual bool NeedsView() { return true; }
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ nsPageContentFrame::GetType() const
|
|||
return nsGkAtoms::pageContentFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsPageContentFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
// Debugging
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
|
|
@ -168,7 +168,7 @@ nsPageFrame::GetType() const
|
|||
return nsGkAtoms::pageFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsPageFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
@ -681,7 +681,7 @@ nsPageBreakFrame::GetType() const
|
|||
return nsGkAtoms::pageBreakFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsPageBreakFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
@ -110,7 +110,7 @@ class nsPageBreakFrame : public nsLeafFrame
|
|||
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
#endif // DEBUG || (MOZ_REFLOW_PERF_DSP && MOZ_REFLOW_PERF)
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsPlaceholderFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
@ -247,4 +247,4 @@ nsPlaceholderFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
|
|||
}
|
||||
fputs("\n", out);
|
||||
}
|
||||
#endif // DEBUG
|
||||
#endif
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
|
||||
#endif // DEBUG || (MOZ_REFLOW_PERF_DSP && MOZ_REFLOW_PERF)
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif // DEBUG
|
||||
|
|
|
@ -302,7 +302,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext,
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsSimplePageSequenceFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -110,7 +110,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -511,7 +511,7 @@ nsSubDocumentFrame::GetIntrinsicHeight()
|
|||
return nsPresContext::CSSPixelsToAppUnits(150);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
void
|
||||
nsSubDocumentFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
|
||||
nsSubDocumentFrame(nsStyleContext* aContext);
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
|
|
@ -8399,44 +8399,6 @@ nsresult nsTextFrame::GetRenderedText(nsAString* aAppendToString,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
// Translate the mapped content into a string that's printable
|
||||
void
|
||||
nsTextFrame::ToCString(nsCString& aBuf, int32_t* aTotalContentLength) const
|
||||
{
|
||||
// Get the frames text content
|
||||
const nsTextFragment* frag = mContent->GetText();
|
||||
if (!frag) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Compute the total length of the text content.
|
||||
*aTotalContentLength = frag->GetLength();
|
||||
|
||||
int32_t contentLength = GetContentLength();
|
||||
// Set current fragment and current fragment offset
|
||||
if (0 == contentLength) {
|
||||
return;
|
||||
}
|
||||
int32_t fragOffset = GetContentOffset();
|
||||
int32_t n = fragOffset + contentLength;
|
||||
while (fragOffset < n) {
|
||||
char16_t ch = frag->CharAt(fragOffset++);
|
||||
if (ch == '\r') {
|
||||
aBuf.AppendLiteral("\\r");
|
||||
} else if (ch == '\n') {
|
||||
aBuf.AppendLiteral("\\n");
|
||||
} else if (ch == '\t') {
|
||||
aBuf.AppendLiteral("\\t");
|
||||
} else if ((ch < ' ') || (ch >= 127)) {
|
||||
aBuf.Append(nsPrintfCString("\\u%04x", ch));
|
||||
} else {
|
||||
aBuf.Append(ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
nsIAtom*
|
||||
nsTextFrame::GetType() const
|
||||
{
|
||||
|
@ -8475,7 +8437,43 @@ nsTextFrame::IsEmpty()
|
|||
return isEmpty;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
// Translate the mapped content into a string that's printable
|
||||
void
|
||||
nsTextFrame::ToCString(nsCString& aBuf, int32_t* aTotalContentLength) const
|
||||
{
|
||||
// Get the frames text content
|
||||
const nsTextFragment* frag = mContent->GetText();
|
||||
if (!frag) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Compute the total length of the text content.
|
||||
*aTotalContentLength = frag->GetLength();
|
||||
|
||||
int32_t contentLength = GetContentLength();
|
||||
// Set current fragment and current fragment offset
|
||||
if (0 == contentLength) {
|
||||
return;
|
||||
}
|
||||
int32_t fragOffset = GetContentOffset();
|
||||
int32_t n = fragOffset + contentLength;
|
||||
while (fragOffset < n) {
|
||||
char16_t ch = frag->CharAt(fragOffset++);
|
||||
if (ch == '\r') {
|
||||
aBuf.AppendLiteral("\\r");
|
||||
} else if (ch == '\n') {
|
||||
aBuf.AppendLiteral("\\n");
|
||||
} else if (ch == '\t') {
|
||||
aBuf.AppendLiteral("\\t");
|
||||
} else if ((ch < ' ') || (ch >= 127)) {
|
||||
aBuf.Append(nsPrintfCString("\\u%04x", ch));
|
||||
} else {
|
||||
aBuf.Append(ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTextFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
@ -8488,14 +8486,6 @@ nsTextFrame::GetFrameName(nsAString& aResult) const
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsFrameState)
|
||||
nsTextFrame::GetDebugStateBits() const
|
||||
{
|
||||
// mask out our emptystate flags; those are just caches
|
||||
return nsFrame::GetDebugStateBits() &
|
||||
~(TEXT_WHITESPACE_FLAGS | TEXT_REFLOW_FLAGS);
|
||||
}
|
||||
|
||||
void
|
||||
nsTextFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
|
||||
{
|
||||
|
@ -8515,6 +8505,16 @@ nsTextFrame::List(FILE* out, int32_t aIndent, uint32_t aFlags) const
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP_(nsFrameState)
|
||||
nsTextFrame::GetDebugStateBits() const
|
||||
{
|
||||
// mask out our emptystate flags; those are just caches
|
||||
return nsFrame::GetDebugStateBits() &
|
||||
~(TEXT_WHITESPACE_FLAGS | TEXT_REFLOW_FLAGS);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
nsTextFrame::AdjustOffsetsForBidi(int32_t aStart, int32_t aEnd)
|
||||
{
|
||||
|
|
|
@ -129,9 +129,13 @@ public:
|
|||
virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
|
||||
virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
void List(FILE* out, int32_t aIndent, uint32_t aFlags = 0) const MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
void ToCString(nsCString& aBuf, int32_t* aTotalContentLength) const;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD_(nsFrameState) GetDebugStateBits() const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
@ -431,10 +435,6 @@ public:
|
|||
|
||||
int16_t GetSelectionStatus(int16_t* aSelectionFlags);
|
||||
|
||||
#ifdef DEBUG
|
||||
void ToCString(nsCString& aBuf, int32_t* aTotalContentLength) const;
|
||||
#endif
|
||||
|
||||
int32_t GetContentOffset() const { return mContentOffset; }
|
||||
int32_t GetContentLength() const
|
||||
{
|
||||
|
|
|
@ -467,7 +467,7 @@ nsVideoFrame::AccessibleType()
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsVideoFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
|
||||
nsIContent *GetCaptionOverlay() { return mCaptionDiv; }
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -298,7 +298,7 @@ ViewportFrame::GetType() const
|
|||
return nsGkAtoms::viewportFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
ViewportFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -77,7 +77,7 @@ public:
|
|||
*/
|
||||
nsRect AdjustReflowStateAsContainingBlock(nsHTMLReflowState* aReflowState) const;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
aFlags & ~(nsIFrame::eSVG | nsIFrame::eSVGContainer));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGFEContainer"), aResult);
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
return SVGFEImageFrameBase::IsFrameOfType(aFlags & ~(nsIFrame::eSVG));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGFEImage"), aResult);
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
return SVGFELeafFrameBase::IsFrameOfType(aFlags & ~(nsIFrame::eSVG));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGFELeaf"), aResult);
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
return SVGFEUnstyledLeafFrameBase::IsFrameOfType(aFlags & ~(nsIFrame::eSVG));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGFEUnstyledLeaf"), aResult);
|
||||
|
|
|
@ -295,7 +295,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGText"), aResult);
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
return SVGViewFrameBase::IsFrameOfType(aFlags & ~(nsIFrame::eSVG));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGView"), aResult);
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGA"), aResult);
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGClipPath"), aResult);
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
virtual bool IsSVGTransformed(Matrix *aOwnTransform,
|
||||
Matrix *aFromParentTransform) const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGForeignObject"), aResult);
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGG"), aResult);
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGGenericContainer"), aResult);
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
nsIAtom* aAttribute,
|
||||
int32_t aModType) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGGradient"), aResult);
|
||||
|
@ -149,7 +149,7 @@ public:
|
|||
nsIAtom* aAttribute,
|
||||
int32_t aModType) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGLinearGradient"), aResult);
|
||||
|
@ -194,7 +194,7 @@ public:
|
|||
nsIAtom* aAttribute,
|
||||
int32_t aModType) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGRadialGradient"), aResult);
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGImage"), aResult);
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGInnerSVG"), aResult);
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGMarker"), aResult);
|
||||
|
@ -162,7 +162,9 @@ public:
|
|||
virtual void Init(nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGMarkerAnonChild"), aResult);
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGMask"), aResult);
|
||||
|
|
|
@ -77,7 +77,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGOuterSVG"), aResult);
|
||||
|
@ -248,7 +248,9 @@ public:
|
|||
virtual void Init(nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGOuterSVGAnonChild"), aResult);
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public:
|
|||
virtual bool IsSVGTransformed(Matrix *aOwnTransforms = nullptr,
|
||||
Matrix *aFromParentTransforms = nullptr) const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGPathGeometry"), aResult);
|
||||
|
|
|
@ -73,7 +73,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGPattern"), aResult);
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
return nsSVGStopFrameBase::IsFrameOfType(aFlags & ~(nsIFrame::eSVG));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGStop"), aResult);
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGSwitch"), aResult);
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
|
||||
virtual bool IsLeaf() const;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
return MakeFrameName(NS_LITERAL_STRING("SVGUse"), aResult);
|
||||
|
|
|
@ -1056,7 +1056,7 @@ nsTableCellFrame::GetType() const
|
|||
return nsGkAtoms::tableCellFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsTableCellFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
@ -1099,7 +1099,7 @@ nsBCTableCellFrame::GetBorderRadii(nscoord aRadii[8]) const
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsBCTableCellFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -123,7 +123,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
@ -316,7 +316,7 @@ public:
|
|||
|
||||
virtual nsMargin GetBorderOverflow() MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ nsTableColFrame::GetType() const
|
|||
return nsGkAtoms::tableColFrame;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsTableColFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
*/
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -480,7 +480,7 @@ nsTableColGroupFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDis
|
|||
GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
NS_IMETHODIMP
|
||||
nsTableColGroupFrame::GetFrameName(nsAString& aResult) const
|
||||
{
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче