Bug 1781034 - Remove layout debugger's visual debugging. r=layout-reviewers,dshin
Differential Revision: https://phabricator.services.mozilla.com/D152628
This commit is contained in:
@@ -2231,12 +2231,6 @@ void PresShell::NotifyDestroyingFrame(nsIFrame* aFrame) {
|
|||||||
mCurrentEventFrame = nullptr;
|
mCurrentEventFrame = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
if (aFrame == mDrawEventTargetFrame) {
|
|
||||||
mDrawEventTargetFrame = nullptr;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (unsigned int i = 0; i < mCurrentEventFrameStack.Length(); i++) {
|
for (unsigned int i = 0; i < mCurrentEventFrameStack.Length(); i++) {
|
||||||
if (aFrame == mCurrentEventFrameStack.ElementAt(i)) {
|
if (aFrame == mCurrentEventFrameStack.ElementAt(i)) {
|
||||||
// One of our stack frames was deleted. Get its content so that when we
|
// One of our stack frames was deleted. Get its content so that when we
|
||||||
@@ -7112,9 +7106,6 @@ nsresult PresShell::EventHandler::HandleEventUsingCoordinates(
|
|||||||
nsresult rv = eventHandler.HandleEventWithCurrentEventInfo(
|
nsresult rv = eventHandler.HandleEventWithCurrentEventInfo(
|
||||||
aGUIEvent, aEventStatus, true,
|
aGUIEvent, aEventStatus, true,
|
||||||
MOZ_KnownLive(eventTargetData.mOverrideClickTarget));
|
MOZ_KnownLive(eventTargetData.mOverrideClickTarget));
|
||||||
#ifdef DEBUG
|
|
||||||
eventTargetData.mPresShell->ShowEventTargetDebug();
|
|
||||||
#endif
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7911,11 +7902,6 @@ nsresult PresShell::EventHandler::HandleEventAtFocusedContent(
|
|||||||
|
|
||||||
nsresult rv =
|
nsresult rv =
|
||||||
HandleEventWithCurrentEventInfo(aGUIEvent, aEventStatus, true, nullptr);
|
HandleEventWithCurrentEventInfo(aGUIEvent, aEventStatus, true, nullptr);
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
mPresShell->ShowEventTargetDebug();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8017,10 +8003,6 @@ nsresult PresShell::EventHandler::HandleEventWithFrameForPresShell(
|
|||||||
HandleEventWithCurrentEventInfo(aGUIEvent, aEventStatus, true, nullptr);
|
HandleEventWithCurrentEventInfo(aGUIEvent, aEventStatus, true, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
mPresShell->ShowEventTargetDebug();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8052,19 +8034,6 @@ Document* PresShell::GetPrimaryContentDocument() {
|
|||||||
return childDocShell->GetExtantDocument();
|
return childDocShell->GetExtantDocument();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
void PresShell::ShowEventTargetDebug() {
|
|
||||||
if (nsIFrame::GetShowEventTargetFrameBorder() && GetCurrentEventFrame()) {
|
|
||||||
if (mDrawEventTargetFrame) {
|
|
||||||
mDrawEventTargetFrame->InvalidateFrame();
|
|
||||||
}
|
|
||||||
|
|
||||||
mDrawEventTargetFrame = mCurrentEventFrame;
|
|
||||||
mDrawEventTargetFrame->InvalidateFrame();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
nsresult PresShell::EventHandler::HandleEventWithTarget(
|
nsresult PresShell::EventHandler::HandleEventWithTarget(
|
||||||
WidgetEvent* aEvent, nsIFrame* aNewEventFrame, nsIContent* aNewEventContent,
|
WidgetEvent* aEvent, nsIFrame* aNewEventFrame, nsIContent* aNewEventContent,
|
||||||
nsEventStatus* aEventStatus, bool aIsHandlingNativeEvent,
|
nsEventStatus* aEventStatus, bool aIsHandlingNativeEvent,
|
||||||
|
|||||||
@@ -1731,10 +1731,6 @@ class PresShell final : public nsStubDocumentObserver,
|
|||||||
*/
|
*/
|
||||||
void NotifyDestroyingFrame(nsIFrame* aFrame);
|
void NotifyDestroyingFrame(nsIFrame* aFrame);
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
nsIFrame* GetDrawEventTargetFrame() { return mDrawEventTargetFrame; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool GetZoomableByAPZ() const;
|
bool GetZoomableByAPZ() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -2833,14 +2829,11 @@ class PresShell final : public nsStubDocumentObserver,
|
|||||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY bool VerifyIncrementalReflow();
|
MOZ_CAN_RUN_SCRIPT_BOUNDARY bool VerifyIncrementalReflow();
|
||||||
MOZ_CAN_RUN_SCRIPT_BOUNDARY void DoVerifyReflow();
|
MOZ_CAN_RUN_SCRIPT_BOUNDARY void DoVerifyReflow();
|
||||||
void VerifyHasDirtyRootAncestor(nsIFrame* aFrame);
|
void VerifyHasDirtyRootAncestor(nsIFrame* aFrame);
|
||||||
void ShowEventTargetDebug();
|
|
||||||
|
|
||||||
bool mInVerifyReflow = false;
|
bool mInVerifyReflow = false;
|
||||||
// The reflow root under which we're currently reflowing. Null when
|
// The reflow root under which we're currently reflowing. Null when
|
||||||
// not in reflow.
|
// not in reflow.
|
||||||
nsIFrame* mCurrentReflowRoot = nullptr;
|
nsIFrame* mCurrentReflowRoot = nullptr;
|
||||||
|
|
||||||
nsIFrame* mDrawEventTargetFrame = nullptr;
|
|
||||||
#endif // #ifdef DEBUG
|
#endif // #ifdef DEBUG
|
||||||
|
|
||||||
// Send, and reset, the current per tick telemetry. This includes:
|
// Send, and reset, the current per tick telemetry. This includes:
|
||||||
|
|||||||
@@ -303,21 +303,6 @@ std::ostream& operator<<(std::ostream& aStream, const nsReflowStatus& aStatus) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
static bool gShowFrameBorders = false;
|
|
||||||
|
|
||||||
void nsIFrame::ShowFrameBorders(bool aEnable) { gShowFrameBorders = aEnable; }
|
|
||||||
|
|
||||||
bool nsIFrame::GetShowFrameBorders() { return gShowFrameBorders; }
|
|
||||||
|
|
||||||
static bool gShowEventTargetFrameBorder = false;
|
|
||||||
|
|
||||||
void nsIFrame::ShowEventTargetFrameBorder(bool aEnable) {
|
|
||||||
gShowEventTargetFrameBorder = aEnable;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool nsIFrame::GetShowEventTargetFrameBorder() {
|
|
||||||
return gShowEventTargetFrameBorder;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note: the log module is created during library initialization which
|
* Note: the log module is created during library initialization which
|
||||||
@@ -2762,45 +2747,6 @@ nsSize nsIFrame::OverflowClipMargin(PhysicalAxes aClipAxes) const {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
static void PaintDebugBorder(nsIFrame* aFrame, DrawTarget* aDrawTarget,
|
|
||||||
const nsRect& aDirtyRect, nsPoint aPt) {
|
|
||||||
nsRect r(aPt, aFrame->GetSize());
|
|
||||||
int32_t appUnitsPerDevPixel = aFrame->PresContext()->AppUnitsPerDevPixel();
|
|
||||||
sRGBColor blueOrRed(aFrame->HasView() ? sRGBColor(0.f, 0.f, 1.f, 1.f)
|
|
||||||
: sRGBColor(1.f, 0.f, 0.f, 1.f));
|
|
||||||
aDrawTarget->StrokeRect(NSRectToRect(r, appUnitsPerDevPixel),
|
|
||||||
ColorPattern(ToDeviceColor(blueOrRed)));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void PaintEventTargetBorder(nsIFrame* aFrame, DrawTarget* aDrawTarget,
|
|
||||||
const nsRect& aDirtyRect, nsPoint aPt) {
|
|
||||||
nsRect r(aPt, aFrame->GetSize());
|
|
||||||
int32_t appUnitsPerDevPixel = aFrame->PresContext()->AppUnitsPerDevPixel();
|
|
||||||
ColorPattern purple(ToDeviceColor(sRGBColor(.5f, 0.f, .5f, 1.f)));
|
|
||||||
aDrawTarget->StrokeRect(NSRectToRect(r, appUnitsPerDevPixel), purple);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void DisplayDebugBorders(nsDisplayListBuilder* aBuilder,
|
|
||||||
nsIFrame* aFrame,
|
|
||||||
const nsDisplayListSet& aLists) {
|
|
||||||
// Draw a border around the child
|
|
||||||
// REVIEW: From nsContainerFrame::PaintChild
|
|
||||||
if (nsIFrame::GetShowFrameBorders() && !aFrame->GetRect().IsEmpty()) {
|
|
||||||
aLists.Outlines()->AppendNewToTop<nsDisplayGeneric>(
|
|
||||||
aBuilder, aFrame, PaintDebugBorder, "DebugBorder",
|
|
||||||
DisplayItemType::TYPE_DEBUG_BORDER);
|
|
||||||
}
|
|
||||||
// Draw a border around the current event target
|
|
||||||
if (nsIFrame::GetShowEventTargetFrameBorder() &&
|
|
||||||
aFrame->PresShell()->GetDrawEventTargetFrame() == aFrame) {
|
|
||||||
aLists.Outlines()->AppendNewToTop<nsDisplayGeneric>(
|
|
||||||
aBuilder, aFrame, PaintEventTargetBorder, "EventTargetBorder",
|
|
||||||
DisplayItemType::TYPE_EVENT_TARGET_BORDER);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether a display item that gets created with the builder's current
|
* Returns whether a display item that gets created with the builder's current
|
||||||
* state will have a scrolled clip, i.e. a clip that is scrolled by a scroll
|
* state will have a scrolled clip, i.e. a clip that is scrolled by a scroll
|
||||||
@@ -3494,10 +3440,6 @@ void nsIFrame::BuildDisplayListForStackingContext(
|
|||||||
nsDisplayList resultList(aBuilder);
|
nsDisplayList resultList(aBuilder);
|
||||||
set.SerializeWithCorrectZOrder(&resultList, content);
|
set.SerializeWithCorrectZOrder(&resultList, content);
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
DisplayDebugBorders(aBuilder, this, set);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Get the ASR to use for the container items that we create here.
|
// Get the ASR to use for the container items that we create here.
|
||||||
const ActiveScrolledRoot* containerItemASR = contASRTracker.GetContainerASR();
|
const ActiveScrolledRoot* containerItemASR = contASRTracker.GetContainerASR();
|
||||||
|
|
||||||
@@ -3997,9 +3939,6 @@ void nsIFrame::BuildDisplayListForSimpleChild(nsDisplayListBuilder* aBuilder,
|
|||||||
aChild->SetBuiltDisplayList(true);
|
aChild->SetBuiltDisplayList(true);
|
||||||
aBuilder->Check();
|
aBuilder->Check();
|
||||||
aBuilder->DisplayCaret(aChild, aLists.Outlines());
|
aBuilder->DisplayCaret(aChild, aLists.Outlines());
|
||||||
#ifdef DEBUG
|
|
||||||
DisplayDebugBorders(aBuilder, aChild, aLists);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIFrame::DisplayChildFlag nsIFrame::DisplayFlagForFlexOrGridItem() const {
|
nsIFrame::DisplayChildFlag nsIFrame::DisplayFlagForFlexOrGridItem() const {
|
||||||
@@ -4322,9 +4261,6 @@ void nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||||||
child->BuildDisplayList(aBuilder, aLists);
|
child->BuildDisplayList(aBuilder, aLists);
|
||||||
aBuilder->Check();
|
aBuilder->Check();
|
||||||
aBuilder->DisplayCaret(child, aLists.Outlines());
|
aBuilder->DisplayCaret(child, aLists.Outlines());
|
||||||
#ifdef DEBUG
|
|
||||||
DisplayDebugBorders(aBuilder, child, aLists);
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4350,9 +4286,6 @@ void nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||||||
list.AppendToTop(pseudoStack.Content());
|
list.AppendToTop(pseudoStack.Content());
|
||||||
list.AppendToTop(pseudoStack.Outlines());
|
list.AppendToTop(pseudoStack.Outlines());
|
||||||
extraPositionedDescendants.AppendToTop(pseudoStack.PositionedDescendants());
|
extraPositionedDescendants.AppendToTop(pseudoStack.PositionedDescendants());
|
||||||
#ifdef DEBUG
|
|
||||||
DisplayDebugBorders(aBuilder, child, aLists);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buildingForChild.RestoreBuildingInvisibleItemsValue();
|
buildingForChild.RestoreBuildingInvisibleItemsValue();
|
||||||
|
|||||||
@@ -5503,14 +5503,6 @@ class nsIFrame : public nsQueryFrame {
|
|||||||
static void DisplayReflowShutdown();
|
static void DisplayReflowShutdown();
|
||||||
|
|
||||||
static mozilla::LazyLogModule sFrameLogModule;
|
static mozilla::LazyLogModule sFrameLogModule;
|
||||||
|
|
||||||
// Show frame borders when rendering
|
|
||||||
static void ShowFrameBorders(bool aEnable);
|
|
||||||
static bool GetShowFrameBorders();
|
|
||||||
|
|
||||||
// Show frame border of event target
|
|
||||||
static void ShowEventTargetFrameBorder(bool aEnable);
|
|
||||||
static bool GetShowEventTargetFrameBorder();
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1936,21 +1936,6 @@ ImgDrawResult nsImageFrame::DisplayAltFeedbackWithoutLayer(
|
|||||||
return textDrawResult ? ImgDrawResult::SUCCESS : ImgDrawResult::NOT_READY;
|
return textDrawResult ? ImgDrawResult::SUCCESS : ImgDrawResult::NOT_READY;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
static void PaintDebugImageMap(nsIFrame* aFrame, DrawTarget* aDrawTarget,
|
|
||||||
const nsRect& aDirtyRect, nsPoint aPt) {
|
|
||||||
nsImageFrame* f = static_cast<nsImageFrame*>(aFrame);
|
|
||||||
nsRect inner = f->GetContentRectRelativeToSelf() + aPt;
|
|
||||||
gfxPoint devPixelOffset = nsLayoutUtils::PointToGfxPoint(
|
|
||||||
inner.TopLeft(), aFrame->PresContext()->AppUnitsPerDevPixel());
|
|
||||||
AutoRestoreTransform autoRestoreTransform(aDrawTarget);
|
|
||||||
aDrawTarget->SetTransform(
|
|
||||||
aDrawTarget->GetTransform().PreTranslate(ToPoint(devPixelOffset)));
|
|
||||||
f->GetImageMap()->Draw(aFrame, *aDrawTarget,
|
|
||||||
ColorPattern(ToDeviceColor(sRGBColor::OpaqueBlack())));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// We want to sync-decode in this case, as otherwise we either need to flash
|
// We want to sync-decode in this case, as otherwise we either need to flash
|
||||||
// white while waiting to decode the new image, or paint the old image with a
|
// white while waiting to decode the new image, or paint the old image with a
|
||||||
// different aspect-ratio, which would be bad as it'd be stretched.
|
// different aspect-ratio, which would be bad as it'd be stretched.
|
||||||
@@ -2294,14 +2279,6 @@ void nsImageFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
gIconLoad->RemoveIconObserver(this);
|
gIconLoad->RemoveIconObserver(this);
|
||||||
mDisplayingIcon = false;
|
mDisplayingIcon = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
if (GetShowFrameBorders() && GetImageMap()) {
|
|
||||||
aLists.Outlines()->AppendNewToTop<nsDisplayGeneric>(
|
|
||||||
aBuilder, this, PaintDebugImageMap, "DebugImageMap",
|
|
||||||
DisplayItemType::TYPE_DEBUG_IMAGE_MAP);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -234,37 +234,11 @@ ComputedStyle* nsPlaceholderFrame::GetLayoutParentStyleForOutOfFlow(
|
|||||||
return *aProviderFrame ? (*aProviderFrame)->Style() : nullptr;
|
return *aProviderFrame ? (*aProviderFrame)->Style() : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
static void PaintDebugPlaceholder(nsIFrame* aFrame, DrawTarget* aDrawTarget,
|
|
||||||
const nsRect& aDirtyRect, nsPoint aPt) {
|
|
||||||
ColorPattern cyan(ToDeviceColor(sRGBColor(0.f, 1.f, 1.f, 1.f)));
|
|
||||||
int32_t appUnitsPerDevPixel = aFrame->PresContext()->AppUnitsPerDevPixel();
|
|
||||||
|
|
||||||
nscoord x = nsPresContext::CSSPixelsToAppUnits(-5);
|
|
||||||
nsRect r(aPt.x + x, aPt.y, nsPresContext::CSSPixelsToAppUnits(13),
|
|
||||||
nsPresContext::CSSPixelsToAppUnits(3));
|
|
||||||
aDrawTarget->FillRect(NSRectToRect(r, appUnitsPerDevPixel), cyan);
|
|
||||||
|
|
||||||
nscoord y = nsPresContext::CSSPixelsToAppUnits(-10);
|
|
||||||
r = nsRect(aPt.x, aPt.y + y, nsPresContext::CSSPixelsToAppUnits(3),
|
|
||||||
nsPresContext::CSSPixelsToAppUnits(10));
|
|
||||||
aDrawTarget->FillRect(NSRectToRect(r, appUnitsPerDevPixel), cyan);
|
|
||||||
}
|
|
||||||
#endif // DEBUG
|
|
||||||
|
|
||||||
#if defined(DEBUG) || (defined(MOZ_REFLOW_PERF_DSP) && defined(MOZ_REFLOW_PERF))
|
#if defined(DEBUG) || (defined(MOZ_REFLOW_PERF_DSP) && defined(MOZ_REFLOW_PERF))
|
||||||
|
|
||||||
void nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
void nsPlaceholderFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
const nsDisplayListSet& aLists) {
|
const nsDisplayListSet& aLists) {
|
||||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsPlaceholderFrame");
|
DO_GLOBAL_REFLOW_COUNT_DSP("nsPlaceholderFrame");
|
||||||
|
|
||||||
# ifdef DEBUG
|
|
||||||
if (GetShowFrameBorders()) {
|
|
||||||
aLists.Outlines()->AppendNewToTop<nsDisplayGeneric>(
|
|
||||||
aBuilder, this, PaintDebugPlaceholder, "DebugPlaceholder",
|
|
||||||
DisplayItemType::TYPE_DEBUG_PLACEHOLDER);
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
#endif // DEBUG || (MOZ_REFLOW_PERF_DSP && MOZ_REFLOW_PERF)
|
#endif // DEBUG || (MOZ_REFLOW_PERF_DSP && MOZ_REFLOW_PERF)
|
||||||
|
|
||||||
|
|||||||
@@ -110,9 +110,6 @@ DECLARE_DISPLAY_ITEM_TYPE(XUL_IMAGE, 0)
|
|||||||
DECLARE_DISPLAY_ITEM_TYPE(XUL_TEXT_BOX, TYPE_RENDERS_NO_IMAGES)
|
DECLARE_DISPLAY_ITEM_TYPE(XUL_TEXT_BOX, TYPE_RENDERS_NO_IMAGES)
|
||||||
DECLARE_DISPLAY_ITEM_TYPE(XUL_TREE_BODY, 0)
|
DECLARE_DISPLAY_ITEM_TYPE(XUL_TREE_BODY, 0)
|
||||||
DECLARE_DISPLAY_ITEM_TYPE(XUL_TREE_COL_SPLITTER_TARGET, TYPE_RENDERS_NO_IMAGES)
|
DECLARE_DISPLAY_ITEM_TYPE(XUL_TREE_COL_SPLITTER_TARGET, TYPE_RENDERS_NO_IMAGES)
|
||||||
#ifdef DEBUG_LAYOUT
|
|
||||||
DECLARE_DISPLAY_ITEM_TYPE(XUL_DEBUG, TYPE_RENDERS_NO_IMAGES)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DECLARE_DISPLAY_ITEM_TYPE(MATHML_BAR, TYPE_RENDERS_NO_IMAGES)
|
DECLARE_DISPLAY_ITEM_TYPE(MATHML_BAR, TYPE_RENDERS_NO_IMAGES)
|
||||||
DECLARE_DISPLAY_ITEM_TYPE(MATHML_CHAR_FOREGROUND, TYPE_RENDERS_NO_IMAGES)
|
DECLARE_DISPLAY_ITEM_TYPE(MATHML_CHAR_FOREGROUND, TYPE_RENDERS_NO_IMAGES)
|
||||||
@@ -123,9 +120,4 @@ DECLARE_DISPLAY_ITEM_TYPE(MATHML_SLASH, TYPE_RENDERS_NO_IMAGES)
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
DECLARE_DISPLAY_ITEM_TYPE(MATHML_BOUNDING_METRICS, TYPE_RENDERS_NO_IMAGES)
|
DECLARE_DISPLAY_ITEM_TYPE(MATHML_BOUNDING_METRICS, TYPE_RENDERS_NO_IMAGES)
|
||||||
DECLARE_DISPLAY_ITEM_TYPE(MATHML_CHAR_DEBUG, TYPE_RENDERS_NO_IMAGES)
|
DECLARE_DISPLAY_ITEM_TYPE(MATHML_CHAR_DEBUG, TYPE_RENDERS_NO_IMAGES)
|
||||||
|
|
||||||
DECLARE_DISPLAY_ITEM_TYPE(DEBUG_BORDER, TYPE_RENDERS_NO_IMAGES)
|
|
||||||
DECLARE_DISPLAY_ITEM_TYPE(DEBUG_IMAGE_MAP, TYPE_RENDERS_NO_IMAGES)
|
|
||||||
DECLARE_DISPLAY_ITEM_TYPE(DEBUG_PLACEHOLDER, TYPE_RENDERS_NO_IMAGES)
|
|
||||||
DECLARE_DISPLAY_ITEM_TYPE(EVENT_TARGET_BORDER, TYPE_RENDERS_NO_IMAGES)
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -13,10 +13,9 @@ interface mozIDOMWindow;
|
|||||||
* layout debugging functions to be used from chrome.
|
* layout debugging functions to be used from chrome.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[scriptable, uuid(f336d8d3-9721-4ad3-85d0-a7018c0a3383)]
|
[builtinclass, scriptable, uuid(f336d8d3-9721-4ad3-85d0-a7018c0a3383)]
|
||||||
interface nsILayoutDebuggingTools : nsISupports
|
interface nsILayoutDebuggingTools : nsISupports
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize debugger object to act on a docshell.
|
* Initialize debugger object to act on a docshell.
|
||||||
*/
|
*/
|
||||||
@@ -26,8 +25,6 @@ interface nsILayoutDebuggingTools : nsISupports
|
|||||||
void forceRefresh();
|
void forceRefresh();
|
||||||
|
|
||||||
/* Toggle various debugging states */
|
/* Toggle various debugging states */
|
||||||
void setVisualDebugging(in boolean enabled);
|
|
||||||
void setVisualEventDebugging(in boolean enabled);
|
|
||||||
void setReflowCounts(in boolean enabled);
|
void setReflowCounts(in boolean enabled);
|
||||||
void setPagedMode(in boolean enabled);
|
void setPagedMode(in boolean enabled);
|
||||||
|
|
||||||
|
|||||||
@@ -84,24 +84,6 @@ nsLayoutDebuggingTools::Init(mozIDOMWindow* aWin) {
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
nsLayoutDebuggingTools::SetVisualDebugging(bool aVisualDebugging) {
|
|
||||||
#ifdef DEBUG
|
|
||||||
nsIFrame::ShowFrameBorders(aVisualDebugging);
|
|
||||||
ForceRefresh();
|
|
||||||
#endif
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
nsLayoutDebuggingTools::SetVisualEventDebugging(bool aVisualEventDebugging) {
|
|
||||||
#ifdef DEBUG
|
|
||||||
nsIFrame::ShowEventTargetFrameBorder(aVisualEventDebugging);
|
|
||||||
ForceRefresh();
|
|
||||||
#endif
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsLayoutDebuggingTools::SetReflowCounts(bool aShow) {
|
nsLayoutDebuggingTools::SetReflowCounts(bool aShow) {
|
||||||
NS_ENSURE_TRUE(mDocShell, NS_ERROR_NOT_INITIALIZED);
|
NS_ENSURE_TRUE(mDocShell, NS_ERROR_NOT_INITIALIZED);
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ const COMMANDS = [
|
|||||||
class Debugger {
|
class Debugger {
|
||||||
constructor() {
|
constructor() {
|
||||||
this._flags = new Map();
|
this._flags = new Map();
|
||||||
this._visualDebugging = false;
|
|
||||||
this._visualEventDebugging = false;
|
|
||||||
this._pagedMode = false;
|
this._pagedMode = false;
|
||||||
this._attached = false;
|
this._attached = false;
|
||||||
|
|
||||||
@@ -89,26 +87,6 @@ class Debugger {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get visualDebugging() {
|
|
||||||
return this._visualDebugging;
|
|
||||||
}
|
|
||||||
|
|
||||||
set visualDebugging(v) {
|
|
||||||
v = !!v;
|
|
||||||
this._visualDebugging = v;
|
|
||||||
this._sendMessage("setVisualDebugging", v);
|
|
||||||
}
|
|
||||||
|
|
||||||
get visualEventDebugging() {
|
|
||||||
return this._visualEventDebugging;
|
|
||||||
}
|
|
||||||
|
|
||||||
set visualEventDebugging(v) {
|
|
||||||
v = !!v;
|
|
||||||
this._visualEventDebugging = v;
|
|
||||||
this._sendMessage("setVisualEventDebugging", v);
|
|
||||||
}
|
|
||||||
|
|
||||||
get pagedMode() {
|
get pagedMode() {
|
||||||
return this._pagedMode;
|
return this._pagedMode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,9 +72,6 @@
|
|||||||
<menu label="&ldb.ToggleMenu.label;"
|
<menu label="&ldb.ToggleMenu.label;"
|
||||||
accesskey="&ldb.ToggleMenu.accesskey;">
|
accesskey="&ldb.ToggleMenu.accesskey;">
|
||||||
<menupopup>
|
<menupopup>
|
||||||
<menuitem type="checkbox" id="menu_visualDebugging" label="&ldb.visualDebugging.label;" accesskey="&ldb.visualDebugging.accesskey;" oncommand="toggle(this);" />
|
|
||||||
<menuitem type="checkbox" id="menu_visualEventDebugging" label="&ldb.visualEventDebugging.label;" accesskey="&ldb.visualEventDebugging.accesskey;" oncommand="toggle(this);" />
|
|
||||||
<menuseparator />
|
|
||||||
<menuitem type="checkbox" id="menu_paintDumping" label="&ldb.paintDumping.label;" accesskey="&ldb.paintDumping.accesskey;" oncommand="toggle(this);" />
|
<menuitem type="checkbox" id="menu_paintDumping" label="&ldb.paintDumping.label;" accesskey="&ldb.paintDumping.accesskey;" oncommand="toggle(this);" />
|
||||||
<menuitem type="checkbox" id="menu_invalidateDumping" label="&ldb.invalidateDumping.label;" accesskey="&ldb.invalidateDumping.accesskey;" oncommand="toggle(this);" />
|
<menuitem type="checkbox" id="menu_invalidateDumping" label="&ldb.invalidateDumping.label;" accesskey="&ldb.invalidateDumping.accesskey;" oncommand="toggle(this);" />
|
||||||
<menuseparator />
|
<menuseparator />
|
||||||
|
|||||||
@@ -15,10 +15,6 @@
|
|||||||
<!ENTITY ldb.ToggleMenu.label "Toggle">
|
<!ENTITY ldb.ToggleMenu.label "Toggle">
|
||||||
<!ENTITY ldb.ToggleMenu.accesskey "T">
|
<!ENTITY ldb.ToggleMenu.accesskey "T">
|
||||||
|
|
||||||
<!ENTITY ldb.visualDebugging.label "Visual Debugging">
|
|
||||||
<!ENTITY ldb.visualDebugging.accesskey "V">
|
|
||||||
<!ENTITY ldb.visualEventDebugging.label "Visual Event Debugging">
|
|
||||||
<!ENTITY ldb.visualEventDebugging.accesskey "E">
|
|
||||||
<!ENTITY ldb.paintDumping.label "Paint Dumping">
|
<!ENTITY ldb.paintDumping.label "Paint Dumping">
|
||||||
<!ENTITY ldb.paintDumping.accesskey "P">
|
<!ENTITY ldb.paintDumping.accesskey "P">
|
||||||
<!ENTITY ldb.invalidateDumping.label "Invalidate Dumping">
|
<!ENTITY ldb.invalidateDumping.label "Invalidate Dumping">
|
||||||
|
|||||||
Reference in New Issue
Block a user